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

CloudOps Orchestration Service:ACS-ECS-BulkyReplaceSystemDiskInSLBVServerGroup

最終更新日:Jun 23, 2026

テンプレート名

ACS-ECS-BulkyReplaceSystemDiskInSLBVServerGroup:SLB 仮想サーバーグループ内の複数の ECS インスタンスのシステムディスクを置き換えます。

今すぐ実行

テンプレートの説明

SLB 仮想サーバーグループ内の複数の ECS インスタンスのシステムディスクを置き換えます。

テンプレートタイプ

オートメーション

所有者

Alibaba Cloud

入力パラメータ

パラメータ名

説明

タイプ

必須

デフォルト値

制約

imageId

ソースイメージ ID。

String

はい

VServerGroupId

VServer グループ ID。

String

はい

rateControl

タスク実行の同時実行率。

JSON

いいえ

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

OOSAssumeRole

OOS が引き受ける RAM ロール。

String

いいえ

""

出力パラメータ

パラメータ名

説明

タイプ

newSystemDiskIds

List

必要なアクセスポリシー

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "slb:DescribeVServerGroupAttribute",
                "slb:SetVServerGroupAttribute"
            ],
            "Resource": "*",
            "Effect": "Allow"
        },
        {
            "Action": [
                "ecs:DescribeDisks",
                "ecs:DescribeInstances",
                "ecs:ReplaceSystemDisk",
                "ecs:StartInstance",
                "ecs:StopInstance"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

詳細

ACS-ECS-BulkyReplaceSystemDiskInSLBVServerGroup の詳細

テンプレートの内容

FormatVersion: OOS-2019-06-01
Description:
  en: Bulky replaces system disk of ECS instances in Vserver group
  zh-cn: SLB 仮想サーバーグループ内の ECS インスタンスのシステムディスクを一括置き換えします。
  name-en: ACS-ECS-BulkyReplaceSystemDiskWithSLBVServerGroup
  name-zh-cn: SLB 仮想サーバーグループ内の ECS インスタンスのシステムディスクを一括置き換えします。
  categories:
    - slb_management
Parameters:
  imageId:
    Label:
      en: ImageId
      zh-cn: ソースイメージ ID
    Type: String
    AssociationProperty: 'ALIYUN::ECS::Image::ImageId'
  VServerGroupId:
    Label:
      en: VServerGroupId
      zh-cn: VServer グループ ID
    Type: String
  rateControl:
    Label:
      en: RateControl
      zh-cn: タスク実行の同時実行率
    Type: JSON
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 1
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: OOS が引き受ける RAM ロール
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: describeVServerGroupAttribute
    Action: ACS::ExecuteApi
    Description:
      en: Views vserver group attribute
      zh-cn: VServer グループの属性を取得します。
    Properties:
      Service: SLB
      API: DescribeVServerGroupAttribute
      Parameters:
        VServerGroupId: '{{ VServerGroupId }}'
    Outputs:
      BackendServers:
        Type: List
        ValueSelector: BackendServers.BackendServer[]
  - Name: replaceSystemDisk
    Action: ACS::ECS::ElegantReplaceSystemDiskInSLBVServerGroup
    Description:
      en: Replaces the system disk of ECS instances
      zh-cn: システムディスクを置き換えます。
    Properties:
      VServerGroupId: '{{ VServerGroupId }}'
      imageId: '{{ imageId }}'
      serverId:
        'Fn::Select':
          - ServerId
          - '{{ ACS::TaskLoopItem }}'
      weight:
        'Fn::Select':
          - Weight
          - '{{ ACS::TaskLoopItem }}'
      type:
        'Fn::Select':
          - Type
          - '{{ ACS::TaskLoopItem }}'
      port:
        'Fn::Select':
          - Port
          - '{{ ACS::TaskLoopItem }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ describeVServerGroupAttribute.BackendServers }}'
      Outputs:
        newSystemDiskIds:
          AggregateType: Fn::ListJoin
          AggregateField: newSystemDiskId
    Outputs:
      newSystemDiskId:
        Type: String
        ValueSelector: newSystemDiskId
Outputs:
  newSystemDiskIds:
    Type: List
    Value: '{{ replaceSystemDisk.newSystemDiskIds }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - imageId
          - VServerGroupId
        Label:
          default:
            zh-cn: パラメータの設定
            en: Configure Parameters
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: 詳細オプション
            en: Advanced options