【问题标题】:listing inbounds for a security group of AWS EC2 inctances using Python boto使用 Python boto 列出 AWS EC2 安全组的入站
【发布时间】:2014-01-24 22:11:17
【问题描述】:

我可以使用 get_all_security_groups() 列出所有安全组

我还可以列出安全组的入站规则。但我还想查看使用 boto 的规则(入站规则)的来源。

我试图在 google 上查找,但找不到任何方法来查看入站规则的来源。

如果有人知道,请分享

【问题讨论】:

    标签: python amazon-web-services boto


    【解决方案1】:

    终于解决了

     for group in self.conn.get_all_security_groups():
            for rule in group.rules:
                print dir(rule)
    
                for grant in rule.grants:
                    print dir(grant)
    

    感谢 boto 用户邮件列表

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-20
      • 2014-09-08
      • 1970-01-01
      • 2015-04-28
      • 2021-01-04
      • 2021-04-06
      • 2019-12-14
      • 2016-07-15
      相关资源
      最近更新 更多