Nom du modèle
Exécute par lot des commandes Cloud Assistant sur des instances Elastic Compute Service (ECS) dans plusieurs régions.
Description
Exécute par lot des commandes Cloud Assistant sur des instances ECS dans plusieurs régions.
Type de modèle
Automatisation
Propriétaire
Alibaba Cloud
Paramètres d'entrée
|
Nom du paramètre |
Description |
Type |
Obligatoire |
Valeur par défaut |
Contraintes |
|
instanceInfos |
Instances ECS sur lesquelles exécuter la commande. |
List |
Non |
[] |
|
|
commandType |
Type de commande Cloud Assistant. |
String |
Non |
RunShellScript |
|
|
commandContent |
Commande à exécuter sur les instances ECS. |
String |
Non |
echo hello |
|
|
timeout |
Délai d'expiration de l'exécution de la commande. Unité : secondes. |
Number |
Non |
600 |
|
|
rateControl |
Taux de concurrence pour l'exécution des tâches. |
Json |
Non |
{‘Mode’: ‘Concurrency’, ‘MaxErrors’: 0, ‘Concurrency’: 10} |
|
|
OOSAssumeRole |
Rôle RAM à endosser par OOS. |
String |
Non |
“” |
Paramètres de sortie
|
Nom du paramètre |
Description |
Type |
|
commandOutputs |
List |
Stratégie d'accès requise
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInvocationResults",
"ecs:DescribeInvocations",
"ecs:RunCommand"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Détails
Détails pour ACS-ECS-BulkyRunCommandAcrossRegions
Contenu du modèle
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