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

CloudOps Orchestration Service:ACS-ECS-BulkyModifyPostPaidInstanceSpec

最終更新日:Dec 21, 2025

テンプレート名

ACS-ECS-BulkyModifyPostPaidInstanceSpec 操作は、従量課金の Elastic Compute Service (ECS) インスタンスのインスタンスタイプをバッチで変更します。

今すぐ実行

テンプレートの説明

複数の従量課金制 Elastic Compute Service ( ECS ) インスタンスのインスタンスタイプを一度に変更します。

テンプレートの種類

自動化

所有者

Alibaba Cloud

入力パラメーター

パラメーター

説明

種類

必須

デフォルト値

制限

targets

ターゲットインスタンス

Json

はい

instanceType

インスタンスタイプ

String

はい

regionId

リージョン ID。

String

いいえ

{{ ACS::RegionId }}

rateControl

タスク実行の同時実行数

Json

いいえ

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

OOSAssumeRole

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

String

いいえ

""

出力パラメーター

なし

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

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

詳細

詳細については、GitHub の ACS-ECS-BulkyModifyPostPaidInstanceSpec.yml をご参照ください。

テンプレートコンテンツ

FormatVersion: OOS-2019-06-01
Description:
  en: 従量課金インスタンスの仕様を一括で変更します
  zh-cn: Modifies the specifications of multiple pay-as-you-go instances.
  name-en: ACS-ECS-BulkyModifyPostPaidInstanceSpec
  name-zh-cn: Batch modify pay-as-you-go instance specifications
  categories:
    - instance_manage
    - computenest
Parameters:
  regionId:
    Type: String
    Label:
      en: リージョン ID
      zh-cn: Region ID
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  targets:
    Type: Json
    Label:
      en: ターゲットインスタンス
      zh-cn: Target Instance
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: regionId
  instanceType:
    Label:
      en: インスタンスタイプ
      zh-cn: Instance Type
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Instance::InstanceType'
  rateControl:
    Label:
      en: レート制御
      zh-cn: Rate Control
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOS が引き受けるロール
      zh-cn: OOS Assume Role
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
  Description:
    en: ECS インスタンスを表示します
    zh-cn: Views the ECS instances
  Action: 'ACS::SelectTargets'
  Properties:
    ResourceType: 'ALIYUN::ECS::Instance'
    RegionId: '{{ regionId }}'
    Filters:
      - '{{ targets }}'
- Name: modifyPostPaidInstanceSpec
  Action: ACS::ECS::ModifyInstanceSpec
  Description:
    en: 従量課金インスタンスのタイプを変更します
    zh-cn: Modify the type of postpaid instance
  Properties:
    regionId: '{{ regionId }}'
    instanceId: '{{ ACS::TaskLoopItem }}'
    instanceType: '{{ instanceType }}'
  Loop:
    RateControl: '{{ rateControl }}'
    Items: '{{ getInstance.Instances.Instance[].InstanceId }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - instanceType
        Label:
          default:
            zh-cn: Configure Parameters
            en: パラメーターの設定
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            zh-cn: Select ECS Instances
            en: ECS インスタンスの選択
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Control Options
            en: 制御オプション