ACS-ECS-BulkyRenewInstances
更新時間:
模板名稱
ACS-ECS-BulkyRenewInstances 批量續(xù)費實例
模板描述
批量續(xù)費ECS預(yù)付費實例
模板類型
自動化
所有者
Alibaba Cloud
輸入?yún)?shù)
參數(shù)名稱 | 描述 | 類型 | 是否必填 | 默認值 | 約束 |
targets | 目標實例 | Json | 是 | ||
regionId | 地域ID | String | 否 | {{ ACS::RegionId }} | |
periodUnit | 續(xù)費時長的時間單位 | String | 否 | Month | |
period | 包年包月續(xù)費時長 | Number | 否 | 1 | |
rateControl | 任務(wù)執(zhí)行的并發(fā)比率 | Json | 否 | {‘Mode’: ‘Concurrency’, ‘MaxErrors’: 0, ‘Concurrency’: 10} | |
OOSAssumeRole | OOS扮演的RAM角色 | String | 否 | “” |
輸出參數(shù)
無
執(zhí)行此模板需要的權(quán)限策略
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:RenewInstance"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳情
模板內(nèi)容
FormatVersion: OOS-2019-06-01
Description:
en: Bulky renew ECS prepaid instances
zh-cn: 批量續(xù)費ECS預(yù)付費實例
name-en: Bulky Renew Instances
name-zh-cn: 批量續(xù)費實例
categories:
- instance_manage
- application_manage
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: 地域ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
targets:
Type: Json
Label:
en: TargetInstance
zh-cn: 目標實例
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: regionId
periodUnit:
Description:
en: The unit of the renewal period (Period)
zh-cn: >-
即參數(shù)Period的單位。PeriodUnit=Week時,Period取值:1~4,PeriodUnit=Month時,Period取值:1~12,
24, 36, 48, 60
Label:
en: PeriodUnit
zh-cn: 續(xù)費時長的時間單位
Type: String
AssociationPropertyMetadata:
LocaleKey: PricingCycle
AllowedValues:
- Week
- Month
Default: Month
period:
Label:
en: Period
zh-cn: 包年包月續(xù)費時長
Type: Number
Default: 1
MinValue: 1
MaxValue: 60
rateControl:
Label:
en: RateControl
zh-cn: 任務(wù)執(zhí)行的并發(fā)比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
Description:
en: Views the ECS instances
zh-cn: 獲取ECS實例
Action: 'ACS::SelectTargets'
Properties:
ResourceType: 'ALIYUN::ECS::Instance'
Filters:
- '{{ targets }}'
Outputs:
instanceIds:
Type: List
ValueSelector: 'Instances.Instance[].InstanceId'
- Name: renewInstance
Action: 'ACS::ExecuteAPI'
Description:
en: Renew ECS instance with the specified instance ID
zh-cn: 通過指定實例ID續(xù)費實例
Properties:
Service: ECS
API: RenewInstance
Parameters:
RegionId: '{{regionId}}'
InstanceId: '{{ ACS::TaskLoopItem }}'
Period: '{{ period }}'
PeriodUnit: '{{ periodUnit }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ getInstance.instanceIds }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- periodUnit
- period
Label:
default:
zh-cn: 設(shè)置參數(shù)
en: Configure Parameters
- Parameters:
- regionId
- targets
Label:
default:
zh-cn: 選擇實例
en: Select ECS Instances
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
zh-cn: 高級選項
en: Control Options
文檔內(nèi)容是否對您有幫助?