Template name
ACS-ECD-BulkyRunCommand
Template description
Runs a command on multiple cloud desktops at a time.
Template type
Automated
Owner
Alibaba Cloud
Input parameters
|
Parameter |
Description |
Data type |
Required |
Default value |
Limit |
|
commandType |
The type of the Cloud Assistant command. |
String |
Yes |
||
|
commandContent |
The content of the Cloud Assistant command. |
String |
Yes |
||
|
regionId |
The region ID. |
String |
No |
{{ ACS::RegionId }} |
|
|
desktopIds |
The IDs of the cloud desktops. |
List |
No |
[] |
|
|
contentEncoding |
The encoding method of the command. |
String |
No |
PlainText |
|
|
timeout |
The timeout period of the command. |
Number |
No |
600 |
|
|
rateControl |
The rate control settings. |
Json |
No |
{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} |
|
|
OOSAssumeRole |
The RAM role assumed by CloudOps Orchestration Service (OOS). |
String |
No |
"" |
Output parameters
|
Parameter |
Description |
Data type |
|
commandOutputs |
List |
Permission policy required to execute the template
{
"Version": "1",
"Statement": [
{
"Action": [
"ecd:DescribeInvocations",
"ecd:RunCommand"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
References
Template content
FormatVersion: OOS-2019-06-01
Description:
en: Bulky run command on ECD desktops
name-en: ACS-ECD-BulkyRunCommand
Parameters:
regionId:
Label:
en: RegionId
Type: String
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
desktopIds:
Label:
en: DesktopIds
Type: List
Default: []
commandType:
Label:
en: CommandType
Type: String
AllowedValues:
- RunBatScript
- RunPowerShellScript
contentEncoding:
Label:
en: ContentEncoding
Type: String
AllowedValues:
- PlainText
- Base64
Default: PlainText
commandContent:
Label:
en: CommandContent
Type: String
AssociationProperty: Code
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::ECD::RunCommand
Description:
en: Run command on desktops
Properties:
regionId: '{{ regionId }}'
desktopId: '{{ ACS::TaskLoopItem }}'
commandType: '{{ commandType }}'
contentEncoding: '{{ contentEncoding }}'
commandContent: '{{ commandContent }}'
timeout: '{{ timeout }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ desktopIds }}'
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:
- commandType
- contentEncoding
- commandContent
- timeout
Label:
default:
en: Configure Parameters
- Parameters:
- regionId
- desktopIds
Label:
default:
en: Select ECD Desktops
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
en: Control Options