Tous les produits
Search
Centre de documentation

CloudOps Orchestration Service:ACS-ECS-ScheduleToUpgradeInternetBandwidth

Dernière mise à jour :Aug 11, 2026

Nom du modèle

ACS-ECS-ScheduleToUpgradeInternetBandwidth : planifiez des augmentations temporaires de la bande passante Internet pour les instances ECS

Exécuter maintenant

Description du modèle

Planifie des augmentations temporaires de la bande passante pour plusieurs instances ECS.

Type de modèle

Automatisé

Propriétaire

Alibaba Cloud

Paramètres d'entrée

Paramètre

Description

Type

Requis

Valeur par défaut

Limite

targets

Instances cibles

Json

Oui

regionId

ID de région

String

Non

{{ ACS::RegionId }}

triggerCron

Planning d'augmentation de la bande passante

String

Non

0 0 12 ?

triggerEndDate

Date de fin de l'exécution périodique

String

Non

2025-12-31T15:59:59Z

timeZone

Fuseau horaire de l'exécution planifiée

String

Non

UTC

maxBandwidthIn

Bande passante publique entrante maximale

Number

Non

10

maxBandwidthOut

Bande passante publique sortante maximale

Number

Non

10

durationHour

Durée de l'augmentation de la bande passante

Number

Non

4

rateControl

Concurrence d'exécution des tâches

Json

Non

{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 10}

OOSAssumeRole

Rôle RAM endossé par OOS

String

Non

OOSServiceRole

Paramètres de sortie

Aucun

Autorisations requises

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:DescribeInstances",
                "ecs:ModifyInstanceNetworkSpec"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "oos:GetApplicationGroup"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

Source du modèle

Modèle ACS-ECS-ScheduleToUpgradeInternetBandwidth sur GitHub.

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-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 }}'