By Justin Cook and Pablo Puig
Before we can begin, we must understand what Alibaba Cloud Cloud Shell is and how it is integrated into the Alibaba Cloud ecosystem. This administration tool is a web-based command line interface that allows users to manage all Alibaba Cloud resources. When you open Cloud Shell, you will get a Linux machine allocated behind the scenes by Alibaba Cloud free of charge. The Linux box is pre-installed with all the necessary packages, including CLI, SSH, VIM, Terraform, and numerous management tools, to communicate with Alibaba Cloud resources and execute maintenance tasks across your entire cloud landscape.
Cloud Shell is user-specific, meaning it adheres to security control policies for permissions of each session and the session's connection to resources. You can also maintain multiple sessions simultaneously to run commands in tandem. You can use the CLI to call cloud service APIs. You can also upload a script to call multiple APIs.
The following step-by-step guide explains how to use Cloud Shell on Alibaba Cloud.
Cloud Shell provides multiple configurations and features you can use to adjust to your convenience. We will explain the most important ones.
You can restart your terminal with just one click:
Adjust the text size and font with your preferred configuration:
You can download and upload your code:
Each VM is given 10GB of temporary storage space allocated to the Linux instance upon creation/login. This is wiped when the instance is deleted. You can mount a File Storage or mount an existing drive if you need more space or want a more permanent storage model.
If you would like to learn more about Cloud Shell, you can run the command help
:
If you would like to learn more about the Alibaba Cloud Command Line Interface (CLI), you can run the command aliyun
:
Cloud Shell logs out automatically after 30 minutes of inactivity, so please pay attention to your session time. You can exit by typing exit or closing the browser, but the VM is released after you log out after 15 minutes. After that time, if you log back in, you will get a new VM.
The Alibaba Cloud product APIs are divided into RPC API and RESTful API.
Use the following syntax to call an RPC API in the Cloud Shell:
aliyun <product> <ApiName> [--parameter1 value1 --parameter2 value2 ...]
Example: Describe an attribute of a specific RDS instance
aliyun rds DescribeDBInstanceAttribute --DBInstanceId xxxxxx
The calling method of RESTful APIs is different from RPC APIs. The request structure when calling RESTful APIs in the Cloud Shell is listed below:
aliyun <product> [GET|PUT|POST|DELETE] <path>
The GET method request structure is listed below:
aliyun <ProductCode> GET /<Resource>
Example: Reading clusters of a Container Service
aliyun cs GET /clusters
The POST method request structure is listed below:
aliyun <ProductCode> POST /<Resource> --body "$(cat input.json)"
Example: Uploading a JSON file to a cluster of a Container Service
aliyun cs POST /clusters/ce2cdc26227e09c864d0ca0b2d5/attach --header "Content-Type=application/json" --body "$(cat attach.json)"
The DELETE method request structure is listed below:
aliyun <ProductCode> DELETE /<Resource>
Example: Deleting a cluster of a Container Service
aliyun cs DELETE /clusters/ce2cdc26227e09c864d0ca0b2d5
Accelerating the Salesforce Experience Cloud in China with Alibaba Cloud GA
1,076 posts | 263 followers
Followafzaalvirgoboy - December 26, 2019
PM - C2C_Yuan - May 20, 2024
Alibaba Clouder - December 29, 2018
Jincheng Liu - July 6, 2018
Alibaba Cloud Community - June 6, 2022
Alibaba Cloud Community - February 23, 2022
1,076 posts | 263 followers
FollowA Web browser-based admin tool that allows you to use command line tools to manage Alibaba Cloud resources.
Learn MoreOrganize and manage your resources in a hierarchical manner by using resource directories, folders, accounts, and resource groups.
Learn MoreSecure your cloud resources with Resource Access Management to define fine-grained access permissions for users and groups
Learn MoreAccelerate and secure the development, deployment, and management of containerized applications cost-effectively.
Learn MoreMore Posts by Alibaba Cloud Community