All Products
Search
Document Center

Alibaba Cloud CLI:Other configure command operations

Last Updated:Feb 20, 2024

This topic lists other operations of the Alibaba Cloud CLI configuration credential.

Lists the summary information of all configurations

Run the following command to return a summary of each configuration.

aliyun configure list

The command output of the system is as follows: It contains the configuration name, encrypted authentication information, language, default Region, and the current default configuration (the configuration name is marked with a star number in the upper right corner ).

Profile           | Credential            | Valid   | Region           | Language
---------         | ------------------    | ------- | ---------------- | --------
akProfile *       | AK:***yId             | Valid   | cn-hangzhou      | en
stsTokenProfile   | StsToken:***yId       | Valid   | cn-hangzhou      | en
ramRoleArnProfile | RamRoleArn:***yId     | Valid   | cn-hangzhou      | en
ecsRamRoleProfile | EcsRamRole:EcsRamRole | Valid   | cn-hangzhou      | en

Get the details of a configuration

  • Run the following command to get the default configuration information:

     aliyun configure get
  • Run the following command to get the information of the specified configuration. The option --profile is used to specify the name of the configuration to get.

    aliyun configure get --profile akProfile
    • If the akProfile is configured, the information of this configuration will be returned:

      {
              "name": "akProfile",
              "mode": "AK",
              "access_key_id": "AccessKeyId",
              "access_key_secret": "AccessKeySecret",
              "sts_token": "",
              "ram_role_name": "",
              "ram_role_arn": "",
              "ram_session_name": "",
              "private_key": "",
              "key_pair_name": "",
              "expired_seconds": 0,
              "verified": "",
              "region_id": "cn-hangzhou",
              "output_format": "json",
              "language": "en",
              "site": "",
              "retry_timeout": 0,
              "retry_count": 0
      }
    • If the akProfile does not exist, the default value of each field in the configuration is returned:

      profile akProfile not found!{
              "name": "akProfile",
              "mode": "",
              "access_key_id": "",
              "access_key_secret": "",
              "sts_token": "",
              "ram_role_name": "",
              "ram_role_arn": "",
              "ram_session_name": "",
              "private_key": "",
              "key_pair_name": "",
              "expired_seconds": 0,
              "verified": "",
              "region_id": "",
              "output_format": "",
              "language": "",
              "site": "",
              "retry_timeout": 0,
              "retry_count": 0
      }

Remove the specified configuration

Run the following command to delete the configuration named akProfile: The option --profile is used to specify the name of the configuration to be deleted.

aliyun configure delete --profile akProfile