Nom du modèle
ACS-ECS-ScheduleToUpgradeInternetBandwidthNew : planifie une augmentation temporaire de la bande passante Internet pour une instance ECS.
Description du modèle
Augmente temporairement la bande passante de plusieurs instances Elastic Compute Service (ECS) selon un planning défini.
Type de modèle
Automatisé
Propriétaire
Alibaba Cloud
Paramètres d'entrée
|
Paramètre |
Description |
Type |
Obligatoire |
Valeur par défaut |
Limite |
|
targets |
Instances ECS cibles. |
Json |
Oui |
||
|
timerTrigger |
Type de planification. |
Json |
Oui |
||
|
regionId |
ID de la région. |
String |
Non |
{{ ACS::RegionId }} |
|
|
maxBandwidthOut |
Bande passante publique sortante maximale. |
Number |
Non |
10 |
|
|
durationHour |
Durée de l'augmentation de la bande passante, en heures. |
Number |
Non |
4 |
|
|
rateControl |
Taux d'exécution concurrente des tâches. |
Json |
Non |
{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10} |
|
|
OOSAssumeRole |
Rôle RAM endossé par le service CloudOps Orchestration Service (OOS). |
String |
Non |
AliyunServiceRoleForOOSBandwidthScheduler |
Paramètres de sortie
Aucun
Stratégie d'autorisation requise pour exécuter le modèle
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:ModifyInstanceNetworkSpec"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Détails
Détails de ACS-ECS-ScheduleToUpgradeInternetBandwidthNew
Contenu du modèle
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-ScheduleToUpgradeInternetBandwidthNew
name-zh-cn: Schedules a temporary bandwidth upgrade for ECS instances.
categories:
- time_trigger
Parameters:
regionId:
Type: String
Label:
en: The ID of the region.
zh-cn: The ID of the region.
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
targets:
Type: Json
Label:
en: Target instances
zh-cn: Target instances
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: ALIYUN::ECS::Instance
RegionId: regionId
InternetChargeType: PayByBandwidth
ChargeType: PrePaid
timerTrigger:
Type: Json
Label:
en: Timer trigger
zh-cn: Timer trigger type
AssociationProperty: ALIYUN::OOS::Component::TimerTrigger
AssociationPropertyMetadata:
MinuteInterval: 30
maxBandwidthOut:
Label:
en: The maximum outbound public bandwidth.
zh-cn: The maximum outbound public bandwidth.
Description:
en: 'Unit: Mbit/s. Valid values: 0 to 100.'
zh-cn: 'Unit: Mbit/s. Valid values: 0 to 100.'
Type: Number
MinValue: 0
MaxValue: 100
Default: 10
durationHour:
Label:
en: The duration of the bandwidth upgrade, in hours.
zh-cn: The duration of the bandwidth upgrade, in hours.
Type: Number
MinValue: 4
MaxValue: 10000
Default: 4
AssociationProperty: ALIYUN::OOS::Component::BandwidthUpgradeDurationHour
AssociationPropertyMetadata:
TimerTrigger: '${timerTrigger}'
rateControl:
Label:
en: Rate control
zh-cn: The concurrency rate for the task execution.
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: AliyunServiceRoleForOOSBandwidthScheduler
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: timerTrigger
Action: ACS::TimerTrigger
Description:
en: Triggers the task based on the specified schedule.
zh-cn: Triggers the task based on the specified schedule.
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 }}'
- Name: getInstance
Description:
en: Gets the specified ECS instances.
zh-cn: Gets 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: modifyInstanceNetworkSpec
Action: ACS::ExecuteAPI
Description:
en: Temporarily modifies the bandwidth of the instances.
zh-cn: Temporarily modifies the bandwidth of the instances.
Properties:
Service: ECS
API: ModifyInstanceNetworkSpec
Parameters:
RegionId: '{{ regionId }}'
InstanceId: '{{ ACS::TaskLoopItem }}'
InternetMaxBandwidthOut: '{{ maxBandwidthOut }}'
EndTime:
Fn::FormatUTCTime:
- Fn::AddHour:
- '{{ ACS::CurrentUTCTime }}'
- '{{ durationHour }}'
- '%Y-%m-%dT%HZ'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ getInstance.instanceIds }}'