edit-icon download-icon

For Alibaba Cloud users

Last Updated: Dec 18, 2017

After Alibaba Cloud CLI is installed, you must configure it before use. Open APIs of all Alibaba Cloud products must be accessed with AccessKey and secret. Therefore, you must create an AccessKey first on a device that is connected to the Internet.

You can also configure the RegionId of your Alibaba Cloud product and the output format of Alibaba Cloud CLI, such as text, table, and json.

Create an AccessKey

  1. Log on to the Alibaba Cloud console.

  2. Click AccessKeys.

    Note: If the following information is displayed, click Continue to manage AccessKey.

    access continue

  3. Click Create AccessKey and then click Agree and create.

  4. Enter the captcha and click OK. Then the AccessKey and secrete are successfully created.

Configure Alibaba Cloud CLI

On Windows system, run the following command and enter the values of the parameters.

  1. cd C:\Python27\Scripts
  2. aliyuncli configure
  3. Aliyun Access Key ID [None]: <Enter Access Key ID>
  4. Aliyun Access Key Secret [None]: <Enter Access Key Secret>
  5. Default Region Id [None]: <Enter the RegionId of your instance>
  6. Default output format [None]: <Enter your expected output format>

On Linux/UNIX and Mac OS systems, run the following command and enter the values of the parameters.

  1. $ sudo aliyuncli configure
  2. Aliyun Access Key ID [None]: <Enter Access Key ID>
  3. Aliyun Access Key Secret [None]: <Enter Access Key Secret>
  4. Default Region Id [None]: <Enter the RegionId of your instance>
  5. Default output format [None]: <Enter your expected output format>

Modify values of Alibaba Cloud CLI global parameters

If you want to modify any of the Alibaba Cloud CLI global parameters, run the command aliyuncli configure. For the parameter you don’t modify, directly press Enter. Otherwise, enter the new value for the parameter. See the following example.

On Windows system, run the following command:

  1. cd C:\Python27\Scripts
  2. aliyuncli configure
  3. Aliyun Access Key ID [************jkf]: <Press Enter>
  4. Aliyun Access Key Secret [***************Okl]: <Press Enter>
  5. Default Region Id [cn-qingdao]: cn-hangzhou
  6. Default output format [table]: <Press Enter>

On Linux/UNIX and Mac OS systems, run the following command:

  1. $ sudo aliyuncli configure
  2. Aliyun Access Key ID [************jkf]: <Press Enter>
  3. Aliyun Access Key Secret [***************Okl]: <Press Enter>
  4. Default Region Id [cn-qingdao]: cn-hangzhou
  5. Default output format [table]: <Press Enter>
Thank you! We've received your feedback.