collection.dockerfile/alpine/aliyuncli
2022-01-17 15:56:05 +08:00
..
Dockerfile first commit 2022-01-17 15:56:05 +08:00
ec2-matching.sh first commit 2022-01-17 15:56:05 +08:00
get-instances.sh first commit 2022-01-17 15:56:05 +08:00
README.md first commit 2022-01-17 15:56:05 +08:00

Authentication

$ aliyuncli  configure
Aliyun Access Key ID [None]: 
Aliyun Access Key Secret [None]: 
Default Region Id [None]: cn-hongkong
Default output format [None]: 

Sample usage

/root/get-instances.sh

More aliyuncli usage

aliyuncli  ecs DescribeInstances --MaxResults 100 | jq -cr '.Instances.Instance[] | [.InstanceName,.InstanceType,.CpuOptions.CoreCount,.Memory,.OSType,.InstanceId,.OSNameEn,.ZoneId] | @csv'
aliyuncli  ecs DescribeDisks --MaxResults 200 | jq -cr '.Disks.Disk[] | [.InstanceId, .Size, .ZoneId] | @csv'