resource link availability

The OLP CLI supports the following functionality for resource link availability:

  • create a link availability for the resource identified by the provided HRN to a project or all projects in the organization.
  • update the actions on the resource identified by the provided HRN that is made available to link to a project or all projects in the organization.
  • show the link availability details for the resource identified by the provided HRN.
  • list the link availability for the resource identified by the provided HRN.
  • delete the link availability for the resource identified by the provided HRN.

Makes a resource available to be linked to a project or all projects in the organization.

olp resource link availability create <resource HRN> [command parameters]

Required parameters:

  • <resource HRN> The HRN of the resource, where the resource is either a schema, catalog or pipeline template. Schema HRN may or may not contain a version number which will not affect the command result.
  • --available-to <project HRN>|all-projects Either the <project HRN> that the resource is made available to link or all-projects to make the resource available to link to all projects in the organization.

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 HERE platform portal.
  • --actions A space-separated list of allowed actions for the resource to be made available to link. Use the olp resource action list command for your specified resource type to find out allowed actions.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Displays the command result in JSON format.
  • --quiet Reduces the output to essential values only, in this case it's an empty string.
  • --scope <project HRN> Specifies the home project HRN to use as the scope in the request. The value specified with --scope overrides any value for here.token.scope provided in the credentials file used for the command.

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

Example:

The command below makes the resource, identified by the specified resource HRN, available for linking to the project identified by the provided project HRN. The output is in json format.

Linux
Windows
olp resource link availability create hrn:here-cn:data::org:mycatalog \
    --actions readResource \
    --available-to hrn:here-cn:authorization::org:project/otherproject \
    --scope hrn:here-cn:authorization::org:project/myproject \
    --json
olp resource link availability create hrn:here-cn:data::org:mycatalog ^
    --actions readResource ^
    --available-to hrn:here-cn:authorization::org:project/otherproject ^
    --scope hrn:here-cn:authorization::org:project/myproject ^
    --json

Output:


{
     "resource": "hrn:here-cn:data::org:mycatalog",
     "allowedActions": [
         "readResource"
     ],
     "projectHrn": "hrn:here-cn:authorization::org:project/otherproject"
}

The command below makes the resource, identified by the specified resource HRN, available for linking to the entire organization. The output is in json format.


olp resource link availability create hrn:here-cn:data::org:mycatalog \
    --actions readResource \
    --available-to all-projects \
    --scope hrn:here-cn:authorization::org:project/myproject \
    --json

Output:


{
    "realmHrn": "hrn:here-cn:account::org:realm/org",
    "resource": "hrn:here-cn:data::org:mycatalog",
    "allowedActions": [
        "readResource"
    ]
}

The command below makes the template resource, identified by the specified resource HRN, available for linking to the project identified by the provided project HRN. The output is in JSON format.

Linux
Windows
olp resource link availability create hrn:here-cn:pipeline-template::org:<template-id> \ 
    --actions read \
    --available-to hrn:here-cn:authorization::org:project/<destination-project-id> \ 
    --scope hrn:here-cn:authorization::org:project/<project-id>
    –-json
olp resource link availability create hrn:here-cn:pipeline-template::org:<template-id> \ 
    --actions read \
    --available-to hrn:here-cn:authorization::org:project/<destination-project-id> \ 
    --scope hrn:here-cn:authorization::org:project/<project-id>
    –-json

Output:


{
    "resource": "hrn:here-cn:pipeline-template::org:",
    "allowedActions": [
	"read"
	],
    "projectHrn": "hrn:here-cn:authorization::org:project/"
}

Updates the actions on the resource that is made available to be linked to a project or all projects in the organization.

olp resource link availability update <resource HRN> [command parameters]

Required parameters:

  • <resource HRN> The HRN of the resource.
  • --available-to <project HRN>|all-projects Either the <project HRN> that the resource is made available to link or all-projects for making the resource available to link to all projects in the organization. The <project HRN>|all-projects can not be changed. Only allowed actions can be updated in the scope of this command.
  • --actions A list of actions allowed to be made available to link to a project or all projects in the organization. Use the olp resource action list command for your specified resource type to find out allowed actions.

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 HERE platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Displays the command result in JSON format.
  • --quiet Reduces the output to essential values only, in this case it's an empty string.
  • --scope <project HRN> Specifies the home project HRN to use as the scope in the request. The value specified with --scope overrides any value for here.token.scope provided in the credentials file used for the command.

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

