Created
March 1, 2016 10:33
-
-
Save PercussiveRepair/86f9696af2273b403b62 to your computer and use it in GitHub Desktop.
boto3 describe_auto_scaling_groups with full results
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_asgs( key = None, secret = None ): | |
""" get autoscaling groups """ | |
boto3.setup_default_session( region_name='eu-west-1', aws_access_key_id=key, aws_secret_access_key=secret ) | |
client = boto3.client('autoscaling') | |
paginator = client.get_paginator('describe_auto_scaling_groups') | |
groups = paginator.paginate().build_full_result() | |
return groups['AutoScalingGroups'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment