You can call Alibaba Cloud APIs directly in Cloud Shell to manage your cloud resources.
Step 1: Start Cloud Shell
You can start Cloud Shell in one of the following ways:
In the console
Click the command line button in the top navigation bar of the console home page to start Cloud Shell.
As a standalone application
In a browser, open https://shell.aliyun.com to start the Cloud Shell interface.
You can open up to five Cloud Shell windows at the same time.
When you connect to Cloud Shell for the first time, a virtual machine (VM) is created. This process can take up to 40 s. If you open multiple Cloud Shell windows, they all connect to the same VM. Opening additional windows does not create more VMs.
Step 2: Use CLI commands to manage cloud resources
You can use Alibaba Cloud command-line interface (CLI) commands in Cloud Shell to manage your cloud resources.
To call Remote Procedure Call (RPC) APIs in Cloud Shell, use the following format:
aliyun <ProductCode> <ActionName> [--parameter1 value1 --parameter2 value2]Where:
ProductCode: The code of the cloud product. For example, the product code for Elastic Compute Service (ECS) is
ecs, and the product code for Server Load Balancer (SLB) isslb. Run thealiyun --helpcommand to view product codes.ActionName: The name of the API to call. For example, you can call the
DescribeInstanceAttributeAPI of ECS to view the details of an ECS instance.parameter: The request parameters. For more information, see the API documentation for each product.
(Optional) Step 3: View help
You can run the following commands to view help information:
In Cloud Shell, run the following command to view help information for a cloud product.
aliyun <ProductCode> --helpExample
Run the following command to view the API list for ECS:
aliyun ecs --helpIn Cloud Shell, run the following command to view help for a specific API:
aliyun <ProductCode> <ApiName> --helpExample
Run the following command to view the help information for the
DescribeInstanceAttributeECS API:aliyun ecs DescribeInstanceAttribute --help