【问题标题】:How can I get EBS volume type with python boto?如何使用 python boto 获取 EBS 卷类型?
【发布时间】:2017-02-28 07:44:49
【问题描述】:

我开始在 python 中编写简单的 nagios 检查来监控 EBS gp2 卷上的“突发平衡”。我想跳过使用预置 IOPS (io1) 检查卷

我可以通过aws ec2 describe-volumes获取此信息。

如何在 python 中使用 boto 检查卷类型?

【问题讨论】:

    标签: python amazon-web-services boto


    【解决方案1】:

    boto3describe_volumes() 调用返回卷类型:

    'VolumeType': 'standard'|'io1'|'gp2'|'sc1'|'st1'
    

    我在boto 中找不到等效项,但可能是时候转到boto3 了。如果需要,您可以在同一个应用程序中同时使用它们,只需 import boto3 并并行使用即可。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-01-18
      • 1970-01-01
      • 1970-01-01
      • 2021-12-18
      • 2011-07-12
      • 1970-01-01
      相关资源
      最近更新 更多