Nome do modelo
Modifica em lote os atributos de renovação automática de várias instâncias.
Descrição do modelo
Altera em lote as configurações de renovação automática de múltiplas instâncias do Elastic Compute Service (ECS).
Tipo de modelo
Automatizado
Proprietário
Alibaba Cloud
Parâmetros de entrada
|
Parâmetro |
Descrição |
Tipo |
Obrigatório |
Valor padrão |
Limite |
|
targets |
Instância de destino |
Json |
Sim |
||
|
duration |
Período de renovação automática das instâncias ECS. |
Number |
Sim |
||
|
regionId |
ID da região. |
String |
Não |
{{ ACS::RegionId }} |
|
|
periodUnit |
Unidade de tempo da renovação automática. |
String |
Não |
Month |
|
|
autoRenew |
Indica se a renovação automática deve ser ativada para as instâncias ECS. |
Boolean |
Não |
False |
|
|
renewalStatus |
Status da renovação automática das instâncias ECS. |
String |
Não |
AutoRenewal |
|
|
rateControl |
Taxa de execução simultânea de tarefas. |
Json |
Não |
{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} |
|
|
OOSAssumeRole |
Função do Resource Access Management (RAM) assumida pelo CloudOps Orchestration Service (OOS). |
String |
Não |
"" |
Parâmetros de saída
Nenhum
Política de permissões necessária para executar o modelo
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:ModifyInstanceAutoRenewAttribute"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Detalhes
Para mais informações, consulte ACS-ECS-BulkyModifyInstanceAutoRenewAttribute.yml no GitHub.
Conteúdo do modelo
FormatVersion: OOS-2019-06-01
Description:
en: Modifies the auto-renewal attributes of instances in batches.
zh-cn: Modifies the auto-renewal attributes of instances in batches.
name-en: ACS-ECS-BulkyModifyInstanceAutoRenewAttribute
name-zh-cn: ACS-ECS-BulkyModifyInstanceAutoRenewAttribute
categories:
- instance_manage
Parameters:
regionId:
Type: String
Label:
en: Region ID
zh-cn: Region ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
targets:
Type: Json
Label:
en: Target Instance
zh-cn: Target Instance
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: regionId
periodUnit:
Label:
en: Renewal Period Unit
zh-cn: Renewal Period Unit
Type: String
AllowedValues:
- Month
- Week
- Year
Default: Month
duration:
Description:
en: >-
When PeriodUnit is set to Year, valid values of Duration are 1, 2, and 3.
When PeriodUnit is set to Month, valid values of Duration are 1, 2, 3, 6, and 12.
When PeriodUnit is set to Week, valid values of Duration are 1, 2, 3, and 4.
zh-cn: >-
When PeriodUnit is set to Year, valid values of Duration are 1, 2, and 3.
When PeriodUnit is set to Month, valid values of Duration are 1, 2, 3, 6, and 12.
When PeriodUnit is set to Week, valid values of Duration are 1, 2, 3, and 4.
Label:
en: Renewal Duration
zh-cn: Renewal Duration
Type: Number
autoRenew:
Label:
en: Enable Auto-renewal
zh-cn: Enable Auto-renewal
Type: Boolean
Default: false
renewalStatus:
Description:
en: >-
Valid values:
AutoRenewal: Auto-renewal is enabled for the instance.
Normal: Auto-renewal is disabled for the instance.
NotRenewal: The instance will not be renewed upon expiration. The system no longer sends an expiration reminder, but sends only a non-renewal reminder three days before the expiration date. You can change the value of this parameter from NotRenewal to Normal for an instance, and then manually renew the instance. Alternatively, you can set the RenewalStatus parameter to AutoRenewal.
zh-cn: >-
Valid values:
AutoRenewal: Auto-renewal is enabled for the instance.
Normal: Auto-renewal is disabled for the instance.
NotRenewal: The instance will not be renewed upon expiration. The system no longer sends an expiration reminder, but sends only a non-renewal reminder three days before the expiration date. You can change the value of this parameter from NotRenewal to Normal for an instance, and then manually renew the instance. Alternatively, you can set the RenewalStatus parameter to AutoRenewal.
Label:
en: Auto-renewal Status
zh-cn: Auto-renewal Status
Type: String
AllowedValues:
- AutoRenewal
- Normal
- NotRenewal
Default: AutoRenewal
rateControl:
Label:
en: Rate Control
zh-cn: Rate Control
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: The RAM role that OOS assumes
zh-cn: The RAM role that OOS assumes
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
Description:
en: Retrieves information about the specified ECS instances.
zh-cn: Retrieves information about the specified ECS instances.
Action: 'ACS::SelectTargets'
Properties:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: '{{ regionId }}'
Filters:
- '{{ targets }}'
Outputs:
instanceIds:
Type: List
ValueSelector: 'Instances.Instance[].InstanceId'
- Name: modifyInstanceAutoRenewAttribute
Action: 'ACS::ECS::ModifyInstanceAutoRenewAttribute'
Description:
en: Modifies the auto-renewal attributes of an instance.
zh-cn: Modifies the auto-renewal attributes of an instance.
Properties:
regionId: '{{ regionId }}'
instanceId: '{{ ACS::TaskLoopItem }}'
duration: '{{ duration }}'
periodUnit: '{{ periodUnit }}'
autoRenew: '{{ autoRenew }}'
renewalStatus: '{{ renewalStatus }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ getInstance.instanceIds }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- periodUnit
- duration
- autoRenew
- renewalStatus
Label:
default:
zh-cn: Configure Parameters
en: Configure Parameters
- Parameters:
- regionId
- targets
Label:
default:
zh-cn: Select ECS Instances
en: Select ECS Instances
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
zh-cn: Advanced Options
en: Advanced Options