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

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -