Nama templat
Menjalankan perintah Cloud Assistant secara batch pada instance Elastic Compute Service (ECS) di beberapa wilayah.
Deskripsi
Menjalankan perintah Cloud Assistant secara batch pada instance ECS di berbagai wilayah.
Jenis templat
Automation
Pemilik
Alibaba Cloud
Parameter input
|
Nama parameter |
Deskripsi |
Tipe |
Wajib |
Nilai default |
Batasan |
|
instanceInfos |
Instance ECS tempat perintah akan dijalankan. |
List |
No |
[] |
|
|
commandType |
Tipe perintah Cloud Assistant. |
String |
No |
RunShellScript |
|
|
commandContent |
Perintah yang akan dijalankan pada instance ECS. |
String |
No |
echo hello |
|
|
timeout |
Periode timeout untuk eksekusi perintah. Satuan: detik. |
Number |
No |
600 |
|
|
rateControl |
Laju konkurensi untuk eksekusi tugas. |
Json |
No |
{‘Mode’: ‘Concurrency’, ‘MaxErrors’: 0, ‘Concurrency’: 10} |
|
|
OOSAssumeRole |
Peran RAM yang akan diasumsikan oleh OOS. |
String |
No |
“” |
Parameter output
|
Nama parameter |
Deskripsi |
Tipe |
|
commandOutputs |
List |
Kebijakan akses yang diperlukan
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInvocationResults",
"ecs:DescribeInvocations",
"ecs:RunCommand"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Detail
Detail untuk ACS-ECS-BulkyRunCommandAcrossRegions
Konten templat
FormatVersion: OOS-2019-06-01
Description:
en: Bulky run command on ECS instances across multiple regions
name-en: ACS-ECS-BulkyRunCommandAcrossRegions
categories:
- run_command
Parameters:
instanceInfos:
Description:
en: 'Format: {"regionId": "cn-xxx", "instanceId": "i-xxx"}'
Label:
en: InstanceInfos
Type: List
Default: []
commandType:
Label:
en: CommandType
Type: String
AllowedValues:
- RunBatScript
- RunPowerShellScript
- RunShellScript
Default: RunShellScript
commandContent:
Label:
en: CommandContent
Type: String
AssociationProperty: Code
Default: echo hello
timeout:
Label:
en: Timeout
Type: Number
Default: 600
rateControl:
Label:
en: RateControl
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: runCommand
Action: ACS::ECS::RunCommand
Description:
en: Execute cloud assistant command
Properties:
regionId:
'Fn::Select':
- regionId
- '{{ ACS::TaskLoopItem }}'
instanceId:
'Fn::Select':
- instanceId
- '{{ ACS::TaskLoopItem }}'
commandContent: '{{ commandContent }}'
commandType: '{{ commandType }}'
timeout: '{{ timeout }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ instanceInfos }}'
Outputs:
commandOutputs:
AggregateType: Fn::ListJoin
AggregateField: commandOutput
Outputs:
commandOutput:
Type: String
ValueSelector: invocationOutput
Outputs:
commandOutputs:
Type: List
Value: '{{ runCommand.commandOutputs }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- instanceInfos
- commandType
- commandContent
- timeout
Label:
default:
en: Configure Parameters
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
en: Control Options