[英]TypeError: string indices must be integers describe_vpc_endpoints boto3
[英]boto3 describe VPC connections - where is the region?
我正在尋找對所有我的VPC創建“拓撲”的方法。 本質上,我有一個“原始” vpc,並且從它們中查詢所有對等點,以查看其區域,子網,對等點ID等。但是,當我查詢對等連接時,我無法保證我得到每個“接受者”的區域! 我目前的方法:
connections = (self.client.describe_vpc_peering_connections())["VpcPeeringConnections"]
我如何獲得這些連接的區域?
試試這個: connections['VpcPeeringConnections']['RequesterVpcInfo']['Region']
參考: EC2客戶端文檔
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.