Project Resources

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 <catalog|pipeline|pipeline-template|schema|artifact> Specifies the type of resources to list.
  • --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 OLP 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"
        }
    ]
}

Links a resource to a project.


olp project resources link <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 OLP 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"
}

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 OLP 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 ""