python - 使用 boto3 检索具有自动缩放设置的 EMR 集群列表
问题描述
在 aws lambda 中使用 emr boto3 是否可以检索具有自动缩放参数设置的集群列表?如果可能,那么应该从此链接使用哪个 boto3 客户端。 https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/emr.html#client
解决方案
Autoscaling is set on instance groups, not on clusters.
If you want to see all the instance groups' autoscaling policies, you will first need to get the list of all clusters and then get the instance groups of each cluster.
Notice that in the response to get_instance_groups
, you get the AutoScalingPolicy
value.
推荐阅读
- javascript - 数组长度为 1 但数组 [0] 在 JavaScript 中未定义,为什么?
- java - rabbitmq,Java 客户端通过 SSL 工作,但 .NET 不支持
- javascript - 在 JavaScript 中获取循环的所有数据
- php - 如何从数组中获取数值?
- python - python 3.6 json.dumps ValueError 使用 allow_nan=True
- python - 我想在 python 中使用 matplot 绘制泰勒级数
- cdn - 使用 robots.txt 文件阻止除图像之外的所有内容
- codeigniter - 如何使用 2 个参数重定向到文件夹 CI 中不同控制器的方法?
- mysql - 如何在我的新列 VB.NET 上添加自动递增编号
- android - Android Studio,一些选项,如“打开现有的 android studio 项目”没有显示并且无法正常启动新项目