ASG tags:修订历史

跳转到导航 跳转到搜索

差异选择:选中要对比的修订的单选按钮,然后按Enter键或下面的按钮。
说明:(当前)=与最后修订的差异,(之前)=与上个修订的差异,=小编辑。

2026年4月15日 (星期三)

  • 当前之前 14:232026年4月15日 (三) 14:23 Evan 留言 贡献 2,929字节 +2,929 创建页面,内容为“<pre> import boto3 from datetime import datetime autoscaling = boto3.client('autoscaling') # ===== 配置区 ===== ASG_NAMES = [ 'asg-prod-web', 'asg-prod-api', 'asg-canary' ] TAG_KEY = 'DailyTag' TAG_VALUE = datetime.now().strftime('%Y-%m-%d') # PROPAGATE_AT_LAUNCH = True def get_asg_tag(asg_name, key): """获取 ASG 当前 Tag 值""" try: response = autoscaling.describe_auto_scaling_groups( AutoScalingGroupName…”