edit-icon download-icon

Configuration of global SDK version

Last Updated: Jan 08, 2018

You can install and use SDKs of Alibaba Cloud products according to your needs.

You can configure your expected product version in Alibaba Cloud CLI. If you do not configure the product version, the latest version is applied by default.

Configure the SDK version

Taking the ECS product as an example, run the following command to configure its SDK version.

  1. aliyuncli ecs ConfigVersion --version v20140526

Query the SDK versions of a single product

Run the following command to query the SDK versions of a single product, such as the ECS SDK versions installed on the system.

  1. aliyuncli ecs ShowVersions
  2. * v20140526 The default version in use. If not configured, the latest version is applied by default.
  3. v20150304 The SDK version currently installed on the system.
  4. v20140526

Query the SDK versions of all products

If you want to query the SDK versions of all the products installed on the system, you can check sdk_version. sdk_version stores the default SDK version used in Alibaba Cloud CLI, which is grouped by product. On Linux/UNIX and Mac OS system, the path of sdk_version is ~/.alicloudcli/sdk_version; on Windows system, its path is C:\Users\USERNAME. alicloudcli\sdk_version.

Run the following command to query the SDK versions of all products.

  1. $ vim sdk_version
  2. ecs = v20140526
  3. rds = v20150405

Specify an SDK version for the current command

During command execution, you can use version plus version information as a temporary parameter to specify an API version to be used for the current command, provided that the version has been correctly installed on the system. If the version has not been installed, an error is reported.

Taking the ECS product as an example, run the following command.

  1. aliyuncli ecs DescribeRegions --version v20140526

This indicates that ECS v20140526 is used. If you do not know which versions are available, run the following command for query.

  1. alicloud ecs ShowVersions
Thank you! We've received your feedback.