json - Enumerating aws tags with aws cli -


I was thinking that I can add a tag to my AWS machines, for example

Key: Backup Value: 00 04 * * *

And after that it is used to schedule volume snapshots at our time from our management server. So far I am struggling with jmespath stuff, and I can not seem to get my head around json path clearance syntax:

  aws ec2 description-example --query 'reservation [] Example [] key [= 'backup'] '[[], [], [], [], [{"value": "00 04 * * *", "key": "backup"}], [], []]  

I can use some help to remove the following two values, provided the backup tag is defined for example.

Instant, the value of the backup key

Just try to question tags Specify that you only want the tag, for example, and you want to have the value of the "key" field "Backup" (example below)

  aws ec2 description-tags - -query "tag [*]. {Backup: value, inst. Id: resource id}" - filter "name = resource-type, value = example" -filter "name = key, value = backup" - output table < / Code> 

(Output results in this example is a table to look simple, but you can change it in json or text as needed.)


Comments

Popular posts from this blog

sqlite3 - UPDATE a table from the SELECT of another one -

c# - Showing a SelectedItem's Property -

javascript - Render HTML after each iteration in loop -