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

CloudOps Orchestration Service:ACS-ECS-BulkyRunCommandAcrossRegions

最終更新日:Jun 23, 2026

テンプレート名

複数のリージョンにまたがる Elastic Compute Service (ECS) インスタンスで、クラウドアシスタントのコマンドをバッチで実行します。

今すぐ実行

説明

複数のリージョンにまたがる ECS インスタンスで、クラウドアシスタントのコマンドをバッチで実行します。

テンプレートタイプ

オートメーション

所有者

Alibaba Cloud

入力パラメーター

パラメーター名

説明

タイプ

必須

デフォルト値

制約

instanceInfos

コマンドを実行する ECS インスタンス。

List

任意

[]

commandType

クラウドアシスタント コマンドのタイプ。

String

任意

RunShellScript

commandContent

ECS インスタンスで実行するコマンド。

String

任意

echo hello

timeout

コマンド実行のタイムアウト時間。 単位:秒。

Number

任意

600

rateControl

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

Json

任意

{‘Mode’: ‘Concurrency’, ‘MaxErrors’: 0, ‘Concurrency’: 10}

OOSAssumeRole

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

String

任意

""

出力パラメーター

パラメーター名

説明

タイプ

commandOutputs

List

必要なアクセスポリシー

{
    "Version": "1",
    "Statement": [
        {
            "Action": [
                "ecs:DescribeInvocationResults",
                "ecs:DescribeInvocations",
                "ecs:RunCommand"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}

詳細

ACS-ECS-BulkyRunCommandAcrossRegions の詳細

テンプレートの内容

FormatVersion: OOS-2019-06-01
Description:
  en: Bulky run command on ECS instances across multiple regions
  ja: 複数のリージョンにまたがる ECS インスタンスでコマンドを一括実行します。
  name-en: ACS-ECS-BulkyRunCommandAcrossRegions
  name-ja: ACS-ECS-BulkyRunCommandAcrossRegions
  categories:
    - run_command
Parameters:
  instanceInfos:
    Description:
      en: 'Format: {"regionId": "cn-xxx", "instanceId": "i-xxx"}'
      ja: 'フォーマット:{"regionId": "cn-xxx", "instanceId": "i-xxx"}'
    Label:
      en: InstanceInfos
      ja: インスタンス情報
    Type: List
    Default: []
  commandType:
    Label:
      en: CommandType
      ja: コマンドタイプ
    Type: String
    AllowedValues:
      - RunBatScript
      - RunPowerShellScript
      - RunShellScript
    Default: RunShellScript
  commandContent:
    Label:
      en: CommandContent
      ja: コマンド内容
    Type: String
    AssociationProperty: Code
    Default: echo hello
  timeout:
    Label:
      en: Timeout
      ja: タイムアウト
    Type: Number
    Default: 600
  rateControl:
    Label:
      en: RateControl
      ja: レート制御
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      ja: OOS が使用するロール
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: runCommand
    Action: ACS::ECS::RunCommand
    Description:
      en: Execute cloud assistant command
      ja: クラウドアシスタントのコマンドを実行します。
    Properties:
      regionId:
        'Fn::Select':
          - regionId
          - '{{ ACS::TaskLoopItem }}'
      instanceId:
        'Fn::Select':
          - instanceId
          - '{{ ACS::TaskLoopItem }}'
      commandContent: '{{ commandContent }}'
      commandType: '{{ commandType }}'
      timeout: '{{ timeout }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ instanceInfos }}'
      Outputs:
        commandOutputs:
          AggregateType: Fn::ListJoin
          AggregateField: commandOutput
    Outputs:
      commandOutput:
        Type: String
        ValueSelector: invocationOutput
Outputs:
  commandOutputs:
    Type: List
    Value: '{{ runCommand.commandOutputs }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - instanceInfos
          - commandType
          - commandContent
          - timeout
        Label:
          default:
            en: Configure Parameters
            ja: パラメーターの設定
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            en: Control Options
            ja: 制御オプション