模板名稱
ACS-VPC-ScheduleToUpgradeEipBandwidth 定時升級EIP執行個體臨時頻寬
模板描述
定時升級EIP執行個體臨時頻寬
模板類型
自動化
所有者
Alibaba Cloud
輸入參數
參數名稱 | 描述 | 類型 | 是否必填 | 預設值 | 約束 |
TimerTrigger | 定時類型 | Json | 是 | ||
AllocationId | 目標EIP執行個體 | List | 是 | ||
Bandwidth | 頻寬 | Number | 是 | ||
RegionId | 地區ID | String | 否 | {{ ACS::RegionId }} | |
Duration | 頻寬升級期間 | String | 否 | PT1H | |
RateControl | 任務執行的並發比率 | Json | 否 | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | OOS扮演的RAM角色 | String | 否 | "" |
輸出參數
無
執行此模板需要的權限原則
{
"Version": "1",
"Statement": [
{
"Action": [
"vpc:DescribeEipAddresses",
"vpc:ModifyEipAddressAttribute"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
詳情
ACS-VPC-ScheduleToUpgradeEipBandwidth詳情
模板內容
FormatVersion: OOS-2019-06-01
Description:
en: Schedule to upgrade EIP bandwidth
zh-cn: 定時升級EIP執行個體臨時頻寬
name-en: ACS-VPC-ScheduleToUpgradeEipBandwidth
name-zh-cn: 定時升級EIP執行個體臨時頻寬
categories:
- time_trigger
Parameters:
TimerTrigger:
Type: Json
Label:
en: TimerTrigger
zh-cn: 定時類型
AssociationProperty: ALIYUN::OOS::Component::TimerTrigger
AssociationPropertyMetadata:
MinuteInterval: 30
RegionId:
Type: String
Label:
en: The id of region
zh-cn: 地區ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
AllocationId:
Type: List
Label:
en: TargetEIPInstance
zh-cn: 目標EIP執行個體
Bandwidth:
Label:
en: Bandwidth
zh-cn: 頻寬
Description:
en: The peak bandwidth of EIP needs to be modified. The value is:1~500. It is billed based on fixed bandwidth, in Mbps.
zh-cn: 需要修改 EIP 的頻寬峰值,取值:1~500,按固定頻寬計費,單位為 Mbps。
Type: Number
MinValue: 1
MaxValue: 500
Duration:
Label:
en: Duration
zh-cn: 頻寬升級期間
Description:
zh-cn: 限制:最短1秒鐘。
en: with a minimum limit of 1 second.
Type: String
AssociationProperty: ALIYUN::OOS::Component::DurationExpression
Default: 'PT1H'
RateControl:
Label:
en: RateControl
zh-cn: 任務執行的並發比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: The RAM role to be assumed by OOS
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: timerTrigger
Action: ACS::TimerTrigger
Description:
en: Triggers a task as scheduled by specifying type and expression
zh-cn: 通過指定觸發類型和運算式按計劃觸發任務
Properties:
Type:
Fn::Select:
- type
- '{{timerTrigger}}'
Expression:
Fn::Select:
- expression
- '{{timerTrigger}}'
StartDate:
Fn::Select:
- startDate
- '{{ timerTrigger }}'
EndDate:
Fn::Select:
- endDate
- '{{ timerTrigger }}'
TimeZone:
Fn::Select:
- timeZone
- '{{ timerTrigger }}'
Outputs: {}
- Name: GetEipInstance
Description:
en: Get the EIP instance
zh-cn: 擷取EIP執行個體
Action: ACS::ExecuteAPI
Properties:
Service: VPC
API: DescribeEipAddresses
Parameters:
RegionId: '{{ RegionId }}'
AllocationId:
Fn::Join:
- ','
- '{{ AllocationId }}'
Headers: {}
Body: {}
Outputs: {}
- Name: UpgradeEipAddressBandwidth
Action: ACS::VPC::UpgradeEipBandwidth
Description:
en: Upgrade EIP instance bandwidth
zh-cn: 升級EIP執行個體的頻寬
Properties:
RegionId: '{{ RegionId }}'
AllocationId: '{{ ACS::TaskLoopItem }}'
Bandwidth: '{{ Bandwidth }}'
Duration: '{{ Duration }}'
Outputs: {}
Loop:
Items: '{{ GetEipInstance.EipAddresses.EipAddress[]?.AllocationId }}'
RateControl: '{{ RateControl }}'
Outputs: {}
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- TimerTrigger
Label:
default:
zh-cn: 定時設定
en: Timer Trigger Configure
- Parameters:
- RegionId
- AllocationId
- Bandwidth
- Duration
Label:
default:
zh-cn: 選擇執行個體
en: Select ECS Instances
- Parameters:
- RateControl
- OOSAssumeRole
Label:
default:
zh-cn: 進階選項
en: Control Options