aliyun cli
2024-08-16阿里云CLI(Alibaba Cloud Command Line Interface)是基于OpenAPI建立的通用命令行工具,您可以借助阿里云CLI实现与阿里云产品的交互,在Shell工具中管理您的阿里云产品。
1、wget -c https://aliyuncli.alicdn.com/aliyun-cli-linux-latest-amd64.tgz
tar zxf aliyun-cli-linux-latest-amd64.tgz -O /usr/local/bin
-rwxr-xr-x 1 1001 127 57035137 Aug 15 17:10 aliyun
2、aliyun
aliyun bssopenapi QueryAccountBalance --region cn-beijing
aliyun configure -profile qd
aliyun configure list
3、
aliyun ecs DescribeInstances --region cn-beijing --RegionId 'cn-beijing' --PageSize=50
4、
aliyun ecs DescribeInstances --output cols=InstanceId,InstanceName,NetworkInterfaces:PrimaryIpAddress,CreationTime rows=Instances.Instance[]
5、
6、aliyun ecs DescribeInstanceStatus --profile ${profile} --region $region --PageSize 50
7、aliyun ecs DescribeInstances --profile ${profile} --region $region --PrivateIpAddresses "['${ip}']"
8、
aliyun ecs StartInstance --profile ${pro} --region ${region} --InstanceId "${id}"
aliyun ecs StopInstance --profile ${pro} --region ${region} --InstanceId "${id}"
9、
aliyun ecs RebootInstances --profile ${pro} --region ${region} --InstanceId.1 "${id}" --ForceReboot true
aliyun ecs RebootInstance --profile ${pro} --region ${region} --InstanceId "${id}" --ForceStop true
10、
https://help.aliyun.com/zh/cli/configure-alibaba-cloud-cli/?spm=api-workbench.api_explorer.0.0.17102a17qRZQMk