Nama Template
Operasi ACS-ECS-BulkyModifyInstanceAutoRenewAttribute memodifikasi atribut perpanjangan otomatis dari beberapa instance sekaligus.
Deskripsi Template
Memodifikasi pengaturan perpanjangan otomatis beberapa instance Elastic Compute Service (ECS) secara bersamaan.
Tipe Template
Otomatis
Pemilik
Alibaba Cloud
Parameter input
Parameter | Deskripsi | Tipe | Diperlukan | Nilai Default | Batasan |
targets | Instans target | Json | Ya | ||
duration | Periode perpanjangan otomatis instance ECS. | Angka | Ya | ||
regionId | ID wilayah. | String | Tidak | {{ ACS::RegionId }} | |
periodUnit | Satuan durasi perpanjangan instance ECS. | String | Tidak | Bulan | |
autoRenew | Menentukan apakah akan mengaktifkan perpanjangan otomatis untuk instance ECS. | Boolean | Tidak | False | |
renewalStatus | Status perpanjangan otomatis instance ECS. | String | Tidak | AutoRenewal | |
rateControl | Laju eksekusi tugas konkuren | Json | Tidak | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | Peran Manajemen Akses Sumber Daya (RAM) yang diasumsikan oleh Layanan Orkestrasi CloudOps (OOS). | String | Tidak | "" |
Parameter Output
Tidak ada
Kebijakan izin yang diperlukan untuk mengeksekusi template
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:ModifyInstanceAutoRenewAttribute"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Rincian
Untuk informasi lebih lanjut, lihat ACS-ECS-BulkyModifyInstanceAutoRenewAttribute.yml di GitHub.
Konten Template
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