Given a VPC ID, find all gateways attached to it.
I tried to use filters, like these here, but I always get exceptions:
gws = conn.get_all_internet_gateways(filters={'attachments': vpc.id})
gws = conn.get_all_internet_gateways(filters={'InternetGatewayAttachment': vpc.id})
What's the correct filter here?
What are the filters allowed in this context?
The documentation on this topic is pretty scarce.
The AWS documentation for the DescribeInternetGateways request shows the available filters. I think you want:
gws = conn.get_all_internet_gateways(filters={'attachment.vpc-id': vpc.id})
Given a VPC ID, find all gateways attached to it.
I tried to use filters, like these here, but I always get exceptions:
gws = conn.get_all_internet_gateways(filters={'attachments': vpc.id})
gws = conn.get_all_internet_gateways(filters={'InternetGatewayAttachment': vpc.id})
What's the correct filter here?
What are the filters allowed in this context?
The documentation on this topic is pretty scarce.
The AWS documentation for the DescribeInternetGateways request shows the available filters. I think you want:
gws = conn.get_all_internet_gateways(filters={'attachment.vpc-id': vpc.id})
0 commentaires:
Enregistrer un commentaire