[英]boto3 describe VPC connections - where is the region?
I am looking to create a 'topology' of all my VPC's which are peered. 我正在寻找对所有我的VPC创建“拓扑”的方法。 In essence, I have an 'origin' vpc, and from their, I am querying all the peers to see their zones, subnets, peer ids, etc... However, when I query the peered connections, I cannot for the life of me get the region of each 'accepter'!
本质上,我有一个“原始” vpc,并且从它们中查询所有对等点,以查看其区域,子网,对等点ID等。但是,当我查询对等连接时,我无法保证我得到每个“接受者”的区域! My current method:
我目前的方法:
connections = (self.client.describe_vpc_peering_connections())["VpcPeeringConnections"]
How do I get the region for these connections? 我如何获得这些连接的区域?
Try this: connections['VpcPeeringConnections']['RequesterVpcInfo']['Region']
试试这个:
connections['VpcPeeringConnections']['RequesterVpcInfo']['Region']
Refernce: EC2 Client documentation 参考: EC2客户端文档
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.