def connect(self, autoscaling_client=None, ec2=None, ec2_client=None):
""" Opens connections to AWS, specifically the autoscaling client and
EC2 client and resource.
Args:
autoscaling_client: Override the autoscaling client.
ec2: Override the EC2 resource.
ec2_client: Override the EC2 client.
"""
print('Connecting to AWS...')
self._as_client = autoscaling_client or boto3.client('autoscaling')
self._asg_paginator = self._as_client.get_paginator(
'describe_auto_scaling_groups')
self._ec2 = ec2 or boto3.resource('ec2')
self._ec2_client = ec2_client or boto3.client('ec2')
asg_rolling_upgrade.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录