Amazon web services AWS CLI命令以表格/文本格式获取AMI的图像大小
我正在运行此AWS CLI命令以获取AMI ID及其ImageSize的列表,但无法列出ImageSize并将其显示为单独的列Amazon web services AWS CLI命令以表格/文本格式获取AMI的图像大小,amazon-web-services,aws-cli,snapshot,amazon-ami,image-size,Amazon Web Services,Aws Cli,Snapshot,Amazon Ami,Image Size,我正在运行此AWS CLI命令以获取AMI ID及其ImageSize的列表,但无法列出ImageSize并将其显示为单独的列 aws ec2 describe-images --owners self --region us-east-1 --profile prod --query 'Images[*].[Name,ImageId,VolumeSize,Description,ImageLocation,OwnerId,Public,State,CreationDate,Platform,
aws ec2 describe-images --owners self --region us-east-1 --profile prod
--query 'Images[*].[Name,ImageId,VolumeSize,Description,ImageLocation,OwnerId,Public,State,CreationDate,Platform,RootDeviceType,VirtualizationType,Tags[?Key==`System`]|[0].Value,Tags[?Key==`SubSystem`]|[0].Value,BlockDeviceMappings[]|[].Ebs.VolumeSize]'
--output text
有人能在这里帮助我吗?这样我就可以在我的表格中有这些部分,如我的示例图片所示:
根据aws ec2描述图像的CLI命令不返回ImageSize
。但是,它返回BlockDeviceMappings[*].Ebs.VolumeSize
,您已经在查询中检索到了它