Alibaba Cloud CLI is a management tool created based on Alibaba Cloud APIs. With this tool, you can call Alibaba Cloud APIs and manage your RDS.
Alibaba Cloud CLI is developed based on Python and runs in Python environment. We recommend that you install Alibaba Cloud CLI using pip, which can be applied to Windows, Linux, and Mac OS.
Download the Python 2.7.x installation package for Windows.
Go to Python official website download page to download Python 2.7.x installation package.
Connect your servers to the Internet.
Install Python according to its installation wizard.
When installing Python, you must enable pip. Otherwise, you cannot use pip to install Alibaba Cloud CLI.
If you have installed pip version 7.x or later, skip to step 3.
If the version of pip installed on your device is too old, the installation of Alibaba Cloud CLI fails. You can use the following command to upgrade pip first.
Run the following command to upgrade pip.
pip install -U pip
If the following information is displayed, pip has been successfully upgraded.
Successfully uninstalled pip-7.1.2
Successfully installed pip-8.1.2
Run the following command to install Alibaba Cloud CLI.
sudo pip install aliyuncli
If the following information is displayed, Alibaba Cloud CLI has been successfully installed.
Successfully installed aliyuncli-2.1.2 colorama-0.3.3 jmespath-0.7.1
Run the following command to install RDS SDK.
sudo pip install aliyun-python-sdk-rds
If the following information is displayed, RDS SDK has been successfully installed.
Successfully installed aliyun-python-sdk-core-2.0.35 aliyun-python-sdk-rds-2.0.3
If your RDS SDK is not the latest version, run the following command to upgrade the existing RDS SDK.
sudo pip install --upgrade aliyun-python-sdk-rds
Run the following command to verify the installation result.
aliyuncli rds help
If the help information is displayed, RDS SDK has been successfully installed.
Note: you can also run the command
aliyuncli rds helpto query other commands, which can be used to verify the configuration.
Create an AccessKey. Log on to the Alibaba Cloud console to create an AccessKey according to the prompts.
Run the following command to configure the global parameters of Alibaba Cloud CLI.
sudo aliyuncli configure
If the following information is displayed, enter the parameters listed.
Aliyun Access Key ID [None]: <Enter Access Key ID>
Aliyun Access Key Secret [None]: <Enter Access Key Secret>
Default Region Id [None]: <Enter the RegionId of your instance, such as **cn-hangzhou**. Run aliyuncli rds DescribeRegions --output table to query the region list.>
Default output format [None]: <Enter your desired output format, json, text or table.>
Run the following command to verify the configuration.
aliyuncli rds DescribeAccounts --DBInstanceId xxxxx
If the information about your instance account is displayed, it indicates that your instance has connected to Alibaba Cloud.