テンプレート名
ACS-ESS-EnableInstanceHealthCheck
テンプレートの説明
スケーリンググループの Elastic Compute Service (ECS) インスタンスのヘルスチェック機能を有効にします。
テンプレートの種類
自動
所有者
Alibaba Cloud
入力パラメーター
パラメーター | 説明 | 種類 | 必須 | デフォルト値 | 制限 |
scalingGroupId | 変更するスケーリンググループの ID。 | String | はい | ||
regionId | リージョン ID。 | String | いいえ | {{ ACS::RegionId }} | |
OOSAssumeRole | CloudOps Orchestration Service (OOS) によって引き受けられる Resource Access Management (RAM) ロール。 | String | いいえ | " " |
出力パラメーター
なし
テンプレートを実行するために必要なポリシー
{
"Version": "1",
"Statement": [
{
"Action": [
"ess:DescribeScalingGroups",
"ess:ModifyScalingGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
参照
ACS-ESS-EnableInstanceHealthCheck
テンプレートの内容
FormatVersion: OOS-2019-06-01
Description:
en: Enables health checks for ECS instances in the scaling group
zh-cn: 开启ESS伸缩组中的ECS实例的健康检查
name-en: ACS-ESS-EnableInstanceHealthCheck
name-zh-cn: 开启ESS伸缩组中的ECS实例的健康检查
categories:
- elastic_manage
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: 地域ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
scalingGroupId:
Label:
en: ScalingGroupId
zh-cn: 待修改伸缩组的ID
Type: String
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: checkForScalingGroupAvalible
Action: 'ACS::CheckFor'
Description:
en: Check weather the Scaling Group is avaliable
zh-cn: 检查伸缩组状态是否可用
Properties:
Service: ESS
API: DescribeScalingGroups
Parameters:
RegionId: '{{ regionId }}'
ScalingGroupId1: '{{ scalingGroupId }}'
DesiredValues:
- Active
- Inactive
PropertySelector: ScalingGroups.ScalingGroup[].LifecycleState
- Name: modifyScalingGroup
Action: 'ACS::ExecuteAPI'
Description:
en: Modify the health check status of the ECS flex group
zh-cn: 修改ECS伸缩组的健康检查状态
Properties:
Service: ESS
API: ModifyScalingGroup
Parameters:
RegionId: '{{ regionId }}'
ScalingGroupId: '{{ scalingGroupId }}'
HealthCheckType: 'ECS'