amazon web services - AWS CLI --query to select tag by value -
there lot of topics this, still have problem query.
i used:
aws rds list-tags-for-resource --resource-name arn:aws:rds:eu-west-:xxxxx --query 'taglist[*]'
output:
{ "value": "test@test", "key": "owner" }, { "value": "xxxx", "key": "schedule" }
i need display xxxx value. tried:
aws rds list-tags-for-resource --resource-name arn:aws:rds:eu-west-1:xxxxx --query 'taglist[].tags[?key==`schedule`].value[]' --output text
but not work.
give try this:
aws rds list-tags-for-resource --resource-name arn:aws:rds:eu-west-:xxxxx --query "taglist[?key=='schedule'].value[]"
also, may want use jq:
aws rds list-tags-for-resource --resource-name arn:aws:rds: | jq ".taglist[].value"
Comments
Post a Comment