Project Link Commands

The OLP CLI supports the following:

  • list all resources in a project
  • link a resource to a project
  • unlink a resource from a project

project resources list

Retrieves all resources that are in a project.

olp project resources list <project HRN> [command options]

Required parameters:

  • <project HRN> The HRN of the project.

Optional parameters:

  • --type <resource type> Type of resource to be listed for the specified <project HRN>. Acceptable values: catalog,pipeline,pipeline-template,schema,artifact,flow,flow-pattern,service.
  • --relation <home|reference> The relation of resources to the project. home denotes a resource located within a project while reference denotes a resource linked to the project.
  • --limit <max number of entities> Specifies the maximum number of entities returned in the result (500 by default).
  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Display the command's result in JSON format.
  • --quiet Display the resources' HRNs, each on a new line.

For more information on using credentials and profiles, see Credentials Setup.

Example:


olp project resources list hrn:here:authorization::myrealm:project/my-project-0000 --json

Output:


{
  "resources": [
    {
      "resource": "hrn:here:pipeline:::ae7397ea-38fb-4b96-831c-b89a4ec28bc2",
      "project": "hrn:here:authorization::myrealm:project/my-project-0000",
      "type": "pipeline",
      "relation": "home"
    },
    {
      "resource": "hrn:here:data::myrealm:my-catalog",
      "project": "hrn:here:authorization::myrealm:project/my-project-0000",
      "type": "catalog",
      "relation": "reference",
      "allowedActions": [
        "readResource",
        "writeResource"
      ]
    }
  ]
}

Links a resource to a project.

olp project resources link <project HRN> <resource HRN> --actions <list> [command options]

Required parameters:

  • <project HRN> The HRN of the project.
  • <resource HRN> The HRN of the resource, where the resource is either a schema, catalog or pipeline template.
  • --actions <list> A space-separated list of allowed actions you want to link this resource to your project with. Note: this command is optional for HERE-provided catalogs. Use the Project resource link availability list command for your specified resource type to find out allowed actions for the resource you are linking.

Optional parameters:

  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Display an empty output skipping additional information.

For more information on using credentials and profiles, see Credentials Setup.

Example:

Linux
Windows
olp project resources link hrn:here:authorization::myrealm:project/my-project-0000 \
   hrn:here:data::myrealm:my-catalog --json
olp project resources link hrn:here:authorization::myrealm:project/my-project-0000 ^
   hrn:here:data::myrealm:my-catalog --json

Output:


{
  "resource": "hrn:here:data::myrealm:my-catalog",
  "project": "hrn:here:authorization::myrealm:project/my-project-0000",
  "type": "catalog",
  "relation": "reference"
}

For using --actions, the resource must be made available for linking first. When a resource is made available for linking, actions are also specified while making it available for linking. --actions specified here has to be one or all of the actions available for the resource which has been made available for linking.

For more information on using link availability, see Project resource link availability list command.

Example:

Linux
Windows
olp project resources link hrn:here:authorization::myrealm:project/my-project-0000 \
   hrn:here:data::myrealm:my-catalog \
   --actions readResource writeResource --json
olp project resources link hrn:here:authorization::myrealm:project/my-project-0000 ^
   hrn:here:data::myrealm:my-catalog ^
   --actions readResource writeResource --json

Output:


{
  "resource": "hrn:here:data::myrealm:my-catalog",
  "project": "hrn:here:authorization::myrealm:project/my-project-0000",
  "type": "catalog",
  "relation": "reference",
  "allowedActions": [
     "readResource",
     "writeResource"
  ]
}

The following is an example for linking a pipeline template to a project

Example:

Linux
Windows
olp project resources link hrn:here:authorization::myrealm/link-test-b hrn:here:pipeline-template::myrealm:<template UUID>
    --actions read
olp project resources link hrn:here:authorization::myrealm/link-test-b hrn:here:pipeline-template::myrealm:<template UUID>
    --actions read

Output:


Project resource hrn:here:pipeline-template::myrealm: has been linked.

Unlinks a resource from a project.

olp project resources unlink <project HRN> <resource HRN> [command options]

Required parameters:

  • <project HRN> The HRN of the project.
  • <resource HRN> The HRN of the resource.

Optional parameters:

  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --quiet Display an empty output skipping additional information.

For more information on using credentials and profiles, see Credentials Setup.

Example:

Linux
Windows
olp project resources unlink hrn:here:authorization::myrealm:project/my-project-0000 \
   hrn:here:data::myrealm:my-catalog
olp project resources unlink hrn:here:authorization::myrealm:project/my-project-0000 ^
   hrn:here:data::myrealm:my-catalog

Output:


Resource hrn:here:data::myrealm:my-catalog has been unlinked from project hrn:here:authorization::myrealm:project/my-project-0000.

results matching ""

    No results matching ""