Last active
January 1, 2016 10:09
-
-
Save siroken3/8129285 to your computer and use it in GitHub Desktop.
awscli+jqによる指定したインスタンスIDのタグ名の値を取得する
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| aws ec2 describe-instances | ¥ | |
| jq -r '.Reservations[].Instances[] | select(.InstanceId == "インスタンスID") | .Tags[] | select (.Key == "タグ名") | .Value' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment