Nome do modelo
O modelo ACS-ECS-RemoveFromSLBWhenPreemptibleInstanceInterrupted remove uma instância preemptível prestes a ser liberada da lista de servidores de back-end da instância do Server Load Balancer (SLB) associada.
Descrição do modelo
Remove uma instância preemptível na região atual da lista de servidores de back-end da instância SLB associada antes que a instância seja liberada.
Tipo de modelo
Automation
Proprietário
Alibaba Cloud
Parâmetros de entrada
|
Nome do parâmetro |
Descrição |
Tipo |
Obrigatório |
Valor padrão |
Restrições |
|
OOSAssumeRole |
A função RAM assumida pelo OOS para executar o modelo. |
String |
Não |
"" |
|
|
tags |
As tags usadas para filtrar instâncias. |
Json |
Não |
[] |
Parâmetros de saída
|
Nome do parâmetro |
Descrição |
Tipo |
|
instanceId |
String |
Política de acesso necessária para executar este modelo
{
"Version": "1",
"Statement": [
{
"Action": [
"slb:DescribeLoadBalancers",
"slb:RemoveBackendServers",
"slb:SetBackendServers"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Detalhes
Detalhes do ACS-ECS-RemoveFromSLBWhenPreemptibleInstanceInterrupted
Conteúdo do modelo
FormatVersion: OOS-2019-06-01
Description:
en: Removes a spot instance in the current region from a Server Load Balancer instance before the spot instance is released.
zh-cn: Removes a spot instance in the current region from a Server Load Balancer instance before the spot instance is released.
name-en: ACS-ECS-RemoveFromSLBWhenPreemptibleInstanceInterrupted
name-zh-cn: Removes a spot instance that is about to be released from the backend server list of its Server Load Balancer.
categories:
- event-trigger
Parameters:
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: The RAM role that OOS assumes
Type: String
Default: ''
tags:
Type: Json
Label:
en: Tags
zh-cn: The tags of the instance
AssociationProperty: Tags
Default: []
RamRole: '{{OOSAssumeRole}}'
Tasks:
- Name: eventTrigger
Description:
en: Monitors the interruption event of a spot instance.
zh-cn: Monitors the interruption event of a spot instance.
Action: 'ACS::EventTrigger'
Properties:
Tags: '{{ tags }}'
Product: ECS
Name:
- 'Instance:PreemptibleInstanceInterruption'
Level:
- WARN
Content:
action: delete
RegionId:
- '{{ ACS::RegionId }}'
Outputs:
instanceId:
ValueSelector: .content.instanceId
Type: String
- Name: describeSLB
Description:
en: Queries the ID of the Server Load Balancer instance associated with the interrupted spot instance.
zh-cn: Queries the ID of the Server Load Balancer instance associated with the interrupted spot instance.
Action: 'ACS::ExecuteAPI'
Properties:
Service: SLB
API: DescribeLoadBalancers
Parameters:
ServerId: '{{ eventTrigger.instanceId }}'
Outputs:
loadBalancerId:
ValueSelector: .LoadBalancers.LoadBalancer[0].LoadBalancerId
Type: String
- Name: setBackendServers
Description:
en: Sets the weight of the interrupted instance to 0 on the Server Load Balancer instance.
zh-cn: Sets the weight of the interrupted instance to 0 on the Server Load Balancer instance.
Action: 'ACS::ExecuteAPI'
Properties:
Service: SLB
API: SetBackendServers
Parameters:
BackendServers:
- ServerId: '{{ eventTrigger.instanceId }}'
Weight: 0
LoadBalancerId: '{{describeSLB.loadBalancerId}}'
- Name: waitConnectionExpire
Description:
en: Waits for existing network connections to close.
zh-cn: Waits for existing network connections to close.
Action: 'ACS::Sleep'
Properties:
Duration: 'PT1M'
- Name: removeBackendServers
Description:
en: Removes the interrupted instance from the backend server list of the Server Load Balancer instance.
zh-cn: Removes the interrupted instance from the backend server list of the Server Load Balancer instance.
Action: 'ACS::ExecuteAPI'
Properties:
Service: SLB
API: RemoveBackendServers
Parameters:
BackendServers:
- ServerId: '{{ eventTrigger.instanceId }}'
Weight: 0
LoadBalancerId: '{{describeSLB.loadBalancerId}}'
Outputs:
instanceId:
Value: '{{ eventTrigger.instanceId }}'
Type: String
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- tags
Label:
default:
zh-cn: Select Tags
en: Select Tags
- Parameters:
- OOSAssumeRole
Label:
default:
zh-cn: Control Options
en: Control 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" ...>text</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 de frase 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