テンプレート名
ACS-ECS-BulkyRenewInstances:インスタンスのバッチ更新
テンプレートの説明
複数のサブスクリプション Elastic Compute Service(ECS)インスタンスを一度に更新します。
テンプレートタイプ
自動化
所有者
Alibaba Cloud
入力パラメーター
パラメーター | 説明 | タイプ | 必須 | デフォルト値 | 制限 |
targets | ターゲットインスタンス | Json | はい | ||
regionId | リージョン ID。 | String | いいえ | {{ ACS::RegionId }} | |
periodUnit | 更新後の ECS インスタンスのサブスクリプション期間の単位。 | String | いいえ | Month | |
period | サブスクリプションインスタンスの更新期間。 | Number | いいえ | 1 | |
rateControl | タスク実行の同時実行数 | Json | いいえ | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | CloudOps Orchestration Service(OOS)が担う Resource Access Management(RAM)ロール。 | String | いいえ | "" |
出力パラメーター
なし
テンプレートを実行するために必要な権限ポリシー
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:RenewInstance"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳細
ACS-ECS-BulkyRenewInstances: 詳細
テンプレートコンテンツ
FormatVersion: OOS-2019-06-01
Description:
en: Batch renews subscription ECS instances.
ja: サブスクリプション方式の ECS インスタンスをバッチで更新します。
name-en: Batch Renew Instances
name-ja: インスタンスのバッチ更新
categories:
- instance_manage
- application_manage
Parameters:
regionId:
Type: String
Label:
en: Region ID
ja: リージョン ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
targets:
Type: Json
Label:
en: Target Instances
ja: ターゲットインスタンス
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: regionId
periodUnit:
Description:
en: 'The unit of the renewal period. Valid values when set to Week: 1 to 4. Valid values when set to Month: 1 to 12, 24, 36, 48, and 60.'
ja: '更新期間の単位。Week に設定した場合の有効値は 1~4 です。Month に設定した場合の有効値は 1~12、24、36、48、60 です。'
Label:
en: Period Unit
ja: 期間単位
Type: String
AssociationPropertyMetadata:
LocaleKey: PricingCycle
AllowedValues:
- Week
- Month
Default: Month
period:
Label:
en: Renewal Period
ja: 更新期間
Type: Number
Default: 1
MinValue: 1
MaxValue: 60
rateControl:
Label:
en: Rate Control
ja: レート制御
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOS Assume Role
ja: OOS 偽装ロール
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
Description:
en: Gets the specified ECS instances.
ja: 指定された ECS インスタンスを取得します。
Action: 'ACS::SelectTargets'
Properties:
ResourceType: 'ALIYUN::ECS::Instance'
Filters:
- '{{ targets }}'
- Name: renewInstance
Action: 'ACS::ExecuteAPI'
Description:
en: Renews an ECS instance based on its instance ID.
ja: インスタンス ID に基づいて ECS インスタンスを更新します。
Properties:
Service: ECS
API: RenewInstance
Parameters:
RegionId: '{{regionId}}'
InstanceId: '{{ ACS::TaskLoopItem }}'
Period: '{{ period }}'
PeriodUnit: '{{ periodUnit }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ getInstance.Instances.Instance[].InstanceId }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- periodUnit
- period
Label:
default:
en: Configure Parameters
ja: パラメーターの設定
- Parameters:
- regionId
- targets
Label:
default:
en: Select ECS Instances
ja: ECS インスタンスの選択
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
en: Advanced Options
ja: 詳細オプション