Example:

The command below updates the actions for the resource, identified by the specified resource HRN, made available for linking to the project identified by the provided project HRN. The output is in json format.

Linux
Windows
olp resource link availability update hrn:here-cn:data::org:mycatalog \
    --actions readResource writeResource \
    --available-to hrn:here-cn:authorization::org:project/otherproject \
    --scope hrn:here-cn:authorization::org:project/myproject \
    --json
olp resource link availability update hrn:here-cn:data::org:mycatalog ^
    --actions readResource writeResource ^
    --available-to hrn:here-cn:authorization::org:project/otherproject ^
    --scope hrn:here-cn:authorization::org:project/myproject ^
    --json

Output:


{
     "resource": "hrn:here-cn:data::org:mycatalog",
     "allowedActions": [
         "readResource",
         "writeResource"
     ],
     "projectHrn": "hrn:here-cn:authorization::org:project/otherproject"
}

The command below updates the actions for the resource, identified by the specified resource HRN, made available for linking to the entire organization. The output is in json format.


olp resource link availability update hrn:here-cn:data::org:mycatalog \
    --actions readResource writeResource \
    --available-to all-projects \
    --scope hrn:here-cn:authorization::org:project/myproject \
    --json

Output:


{
    "realmHrn": "hrn:here-cn:account::org:realm/org",
    "resource": "hrn:here-cn:data::org:mycatalog",
    "allowedActions": [
        "readResource",
        "writeResource"
    ]
}

Shows the availability of the resource to link to a project or all projects in the organization.

olp resource link availability show <resource HRN> [command parameters]

Required parameters:

  • <resource HRN> The HRN of the resource.
  • --available-to <project HRN>|all-projects Either the <project HRN> that the resource is made available to link or all-projects to show resource made available to link to all projects in the organization.

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 HERE platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Displays the command result in JSON format.
  • --quiet Reduces the output to essential values only, in this case it's an empty string.
  • --scope <project HRN> Specifies the home project HRN to use as the scope in the request. The value specified with --scope overrides any value for here.token.scope provided in the credentials file used for the command.

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

Example:

The command below shows the link availability of a resource, identified by the specified resource HRN, for a project identified by the provided project HRN. Output is in json format.

Linux
Windows
olp resource link availability show hrn:here-cn:data::org:mycatalog \
    --available-to hrn:here-cn:authorization::org:project/otherproject \
    --scope hrn:here-cn:authorization::org:project/myproject \
    --json
olp resource link availability show hrn:here-cn:data::org:mycatalog ^
    --available-to hrn:here-cn:authorization::org:project/otherproject ^
    --scope hrn:here-cn:authorization::org:project/myproject ^
    --json

Output:


{
     "resource": "hrn:here-cn:data::org:mycatalog",
     "allowedActions": ["readResource"],
     "projectHrn": "hrn:here-cn:authorization::org:project/otherproject"
}

The command below shows the link availability of a resource, identified by the specified resource HRN, for the entire organization that is indicated by the parameter value all-projects. The output is in json format.


olp resource link availability show hrn:here-cn:data::org:mycatalog \
    --available-to all-projects \
    --scope hrn:here-cn:authorization::org:project/myproject \
    --json

Output:


{
    "realmHrn": "hrn:here-cn:account::org:realm/org",
    "resource": "hrn:here-cn:data::org:mycatalog",
    "allowedActions": ["readResource"]
}

The command below shows the link availability of the template resource, identified by the specified resource HRN, available for linking to the project identified by the provided project HRN. The output is in JSON format.

Linux
Windows
olp resource link availability show hrn:here-dev:pipeline-template::org:<template-id> \ 
    --available-to hrn:here-cn:authorization::org:project/<destination-project-id> \ 
    --scope hrn:here-cn:authorization::org:project/<project-id>
    –-json
olp resource link availability show hrn:here-cn:pipeline-template::org:<template-id> \ 
    --available-to hrn:here-cn:authorization::org:project/<destination-project-id> \ 
    --scope hrn:here-cn:authorization::org:project/<project-id>
    –-json

