すべてのプロダクト
Search
ドキュメントセンター

CloudOps Orchestration Service:ACS-ECS-ScheduleToUpgradeInternetBandwidthNew

最終更新日:Dec 21, 2025

テンプレート名

ACS-ECS-ScheduleToUpgradeInternetBandwidthNew:ECS インスタンスのインターネット帯域幅を一時的にアップグレードするスケジュールを設定します。

今すぐ実行

テンプレートの説明

スケジュールに従って、複数の Elastic Compute Service (ECS) インスタンスの帯域幅を一時的にアップグレードします。

テンプレートの種類

自動化

所有者

Alibaba Cloud

入力パラメーター

パラメーター

説明

種類

必須

デフォルト値

制限

targets

ターゲットインスタンス

Json

はい

timerTrigger

スケジュールタイプ

Json

はい

regionId

リージョン ID。

String

いいえ

{{ ACS::RegionId }}

maxBandwidthOut

最大パブリックアウトバウンド帯域幅。

Number

いいえ

10

durationHour

帯域幅アップグレードの期間 (時間単位)。

Number

いいえ

4

rateControl

タスクの同時実行レート

Json

いいえ

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

OOSAssumeRole

CloudOps Orchestration Service (OOS) によって引き受けられる Resource Access Management (RAM) ロール。

String

いいえ

AliyunServiceRoleForOOSBandwidthScheduler

出力パラメーター

なし

テンプレートを実行するために必要な権限ポリシー

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

詳細

ACS-ECS-ScheduleToUpgradeInternetBandwidthNew の詳細

テンプレートコンテンツ

FormatVersion: OOS-2019-06-01
Description:
  en: ECS インスタンスの一時的な帯域幅アップグレードをスケジュールします。
  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: リージョン ID。
      zh-cn: The ID of the region.
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  targets:
    Type: Json
    Label:
      en: ターゲットインスタンス
      zh-cn: Target instances
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: ALIYUN::ECS::Instance
      RegionId: regionId
      InternetChargeType: PayByBandwidth
      ChargeType: PrePaid
  timerTrigger:
    Type: Json
    Label:
      en: タイマートリガー
      zh-cn: Timer trigger type
    AssociationProperty: ALIYUN::OOS::Component::TimerTrigger
    AssociationPropertyMetadata:
      MinuteInterval: 30
  maxBandwidthOut:
    Label:
      en: 最大パブリックアウトバウンド帯域幅。
      zh-cn: The maximum outbound public bandwidth.
    Description:
      en: '単位:Mbit/s。有効値:0~100。'
      zh-cn: 'Unit: Mbit/s. Valid values: 0 to 100.'
    Type: Number
    MinValue: 0
    MaxValue: 100
    Default: 10
  durationHour:
    Label:
      en: 帯域幅アップグレードの期間 (時間単位)。
      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: レート制御
      zh-cn: The concurrency rate for the task execution.
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOS が引き受ける RAM ロール。
      zh-cn: The RAM role that OOS assumes.
    Type: String
    Default: AliyunServiceRoleForOOSBandwidthScheduler
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: timerTrigger
  Action: ACS::TimerTrigger
  Description:
    en: 指定されたスケジュールに基づいてタスクをトリガーします。
    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: 指定された ECS インスタンスを取得します。
    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: インスタンスの帯域幅を一時的に変更します。
    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 }}'