All Products
Search
Document Center

:Use Cloud Shell

Last Updated:Jun 24, 2024

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.alibabacloud.com in the address bar of a browser.

    You can open up to five Cloud Shell windows at the same time.

Note

When you connect to Cloud Shell for the first time, a virtual machine (VM) is created. The creation process takes at most 40 seconds. If you open multiple Cloud Shell windows, all the windows are connected to the same VM. The number of VMs does not increase when you open a new Cloud Shell window.

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 --parameter2 value2]

In the command syntax:

  • ProductCode: specifies the code of the Alibaba Cloud service whose operation you want to call. Examples: ecs for Elastic Compute Service (ECS) and slb for Server Load Balancer (SLB). You can run the aliyun --help command 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 DescribeInstanceAttribute to 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

    Example

    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

    Example

    Run the following command to view the help information about the ECS API operation named DescribeInstanceAttribute:

    aliyun ecs DescribeInstanceAttribute --help