Output:


{
    "resource": "hrn:here-cn:pipeline-template::org:",
    "allowedActions": [
	"read"
	],
    "projectHrn": "hrn:here-cn:authorization::org:project/"
}

Lists the availability of the resource to link to a project or all projects in the organization.

olp resource link availability list <resource HRN> [command parameters]

Required parameters:

  • <resource HRN> The HRN of the resource.

Optional parameters:

  • --limit <max number of availabilities> Specifies the maximum number of link availabilities returned in the result (10 by default).
  • --quiet Reduces the output to essential values only, in this case it's a list of project HRNs and/or realm HRN (The unique identifier for the organization) with which resource has been made available for linking.
  • --scope <project HRN> Specifies the home project HRN to use as the scope in the request. The value specified with --scope overrides any value for here.token.scope provided in the credentials file used for the command.

  • --credentials <path to credentials file> The name of a credentials file to use with the command. Credentials files are downloaded separately from the HERE platform portal.

  • --json Displays the command result in JSON format.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.

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

Example:

The command below lists the link availability of a resource, identified by the specified resource HRN. Output is in json format.

Linux
Windows
olp resource link availability list hrn:here-cn:data::org:mycatalog \
    --scope hrn:here-cn:authorization::org:project/myproject \
    --json
olp resource link availability list hrn:here-cn:data::org:mycatalog ^
    --scope hrn:here-cn:authorization::org:project/myproject ^
    --json

Output:


{"resources": [
    {
        "realmHrn": "hrn:here-cn:account::org:realm/org",
        "resource": "hrn:here-cn:data::org:mycatalog",
        "allowedActions": ["readResource"]
    },
    {
        "resource": "hrn:here-cn:data::org:mycatalog",
        "allowedActions": [
            "readResource",
            "writeResource"
        ],
        "projectName": "other project",
        "projectId": "otherproject",
        "projectHrn": "hrn:here-cn:authorization::org:project/otherproject"
    }
]}

Makes a resource unavailable to link to a project or all projects in the organization.

olp resource link availability delete <resource HRN> [command parameters]

Required parameters:

  • <resource HRN> The HRN of the resource, where the resource is either a schema or a catalog. Schema HRN may or may not contain a version number which will not affect the command result.
  • --available-to <project HRN>|all-projects Either the <project HRN> for making the resource unavailable to link to a project or all-projects for making the resource unavailable to link to all projects in the organization.

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 HERE platform portal.
  • --profile <profile name> The name of the credentials profile to use from the olpcli.ini file.
  • --json Displays the command result in JSON format.
  • --quiet Reduces the output to essential values only, in this case it's an empty string.
  • --scope <project HRN> Specifies the home project HRN to use as the scope in the request. The value specified with --scope overrides any value for here.token.scope provided in the credentials file used for the command.

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

Example:

The command below makes a resource, identified by the specified resource HRN, unavailable for linking to a project, identified by the provided project HRN. The output is in verbose format.

Linux
Windows
olp resource link availability delete hrn:here-cn:data::org:mycatalog \
    --available-to hrn:here-cn:authorization::org:project/otherproject \
    --scope hrn:here-cn:authorization::org:project/myproject \
    --json
olp resource link availability delete hrn:here-cn:data::org:mycatalog ^
    --available-to hrn:here-cn:authorization::org:project/otherproject ^
    --scope hrn:here-cn:authorization::org:project/myproject ^
    --json

Output:


Resource hrn:here-cn:data::org:mycatalog has been made unavailable for linking to the project hrn:here-cn:authorization::org:project/otherproject

The command below makes a resource, identified by the specified resource HRN, unavailable for linking for the entire organization indicated by the parameter value --all-projects. Output is in verbose format.


olp resource link availability delete hrn:here-cn:data::org:mycatalog \
    --available-to all-projects \
    --scope hrn:here-cn:authorization::org:project/myproject \
    --json

Output:


Resource hrn:here-cn:data::org:mycatalog has been made unavailable for linking for all projects in the organization org. Note - Any direct project specific resource link availability is not affected

results matching ""

    No results matching ""