Configuration of global SDK version

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.

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.

aliyuncli ecs ShowVersions

* v20140526 ←Thedefault version inuse.Ifnot configured, the latest version is applied bydefault.

v20150304 ←The SDK version currently installed on the system.

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.

$ vim sdk_version

ecs = v20140526

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.

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.