Advanced
Тема интерфейса

Introduction

To manage resources in multiple regions or projects or use multiple accounts, add profiles to store fixed information in different scenarios. If you have configured multiple profiles, use --cli-profile to specify the name of the profile to be configured or used.

The following table lists the Cloud CLI profile parameters that can be modified.

Table 1 Profile parameters

Parameter

Description

cli-profile

Name of a profile. When you modify a profile without specifying this parameter, the default profile will be modified. To view the content of the default profile, run the cloud configure show command.

cli-mode

Authentication mode. Options:

  • AKSK: permanent AK/SK (access key) or temporary AK/SK and SecurityToken (security credentials).
  • token: A token has a validity period, and must be reconfigured when it expires.
  • ecsAgency: Temporary authentication information is automatically obtained when you use Cloud CLI to call cloud service APIs on an Elastic Cloud Server (ECS).
  • agency: After a trust relationship is established between two accounts, the delegated party can be authenticated using the agency to manage cloud services and resources of the delegating party.

Region.

Access key ID (AK). It must be modified together with SK.

Secret access key (SK). It must be modified together with AK.

The access token issued to an IAM user. It must be reconfigured when it expires. Otherwise, the authentication cannot be completed when you call cloud service APIs.

Temporary security credential. It is required when a temporary AK/SK is used for identity authentication. It must be reconfigured when it expires. Otherwise, the authentication cannot be completed when you call cloud service APIs.

cli-lang

Language of Cloud CLI. Options:

  • cn: Chinese
  • en: English

cli-offline

Specifies whether to use Cloud CLI offline mode. Options:

  • true (use offline mode)
  • false (default value; use online mode)

Project ID.

ID of the account to which an IAM user belongs. This parameter is required when you call APIs of global services in AK/SK mode.

cli-custom

Specifies whether to configure custom parameters. Options:

  • true: Configure the custom parameters in the profile.
  • false: Default value, which means to configure the system parameters in the profile.

cli-read-timeout

I/O timeout, in seconds. The default value is 10, and the minimum value is 1.

cli-connect-timeout

Request connection timeout, in seconds. The default value is 5, and the minimum value is 1.

cli-retry-count

Number of connection attempts. The value ranges from 0 to 5, and the default value is 0.

cli-skip-secure-verify

Specifies whether to skip HTTPS certificate verification (not recommended). Options:

  • true: HTTPS certificate verification is skipped. This is not recommended for security purposes.
  • false: Default value, which means that HTTPS certificate verification is required.

cli-agency-domain-name

Account name of a delegating party. This parameter must be used together with cli-agency-name.

cli-agency-domain-id

Account ID of the delegating party. This parameter must be used together with cli-agency-name.

cli-agency-name

Agency name. It must be used together with cli-agency-domain-id or cli-agency-domain-name.

cli-source-profile

The profile that stores the authentication information of the delegated party. The value of cli-source-profile cannot be the current profile.

cli-agree-privacy-statement

Whether to agree to the privacy statement. When using Cloud CLI for the first time, you will be prompted to read and agree to the privacy statement. In some special scenarios such as command execution with automation scripts, use this parameter to agree to the privacy statement. Options:

  • true: Agree with the privacy statement.
  • false (default): Disagree with the privacy statement.

cli-warning

Whether to display warnings during command execution. Disabling warnings can avoid interfering with result resolution during command execution with automation scripts. Options:

  • true (default): Display warnings during command execution.
  • false: Display no warnings during command execution.
Note
  • The value of --cli-custom indicates the type of the parameter to be set in the profile. If --cli-custom is set to false, the system parameters will be set. If --cli-custom is set to true, the custom parameters will be set.
  • When you set a system parameter for a profile that does not exist, the profile is created; if you do so for an existing profile, the profile is modified.
  • You cannot set custom parameters for a profile that does not exist. You cannot set both system parameters and custom parameters in the same command.
  • After you set system parameters or custom parameters for a profile, the profile then becomes the default.

Command for adding or modifying a profile:

cloud configure set --param1=paramValue1 --param2=paramValue2 ...