Configuring the CLI by Using a Profile

You can create different profiles as JSON files, based on region, credentials, identity domain , and so on and quickly configure your CLI client by passing the profile as a payload. This is helpful if you have multiple configuration profiles (for example, one for each account) as you can use the appropriate profile to access any account. By using profiles, you also avoid the prompt-by-prompt routine described above.

To facilitate passing a profile as a payload, use the --config-payload (-c) parameter with psm setup:
$ psm setup -c|--config-payload pathToPayloadFile
For example:
psm setup -c /home/templates/psm-setup-payload.json

Payload Format

The profile payload takes this format:
{ 
    "username":"john.smith@example.com",
    "password":"password",
    "identityDomain":"jsId002",
    "region":"emea",
    "outputFormat":"json",
    "oAuth":{ 
        "clientId":"",
        "clientSecret":"",
        "accessTokenServer":""
    }
}

The parameters are described here. All fields are required unless otherwise noted.

Parameter Description
username Username for the account.
password Password associated with the specified username.
identityDomain Identity domain associated with the specified user.
region (Optional) The cloud data center region based on the REST API server. If your REST API server contains the text emea , enter emea. If your REST API server contains the text aucom , enter aucom. Otherwise you can leave this parameter blank.

Default: us

outputFormat (Optional) Your preferred output format.

Accepted values: short, json, html (For a description of these formats, see Step 4 in Configuring the Command Line Interface.)

Default: short

oAuth:clientId (Optional; only required if you want to communicate with the PSM REST API over OAuth) The OAuth client ID from the specific OAuth account.
oAuth:clientSecret (Optional; only required if you want to communicate with the PSM REST API over OAuth) The client secret associated with the specified OAuth account.
oAuth:accessTokenServer (Optional; only required if you want to communicate with the PSM REST API over OAuth) The access token server for the specified OAuth account. This value is derived from the identity domain and the prompt is optional.

Note: You do not need to use this parameter.

To obtain the OAuth credentials see Obtaining and Using an OAuth Token for Platform Services.