テンプレート名
ACS-ECS-ScheduleToCollectInventoryData は、インベントリデータを定期的に収集します。
テンプレートの説明
スケジュールに従ってインベントリデータを収集します。
テンプレートの種類
自動化
所有者
Alibaba Cloud
入力パラメーター
パラメーター | 説明 | 種類 | 必須 | デフォルト値 | 制限 |
linuxOptions | Linux Elastic Compute Service (ECS) インスタンスでインベントリデータを収集するために指定されたオプション。 | String | はい | ||
windowsOptions | Windows ECS インスタンスでインベントリデータを収集するために指定されたオプション。 | String | はい | ||
targets | ターゲットインスタンス | Json | はい | ||
regionId | ECS インスタンスのリージョン ID。 | String | いいえ | {{ ACS::RegionId }} | |
cron | CRON 式。 | String | いいえ | 0 15/30 * ? * * | |
rateControl | タスク実行の同時実行数 | Json | いいえ | {'Mode': 'Concurrency', 'MaxErrors': '100%', 'Concurrency': 20} | |
OOSAssumeRole | CloudOps Orchestration Service (OOS) によって引き受けられる Resource Access Management (RAM) ロール。 | String | いいえ | OOSServiceRole |
出力パラメーター
なし
テンプレートを実行するために必要な権限ポリシー
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:DescribeInvocationResults",
"ecs:DescribeInvocations",
"ecs:RunCommand"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳細
ACS-ECS-ScheduleToCollectInventoryData の詳細
テンプレートの内容
FormatVersion: OOS-2019-06-01
Description:
en: インベントリデータを定期的に収集します
name-en: ACS-ECS-ScheduleToCollectInventoryData
categories:
- time_trigger
Parameters:
regionId:
Type: String
Label:
en: インスタンスのリージョン ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
linuxOptions:
Label:
en: Linux インスタンスからインベントリを収集するためのオプション文字列
Type: String
windowsOptions:
Label:
en: Windows インスタンスからインベントリを収集するためのオプション文字列
Type: String
cron:
Description:
en: '詳細はこちらをご参照ください: https://www.alibabacloud.com/help/document_detail/169784.html'
Label:
en: Cron 式
Type: String
AssociationProperty: Cron
Default: 0 15/30 * ? * *
targets:
Type: Json
Label:
en: ターゲットインスタンス
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: regionId
rateControl:
Label:
en: タスク実行の同時実行レート
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 100%
Concurrency: 20
OOSAssumeRole:
Label:
en: OOS が引き受ける RAM ロール
Type: String
Default: OOSServiceRole
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: timerTrigger
Action: 'ACS::TimerTrigger'
Description:
en: Cron 式を指定してタスクをスケジュールどおりにトリガーします
Properties:
Type: cron
Expression: '{{ cron }}'
EndDate: '2099-01-01T00:00:00Z'
TimeZone: UTC
- Name: getInstance
Description:
en: ECS インスタンスを表示します
Action: 'ACS::SelectTargets'
Properties:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: '{{ regionId }}'
Filters:
- '{{ targets }}'
Outputs:
instanceIds:
Type: List
ValueSelector: 'Instances.Instance[].InstanceId'
- Name: putInventory
Action: 'ACS::ECS::PutInventory'
Description:
en: インベントリデータを収集します
Properties:
regionId: '{{ regionId }}'
instanceId: '{{ ACS::TaskLoopItem }}'
linuxOptions: '{{ linuxOptions }}'
windowsOptions: '{{ windowsOptions }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ getInstance.instanceIds }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- cron
Label:
default:
en: タイマートリガー設定
- Parameters:
- linuxOptions
- windowsOptions
Label:
default:
en: パラメーター設定
- Parameters:
- regionId
- targets
Label:
default:
en: インスタンスの選択
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
en: 制御オプション