模板名稱
ACS-BssOpenApi-EnableAutoRenewal 開啟資源自動續費
模板描述
開啟資源自動續費
模板類型
自動化
所有者
Alibaba Cloud
輸入參數
參數名稱 | 描述 | 類型 | 是否必填 | 默認值 | 約束 |
resourceIds | 資源ID列表 | List | 是 | ||
renewalPeriodUnit | 續費時間單位 | String | 是 | ||
renewalPeriod | 續費時長 | Number | 是 | ||
productCode | 產品代碼 | String | 是 | ||
OOSAssumeRole | OOS扮演的RAM角色 | String | 是 | ||
regionId | 地域ID | String | 否 | {{ ACS::RegionId }} |
輸出參數
無
執行此模板需要的權限策略
{
"Version": "1",
"Statement": [
{
"Action": [
"bssopenapi:SetRenewal"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳情
ACS-BssOpenApi-EnableAutoRenewal詳情
模板內容
FormatVersion: OOS-2019-06-01
Description:
en: Enable resource auto renew
zh-cn: 開啟資源自動續費
name-en: ACS-BssOpenApi-EnableAutoRenewal
name-zh-cn: 開啟資源自動續費
Parameters:
regionId:
Label:
en: RegionId
zh-cn: 地域ID
Type: String
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
resourceIds:
Label:
en: ResourceIds
zh-cn: 資源ID列表
Type: List
renewalPeriodUnit:
Label:
en: RenewalPeriodUnit
zh-cn: 續費時間單位
Type: String
AllowedValues:
- M
- Y
renewalPeriod:
Label:
en: RenewalPeriod
zh-cn: 續費時長
Type: Number
AllowedValues:
- 1
- 2
- 3
- 6
- 12
productCode:
Label:
en: Product code
zh-cn: 產品代碼
Type: String
AllowedValues:
- ACS::Bastionhost::Instance
- ACS::CBWP::CommonBandwidthPackage
- ACS::ECS::Instance
- ACS::EIP::EipAddress
- ACS::MongoDB::DBInstance
- ACS::Redis::DBInstance
- ACS::ADB::DBCluster
- ACS::RDS::DBInstance
- ACS::PolarDB::DBCluster
- ACS::SLB::LoadBalancer
- ACS::DdosCoo::Instance
- ACS::CEN::CenBandwidthPackage
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: ModifyInstanceRenewAttribute
Action: ACS::ExecuteAPI
Description:
en: Modify renew attribute of instance
zh-cn: 修改實例自動續費屬性
Properties:
Service: BssOpenApi
API: SetRenewal
Parameters:
RegionId: '{{ regionId }}'
InstanceIDs:
Fn::Join:
- ','
- '{{ resourceIds }}'
RenewalStatus: 'AutoRenewal'
RenewalPeriod: '{{ renewalPeriod }}'
RenewalPeriodUnit: '{{ renewalPeriodUnit }}'
ProductCode:
Fn::Select:
- '{{ productCode }}'
- ACS::CBWP::CommonBandwidthPackage: cbwp
ACS::Bastionhost::Instance: bastionhost
ACS::ECS::Instance: ecs
ACS::EIP::EipAddress: eip
ACS::MongoDB::DBInstance: dds
ACS::Redis::DBInstance: redisa
ACS::ADB::DBCluster: ads
ACS::RDS::DBInstance: rds
ACS::PolarDB::DBCluster: polardb
ACS::SLB::LoadBalancer: slb
ACS::DdosCoo::Instance: ddos
ACS::CEN::CenBandwidthPackage: cbn
ProductType:
Fn::Select:
- '{{ productCode }}'
- ACS::CBWP::CommonBandwidthPackage: ''
ACS::Bastionhost::Instance: bastionhost
ACS::ECS::Instance: ''
ACS::EIP::EipAddress: ''
ACS::MongoDB::DBInstance: ''
ACS::Redis::DBInstance: ''
ACS::ADB::DBCluster: ''
ACS::RDS::DBInstance: rds
ACS::PolarDB::DBCluster: online
ACS::SLB::LoadBalancer: ''
ACS::DdosCoo::Instance: 'ddoscoo'
ACS::CEN::CenBandwidthPackage: 'cbn_bwp_pre'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- regionId
- productCode
- resourceIds
Label:
default:
zh-cn: 選擇資源
en: Select Resource
- Parameters:
- renewalPeriodUnit
- renewalPeriod
Label:
default:
zh-cn: 設置續費參數
en: Configure Parameters
- Parameters:
- OOSAssumeRole
Label:
default:
zh-cn: 高級選項
en: Control Options
文檔內容是否對您有幫助?