Nama Template
ACS-ECS-ScheduleToUpgradeInternetBandwidth: Menjadwalkan peningkatan sementara bandwidth Internet untuk sebuah instance Elastic Compute Service (ECS)
Deskripsi Template
Sementara meningkatkan bandwidth untuk beberapa instance Elastic Compute Service (ECS) sesuai jadwal.
Tipe Template
Otomatis
Pemilik
Alibaba Cloud
Parameter Input
Parameter | Deskripsi | Tipe | Diperlukan | Nilai Default | Batasan |
targets | Target instance | Json | Ya | ||
regionId | ID wilayah. | String | Tidak | {{ ACS::RegionId }} | |
triggerCron | Interval waktu tugas peningkatan bandwidth dijalankan. | String | Tidak | 0 0 12 ? * * | |
triggerEndDate | Waktu akhir eksekusi periodik. | String | Tidak | 2025-12-31T15:59:59Z | |
timeZone | Zona waktu eksekusi terjadwal. | String | Tidak | UTC | |
maxBandwidthIn | Bandwidth masuk publik maksimum. | Number | Tidak | 10 | |
maxBandwidthOut | Bandwidth keluar publik maksimum. | Number | Tidak | 10 | |
durationHour | Durasi peningkatan bandwidth. | Number | Tidak | 4 | |
rateControl | Konkurensi eksekusi task | Json | Tidak | {'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} | |
OOSAssumeRole | Peran Resource Access Management (RAM) yang diasumsikan oleh CloudOps Orchestration Service (OOS). | String | Tidak | OOSServiceRole |
Parameter Output
Tidak ada
Kebijakan izin yang diperlukan untuk mengeksekusi template
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:ModifyInstanceNetworkSpec"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Rincian
Untuk detail selengkapnya, lihat ACS-ECS-ScheduleToUpgradeInternetBandwidth.
Konten Template
FormatVersion: OOS-2019-06-01
Description:
en: Schedules a temporary bandwidth upgrade for ECS instances.
zh-cn: Schedules a temporary bandwidth upgrade for ECS instances.
name-en: ACS-ECS-ScheduleToUpgradeInternetBandwidth
name-zh-cn: Schedule a temporary bandwidth upgrade for an ECS instance.
categories:
- time_trigger
Parameters:
regionId:
Type: String
Label:
en: The id of region
zh-cn: Region ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
targets:
Type: Json
Label:
en: TargetInstance
zh-cn: Target instance
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: ALIYUN::ECS::Instance
RegionId: regionId
InternetChargeType: PayByBandwidth
ChargeType: PrePaid
triggerCron:
Label:
en: 'The schedule of bandwidth upgrade task'
zh-cn: 'Execution cycle of the bandwidth upgrade task'
Type: String
AssociationProperty: Cron
Default: 0 0 12 ? * *
triggerEndDate:
Label:
en: 'The end date of bandwidth upgrade task'
zh-cn: End time of the rule
Type: String
AssociationProperty: DateTime
AssociationPropertyMetadata:
Format: 'YYYY-MM-DDTHH:mm:ssZ'
Default: '2025-12-31T15:59:59Z'
timeZone:
Label:
en: The time zone of schedule
zh-cn: Time zone of the execution cycle
Type: String
AssociationProperty: TimeZone
Default: UTC
maxBandwidthIn:
Label:
en: The maximum public network bandwidth for in-direction
zh-cn: Maximum inbound public bandwidth
Description:
en: 'Unit: Mbit/s (Megabit per second), range: 1~10 when maxBandwidthOut<=10Mbit/s, else 1~maxBandwidthOut'
zh-cn: 'Unit: Mbit/s. Value range: 1 to 10 if the purchased outbound public bandwidth is 10 Mbit/s or less. 1 to the maximum outbound public bandwidth if the purchased outbound public bandwidth is greater than 10 Mbit/s.'
Type: Number
MinValue: 1
Default: 10
maxBandwidthOut:
Label:
en: The maximum public network bandwidth for out-direction
zh-cn: Maximum outbound public bandwidth
Description:
en: <p>Unit: Mbit/s. The value range is 0 to 200. CloudOps Orchestration Service (OOS) does not validate this parameter. <br/><font color='red'>If the value exceeds 200, the upgrade may fail. You can submit a ticket in the ECS console to increase the bandwidth limit, and then use OOS to perform the upgrade. You can also set the bandwidth to a value within the allowed range.</font></p>
zh-cn: <p>Unit: Mbit/s. The value range is 0 to 200. CloudOps Orchestration Service (OOS) does not validate this parameter. <br/><font color='red'>If the value exceeds 200, the upgrade may fail. You can submit a ticket in the ECS console to increase the bandwidth limit, and then use OOS to perform the upgrade. You can also set the bandwidth to a value within the allowed range.</font></p>
Type: Number
MinValue: 0
Default: 10
durationHour:
Label:
en: The number of hours that the bandwidth upgrade lasts
zh-cn: Duration of the bandwidth upgrade
Description:
zh-cn: 'Unit: Hour. The minimum duration is 4 hours. The upgrade can end only on the hour.'
en: 'Unit: Hour. The bandwidth upgrade should last at least 4 hours. Upgrade only ends on the hour'
Type: Number
MinValue: 4
MaxValue: 10000
Default: 4
rateControl:
Label:
en: RateControl
zh-cn: Concurrency rate for task execution
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: The RAM role that OOS assumes
Type: String
Default: OOSServiceRole
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: timerTrigger
Action: ACS::TimerTrigger
Description:
en: Triggers a task as scheduled by specifying Cron expression
zh-cn: Triggers the task at a scheduled time that is specified by a cron expression.
Properties:
Type: cron
Expression: '{{ triggerCron }}'
EndDate: '{{ triggerEndDate }}'
TimeZone: '{{ timeZone }}'
- Name: getInstance
Description:
en: Views the ECS instances
zh-cn: Gets the ECS instances.
Action: ACS::SelectTargets
Properties:
ResourceType: ALIYUN::ECS::Instance
RegionId: '{{ regionId }}'
Filters:
- '{{ targets }}'
Outputs:
instanceIds:
Type: List
ValueSelector: Instances.Instance[].InstanceId
- Name: modifyInstanceNetworkSpec
Action: ACS::ExecuteAPI
Description:
en: Modifies the temporary bandwidth of the instances
zh-cn: Modifies the temporary bandwidth of the instances.
Properties:
Service: ECS
API: ModifyInstanceNetworkSpec
Parameters:
RegionId: '{{ regionId }}'
InstanceId: '{{ ACS::TaskLoopItem }}'
InternetMaxBandwidthIn: '{{ maxBandwidthIn }}'
InternetMaxBandwidthOut: '{{ maxBandwidthOut }}'
EndTime:
Fn::FormatUTCTime:
- Fn::AddHour:
- '{{ ACS::CurrentUTCTime }}'
- '{{ durationHour }}'
- '%Y-%m-%dT%HZ'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ getInstance.instanceIds }}'