list-security-groups.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:traffic-map 作者: leighklotz 项目源码 文件源码
def main():
    for region in boto.ec2.regions():
        ec2 = region.connect()
        if ec2 is not None:
            try:
                reservations = ec2.get_all_instances()
            except boto.exception.EC2ResponseError:
                reservations = []
            for reservation in reservations:
                for i in reservation.instances:
                    print(region.name, get_name(i), ",".join([r.name for r in i.groups]))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号