You can directly call Alibaba Cloud API operations in Cloud Shell to manage cloud resources.
Step 1: Start Cloud Shell
To start Cloud Shell, use one of the following methods:
Start Cloud Shell in the Alibaba Cloud Management Console
In the Alibaba Cloud Management Console, click the Cloud Shell icon in the top navigation bar.
Start Cloud Shell as a standalone application
Enter https://shell.aliyun.com in the address bar of a browser.
You can open up to five Cloud Shell windows at the same time.
Step 2: Use Alibaba Cloud CLI to manage Alibaba Cloud resources
You can run commands on the Alibaba Cloud command-line interface (CLI) in Cloud Shell to manage your Alibaba Cloud resources.
Run commands in the following syntax to call Remote Procedure Call (RPC) API operations in Cloud Shell:
aliyun <ProductCode> <ActionName> [--parameter1 value1 --paramter2 value2]
In the command syntax:
ProductCode: specifies the code of the Alibaba Cloud service whose operation you want to call. Examples:
ecsfor Elastic Compute Service (ECS) and
slbfor Server Load Balancer (SLB). You can run the
aliyun --helpcommand to view the code of an Alibaba Cloud service.
ActionName: specifies the name of the API operation that you want to call. For example, you can call an ECS API operation named
DescribeInstanceAttributeto view the details of an ECS instance.
parameter: specifies the request parameters. For more information, see the API reference of each Alibaba Cloud service.
Step 3: (Optional) Obtain help information
You can run the related commands to view help information.
- Run the following command in Cloud Shell to view the help information about a cloud service:
aliyun <ProductCode> --help
Run the following command to view ECS API operations:
aliyun ecs --help
Run the following command in Cloud Shell to view the help information about an API operation:
aliyun <ProductCode> <ApiName> --help
Run the following command to view the help information about the ECS API operation named
aliyun ecs DescribeInstanceAttribute --help