aws 获取资源列表

aws 命令

 

aws ec2 describe-instances --region=ap-northeast-1 --filter "Name=instance-state-name,Values=running" | jq -r '.Reservations[].Instances[]|{PrivateIpAddress, InstanceType, Zone: .Placement.AvailabilityZone, State: .State.Name, KeyName, TagName: .Tags|map(select(.Key == "Name"))[0]|.Value}|@text "\(.PrivateIpAddress)\t\(.TagName)\t\(.InstanceType)\t\(.State)"'

 

aws rds describe-db-instances --region=ap-northeast-1 |jq -r '.DBInstances[] |{DBInstanceIdentifier,DBInstanceClass,MultiAZ,AllocatedStorage}|@text "\(.DBInstanceIdentifier)\t\(.DBInstanceClass)\t\(.MultiAZ)\t\(.AllocatedStorage)"'

上一篇:前端学习(408):京东制作页面16小导航栏上


下一篇:Java Comment