我想打印附加到负载均衡器的实例的状态(InService/OutOfService)。我如何使用Boto3实现这一目标。我附上了截图,以指定我需要打印的内容。提前谢谢。

发布于 2018-03-29 10:19:39
健康 -描述与指定负载均衡器相关的指定实例的状态。
import boto3
client = boto3.client("elb")
response = client.describe_instance_health(LoadBalancerName='testname')
for instance in response['InstanceStates']:
print(instance['InstanceId'],instance['State'])https://stackoverflow.com/questions/49552908
复制相似问题