Todos os produtos
Search
Central de documentação

CloudOps Orchestration Service:ACS-ECS-ScheduleToUpgradeInternetBandwidthNew

Última atualização: Jun 28, 2026

Nome do modelo

ACS-ECS-ScheduleToUpgradeInternetBandwidthNew: agenda uma atualização temporária da largura de banda de Internet para uma instância ECS.

Executar agora

Descrição do modelo

Atualiza temporariamente a largura de banda de várias instâncias do Elastic Compute Service (ECS) conforme agendamento.

Tipo de modelo

Automatizado

Proprietário

Alibaba Cloud

Parâmetros de entrada

Parâmetro

Descrição

Tipo

Obrigatório

Valor padrão

Limite

targets

Instâncias ECS de destino.

Json

Sim

timerTrigger

Tipo de agendamento.

Json

Sim

regionId

ID da região.

String

Não

{{ ACS::RegionId }}

maxBandwidthOut

Largura de banda pública de saída máxima.

Number

Não

10

durationHour

Duração da atualização de largura de banda, em horas.

Number

Não

4

rateControl

Taxa de execução simultânea de tarefas.

Json

Não

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

OOSAssumeRole

Função RAM assumida pelo CloudOps Orchestration Service (OOS).

String

Não

AliyunServiceRoleForOOSBandwidthScheduler

Parâmetros de saída

Nenhum

Política de permissões necessária para executar o modelo

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

Detalhes

Detalhes do ACS-ECS-ScheduleToUpgradeInternetBandwidthNew

Conteúdo do modelo

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