これはWhat is the correct syntax for filtering by tag in describe-vpcs?からの質問の続きです。.
提供された回答を使用し、http://docs.aws.amazon.com/cli/latest/reference/ec2/describe-security-groups.htmlを参照します。
--filters (list)
One or more filters.
......
vpc-id - The ID of the VPC specified when the security group was created.
CLIリクエストを作成しました
aws --profile myProfile --region eu-west-1 ec2 describe-security-groups --group-name MyVpcSecGroup --filters Name=tag:vpc-id,Values=vpc-9xxxxxxx
ただし、エラーが発生します
セキュリティ グループ「MyVpcSecGroup」はデフォルト VPC「vpc-bxxxxxx」に存在しません
では、vpc-id などの --filters のリストを使用して、デフォルト以外の VPC でセキュリティ グループを検索する構文をフォーマットするにはどうすればよいでしょうか?
thxアート