resource link availability
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.
resource link availability create
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-projectsEither the<project HRN>that the resource is made available to link orall-projectsto 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.--actionsA space-separated list of allowed actions for the resource to be made available to link. Use theolp resource action listcommand for your specified resource type to find out allowed actions.--profile <profile name>The name of the credentials profile to use from theolpcli.inifile.--jsonDisplays the command result in JSON format.--quietReduces 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--scopeoverrides any value forhere.token.scopeprovided 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.
olp resource link availability create hrn:here:data::org:mycatalog \
--actions readResource \
--available-to hrn:here:authorization::org:project/otherproject \
--scope hrn:here:authorization::org:project/myproject \
--jsonolp resource link availability create hrn:here:data::org:mycatalog ^
--actions readResource ^
--available-to hrn:here:authorization::org:project/otherproject ^
--scope hrn:here:authorization::org:project/myproject ^
--jsonOutput:
{
"resource": "hrn:here:data::org:mycatalog",
"allowedActions": [
"readResource"
],
"projectHrn": "hrn:here:authorization::org:project/otherproject"
}Example:
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:data::org:mycatalog \
--actions readResource \
--available-to all-projects \
--scope hrn:here:authorization::org:project/myproject \
--jsonOutput:
{
"realmHrn": "hrn:here:account::org:realm/org",
"resource": "hrn:here:data::org:mycatalog",
"allowedActions": [
"readResource"
]
}Example:
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.
olp resource link availability create hrn:here:pipeline-template::org:<template-id> \
--actions read \
--available-to hrn:here:authorization::org:project/<destination-project-id> \
--scope hrn:here:authorization::org:project/<project-id>
–-jsonolp resource link availability create hrn:here:pipeline-template::org:<template-id> \
--actions read \
--available-to hrn:here:authorization::org:project/<destination-project-id> \
--scope hrn:here:authorization::org:project/<project-id>
–-jsonOutput:
{
"resource": "hrn:here:pipeline-template::org:<template-id>",
"allowedActions": [
"read"
],
"projectHrn": "hrn:here:authorization::org:project/<destination-project-id>"
}resource link availability update
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-projectsEither the<project HRN>that the resource is made available to link orall-projectsfor making the resource available to link to all projects in the organization. The<project HRN>|all-projectscan not be changed. Only allowed actions can be updated in the scope of this command.--actionsA list of actions allowed to be made available to link to a project or all projects in the organization. Use theolp resource action listcommand 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 theolpcli.inifile.--jsonDisplays the command result in JSON format.--quietReduces 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--scopeoverrides any value forhere.token.scopeprovided 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.
olp resource link availability update hrn:here:data::org:mycatalog \
--actions readResource writeResource \
--available-to hrn:here:authorization::org:project/otherproject \
--scope hrn:here:authorization::org:project/myproject \
--jsonolp resource link availability update hrn:here:data::org:mycatalog ^
--actions readResource writeResource ^
--available-to hrn:here:authorization::org:project/otherproject ^
--scope hrn:here:authorization::org:project/myproject ^
--jsonOutput:
{
"resource": "hrn:here:data::org:mycatalog",
"allowedActions": [
"readResource",
"writeResource"
],
"projectHrn": "hrn:here:authorization::org:project/otherproject"
}Example:
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:data::org:mycatalog \
--actions readResource writeResource \
--available-to all-projects \
--scope hrn:here:authorization::org:project/myproject \
--jsonOutput:
{
"realmHrn": "hrn:here:account::org:realm/org",
"resource": "hrn:here:data::org:mycatalog",
"allowedActions": [
"readResource",
"writeResource"
]
}resource link availability show
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-projectsEither the<project HRN>that the resource is made available to link orall-projectsto 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 theolpcli.inifile.--jsonDisplays the command result in JSON format.--quietReduces 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--scopeoverrides any value forhere.token.scopeprovided 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.
olp resource link availability show hrn:here:data::org:mycatalog \
--available-to hrn:here:authorization::org:project/otherproject \
--scope hrn:here:authorization::org:project/myproject \
--jsonolp resource link availability show hrn:here:data::org:mycatalog ^
--available-to hrn:here:authorization::org:project/otherproject ^
--scope hrn:here:authorization::org:project/myproject ^
--jsonOutput:
{
"resource": "hrn:here:data::org:mycatalog",
"allowedActions": ["readResource"],
"projectHrn": "hrn:here:authorization::org:project/otherproject"
}Example:
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:data::org:mycatalog \
--available-to all-projects \
--scope hrn:here:authorization::org:project/myproject \
--jsonOutput:
{
"realmHrn": "hrn:here:account::org:realm/org",
"resource": "hrn:here:data::org:mycatalog",
"allowedActions": ["readResource"]
}Example:
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.
olp resource link availability show hrn:here-dev:pipeline-template::org:<template-id> \
--available-to hrn:here:authorization::org:project/<destination-project-id> \
--scope hrn:here:authorization::org:project/<project-id>
–-jsonolp resource link availability show hrn:here:pipeline-template::org:<template-id> \
--available-to hrn:here:authorization::org:project/<destination-project-id> \
--scope hrn:here:authorization::org:project/<project-id>
–-jsonOutput:
{
"resource": "hrn:here:pipeline-template::org:<template-id>",
"allowedActions": [
"read"
],
"projectHrn": "hrn:here:authorization::org:project/<destination-project-id>"
}resource link availability list
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). -
--quietReduces 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--scopeoverrides any value forhere.token.scopeprovided 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. -
--jsonDisplays the command result in JSON format. -
--profile <profile name>The name of the credentials profile to use from theolpcli.inifile.
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.
olp resource link availability list hrn:here:data::org:mycatalog \
--scope hrn:here:authorization::org:project/myproject \
--jsonolp resource link availability list hrn:here:data::org:mycatalog ^
--scope hrn:here:authorization::org:project/myproject ^
--jsonOutput:
{"resources": [
{
"realmHrn": "hrn:here:account::org:realm/org",
"resource": "hrn:here:data::org:mycatalog",
"allowedActions": ["readResource"]
},
{
"resource": "hrn:here:data::org:mycatalog",
"allowedActions": [
"readResource",
"writeResource"
],
"projectName": "other project",
"projectId": "otherproject",
"projectHrn": "hrn:here:authorization::org:project/otherproject"
}
]}resource link availability delete
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-projectsEither the<project HRN>for making the resource unavailable to link to a project orall-projectsfor 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 theolpcli.inifile.--jsonDisplays the command result in JSON format.--quietReduces 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--scopeoverrides any value forhere.token.scopeprovided 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.
olp resource link availability delete hrn:here:data::org:mycatalog \
--available-to hrn:here:authorization::org:project/otherproject \
--scope hrn:here:authorization::org:project/myproject \
--jsonolp resource link availability delete hrn:here:data::org:mycatalog ^
--available-to hrn:here:authorization::org:project/otherproject ^
--scope hrn:here:authorization::org:project/myproject ^
--jsonOutput:
Resource hrn:here:data::org:mycatalog has been made unavailable for linking to the project hrn:here:authorization::org:project/otherprojectExample:
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:data::org:mycatalog \
--available-to all-projects \
--scope hrn:here:authorization::org:project/myproject \
--jsonOutput:
Resource hrn:here: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 affectedUpdated 22 days ago