Credentials Commands

The OLP CLI supports the following:

  • list all available credentials
  • import a new profile
  • delete an existing profile

credentials list

Retrieves all the available credentials. The OLP CLI resolves the credentials list in the same order as it resolves the credentials being passed. For more more information, see Passing Credentials to CLI.

olp credentials list [command options]

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.
  • --json Display the command's result in JSON format.
  • --quiet Display app IDs, each on a new line.

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

Example:

olp credentials list

Output:


App ID                   Profile                   Scope                                                                        Source
ylH5uh69n7DedRvGMUmp     demo-profile              hrn:here-cn:authorization::olp-here:project/project-e2e-lv   /.here/olpcli.ini
f6AvwZgJBeHM51sosAKQ     prod                                                                                                   /.here/olpcli.ini
F9p0HU3qCqtxnZ3KnH4a     staging                                                                                                /.here/olpcli.ini

credentials import

Imports the credentials from the specified credentials.properties file to the .here\olpcli.ini file:

olp credentials import <profile name> <path to credentials.properties file> [command parameters]

Note

If the default profile is not present in .here\olpcli.ini, will be also added as default profile.

Required parameters:

  • <profile name> The name of a new profile.
  • <path to credentials.properties file> The path to the credentials.properties file.

Note

If olpcli.ini is present, then credentials.properties is not used unless specified with the --credentials parameter. For more information, see Passing Credentials to CLI.

Example:

The command below creates an .here\olpcli.ini file in your home directory and associates the credentials from the credentials.properties file with the newProfile profile:

olp credentials import newProfile credentials.properties

Output:


[profile newProfile]
here.user.id = HERE-01966c94-aaf1-4ae2-a1y6-6516b3f9b6c1
here.client.id = mzLcb1rL8nskvDQpCAAO
here.access.key.id = BELUTk45QdaYGgZ9A_IMTA
here.access.key.secret = 108lI7w9m8G_6sIw9kng-PXGoeHQQ-cv6xByNOuMcRYixZZp...
here.token.endpoint.url = https://elb.cn-northwest-1.account.hereapi.cn/oauth2/token
here.token.scope = hrn:here-cn:authorization::olp-here:project/project-e2e-lv

To use this new profile, add --profile newProfile to CLI commands or set the OLP_PROFILE environment variable to newProfile.

credentials delete

Deletes the specified profile from the .here\olpcli.ini file.

olp credentials delete <profile name> [command paramenters]

Required parameters:

  • <profile name> The name of the profile to remove.

Example:

The command below removes the newProfile profile from the olpcli.ini file:

olp credentials delete newProfile

results matching ""

    No results matching ""