AWS Cli通过 InstanceId 获取所在可用区
aws ec2 describe-instances --instance-ids i-08a1e521a56cc1879 |jq '.Reservations[0].Instances[0].Placement.AvailabilityZone' |sed "s/\"//g"|sed "s/\n//g"
参考:https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_DescribeInstances.html
参考:https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-instances.html
根据可用区进行灰度发布配置:
版权声明:
作者:Joe.Ye
链接:https://www.appblog.cn/index.php/2023/03/28/aws-cli-obtains-the-available-zone-through-instanceid/
来源:APP全栈技术分享
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
打赏
海报
AWS Cli通过 InstanceId 获取所在可用区
aws ec2 describe-instances --instance-ids i-08a1e521a56cc1879 |jq '.Reservations[0].Instances[0].Placement.AvailabilityZone' |sed "s/……
文章目录
关闭
共有 0 条评论