Home > Blockchain >  aws describe volume and query multiple tags
aws describe volume and query multiple tags

Time:11-06

I am trying to query on a single aws ebs volume from clifor multiple tags of specific volume. How can I frame cli to query multiple tags of specific ebs volume?

aws ec2 describe-volumes --volume-ids vol-12345 --query 'Volumes[].Tags[?Key==`InstanceName`].[?Key==`TeamOwner`]'

CodePudding user response:

You can get two tags as follows:

aws ec2 describe-volumes --volume-ids vol-12345 --query 'Volumes[].[Tags[?Key==`InstanceName`],Tags[?Key==`TeamOwner`]]' --output text
  • Related