You can directly call Alibaba Cloud Open APIs in the Cloud Shell to manage cloud resources.

Step 1: Start Cloud Shell

Choose one of the following method to start Cloud Shell

  • Start from Alibaba Cloud console

    Click the Cloud Shell icon in the top menu of the Alibaba Cloud console to start Cloud Shell.

  • Start from web browser

    Enter https://shell.aliyun.com in a web browser or open Cloud Shell from the OpenAPI Explorer.

    You can start multiple Cloud Shell windows as needed, but up to 5 Cloud Shell windows can be started at the same time.

Note When you first connect to the Cloud Shell, a new VM will be created for you. This operation takes some time, but does not take longer than 40 seconds. When multiple Cloud Shell windows are opened, all windows are connected to the same virtual machine. The number of virtual machines does not increase when you open a new Cloud Shell window.

Step 2. Use CLI to manage cloud resources

You can use CLI commands to manage cloud resources in the Cloud Shell.

Use the following syntax to call an RPC API in the Cloud Shell:

aliyun <ProductCode> <ActionName> [--parameter1 value1 --paramter2 value2]

where:

  • ProductCode: the code of the product to call. For example, the code of ECS is ecs, and the code of Server Load Balancer is slb. You can run the aliyun --help command to get product codes.

  • ActionName: the API to call. For example, call the DescribeInstanceAttribute API to get the detailed configurations of an ECS instance.

  • parameter: the required parameters. Refer to the API documentation of each product.

(Optional) Step 3: Get help

You can run the help command to get help information.

  • Run the following command in the Cloud Shell to get the help information of a specific product.
    aliyun <ProductCode> --help

    Example

    Run the following command in the Cloud Shell to get the list of APIs of ECS.

    aliyun ecs --help
  • Run the following command in the Cloud Shell to get the help information of a specific API:

    aliyun <ProductCode> <ApiName> --help

    Example

    Run the following command to get the help information of the DescribeInstanceAttribute API:

    aliyun ecs DescribeInstanceAttribute --help