简体   繁体   中英

How to check an ELB is associated with any autoscaling group using Boto3

How can I check whether an AWS Elastic Load Balancer, Application Load Balancer or Network Load Balancer is associated with any Auto-Scaling group by passing the Load Balancer name or Load Balancer ARN using Boto3?

The describe_auto_scaling_groups() command returns a list of LoadBalancerNames .

Therefore, you will need to:

  • Call describe_auto_scaling_groups() to obtain a list of Auto Scaling groups
  • Loop through each returned group and look at the LoadBalancerNames list
  • Compare the entries with your Load Balancer name of interest

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM