samedi 12 avril 2014

python - boto AWS : Comment obtenir une liste de toutes les passerelles Internet attaché à un VPC - Stack Overflow


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})

Related Posts:

0 commentaires:

Enregistrer un commentaire