collection.dockerfile/alpine/aliyuncli/README.md
2022-01-17 15:56:05 +08:00

18 lines
552 B
Markdown

# 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'
```