Nome do modelo
ACS-ECS-BulkyRunCommandInSLBDefaultServerGroup: executa comandos em lotes nas instâncias ECS pertencentes ao grupo de servidores padrão de uma instância SLB.
Descrição
Executa comandos em lotes nas instâncias ECS pertencentes ao grupo de servidores padrão de uma instância SLB.
Tipo de modelo
Automation
Proprietário
Alibaba Cloud
Parâmetros de entrada
|
Nome do parâmetro |
Descrição |
Tipo |
Obrigatório |
Padrão |
Restrições |
|
loadBalancerId |
O ID da instância SLB. |
String |
Sim |
||
|
commandType |
O tipo de comando do Cloud Assistant. |
String |
Não |
RunShellScript |
|
|
commandContent |
O comando do Cloud Assistant a ser executado nas instâncias ECS. |
String |
Não |
echo hello |
|
|
rateControl |
A taxa de concorrência para execução da tarefa. |
Json |
Não |
{‘Mode’: ‘Concurrency’, ‘MaxErrors’: 0, ‘Concurrency’: 1} |
|
|
OOSAssumeRole |
A função RAM assumida pelo OOS. |
String |
Não |
"" |
Parâmetros de saída
|
Nome do parâmetro |
Descrição |
Tipo |
|
commandOutputs |
List |
Permissões necessárias para executar este modelo
{
"Version": "1",
"Statement": [
{
"Action": [
"slb:DescribeLoadBalancerAttribute",
"slb:SetBackendServers"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"ecs:DescribeInvocationResults",
"ecs:DescribeInvocations",
"ecs:RunCommand"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Detalhes
Detalhes do ACS-ECS-BulkyRunCommandInSLBDefaultServerGroup
Conteúdo do modelo
FormatVersion: OOS-2019-06-01
Description:
en: Runs commands in batches on ECS instances in the default server group of an SLB instance.
name-en: ACS-ECS-BulkyRunCommandInSLBDefaultServerGroup
categories:
- slb_management
Parameters:
loadBalancerId:
Label:
en: SLB instance ID
Type: String
commandType:
Label:
en: Cloud Assistant command type
Type: String
AllowedValues:
- RunBatScript
- RunPowerShellScript
- RunShellScript
Default: RunShellScript
commandContent:
Label:
en: Cloud Assistant command to run on the ECS instances
Type: String
AssociationProperty: Code
Default: echo hello
rateControl:
Label:
en: Task execution concurrency rate
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 1
OOSAssumeRole:
Label:
en: RAM role for OOS to assume
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: describeLoadBalancerAttribute
Action: ACS::ExecuteApi
Description:
en: Retrieves the attributes of the default server group for the SLB instance.
Properties:
Service: SLB
API: DescribeLoadBalancerAttribute
Parameters:
LoadBalancerId: '{{ loadBalancerId }}'
Outputs:
BackendServers:
Type: List
ValueSelector: BackendServers.BackendServer[]
port:
Type: Number
ValueSelector: ListenerPorts.ListenerPort[]
- Name: runCommand
Action: ACS::ECS::ElegantRunCommandInSLBDefaultServerGroup
Description:
en: Runs the Cloud Assistant command.
Properties:
loadBalancerId: '{{ LoadBalancerId }}'
commandContent: '{{ commandContent }}'
commandType: '{{ commandType }}'
serverId:
'Fn::Select':
- ServerId
- '{{ ACS::TaskLoopItem }}'
weight:
'Fn::Select':
- Weight
- '{{ ACS::TaskLoopItem }}'
type:
'Fn::Select':
- Type
- '{{ ACS::TaskLoopItem }}'
port: '{{ describeLoadBalancerAttribute.port }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ describeLoadBalancerAttribute.BackendServers }}'
Outputs:
commandOutputs:
AggregateType: Fn::ListJoin
AggregateField: commandOutput
Outputs:
commandOutput:
Type: String
ValueSelector: commandOutput
Outputs:
commandOutputs:
Type: List
Value: '{{ runCommand.commandOutputs }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- loadBalancerId
- commandType
- commandContent
Label:
default:
en: Configure parameters
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
en: Advanced options
Instruções
Leia o conteúdo em inglês para compreender O QUE precisa ser comunicado
Escreva o texto em português do Brasil DO ZERO — esqueça a estrutura das frases em inglês
Preserve toda a formatação markdown, blocos de código, links e imagens exatamente como estão
Tags xref (
<a data-tag="xref" ...>texto</a>) — preserve a tag INTEIRA com todos os atributos na ordem e caixa originais, traduza APENAS o texto visível entre > eAplique todas as regras específicas do idioma rigorosamente
Aplique as regras de stopwords com tolerância zero
Use o modo imperativo em passos numerados e listas de procedimentos
Garanta a consistência terminológica — o mesmo termo deve ter a mesma tradução em todo o documento
Varie os inícios das frases em listas e tabelas — nenhum início deve se repetir mais de 3 vezes
Retorne APENAS o documento markdown em português do Brasil, sem explicações