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

CloudOps Orchestration Service:ACS-ECS-BulkyDownloadFile

最終更新日:Dec 21, 2025

テンプレート名

ACS-ECS-BulkyDownloadFile

今すぐ実行

テンプレートの説明

複数の Alibaba Cloud Elastic Compute Service (ECS) インスタンスにファイルを一括でダウンロードします。このテンプレートは、アプリケーションのデプロイメントやデータ同期など、複数のインスタンスにファイルを配布する必要があるシナリオに適しています。設定時には、いくつかの必須パラメーターを指定する必要があります。`regionId` パラメーターは、ターゲット ECS インスタンスのリージョンを指定します。`targets` パラメーターは、操作対象の特定の ECS インスタンスを定義します。`sourceType` パラメーターは、ローカル、Object Storage Service (OSS)、または HTTPS などのファイルソースを指定します。`sourcePath` パラメーターは、ファイルの場所を指定します。テンプレートの実行後、ダウンロード操作の結果が返され、ダウンロードステータスを確認できます。

テンプレートタイプ

自動化

所有者

Alibaba Cloud

入力パラメーター

パラメーター

説明

タイプ

必須

デフォルト値

制限

targets

ターゲットインスタンス

Json

はい

sourcePath

ファイルの選択

String

はい

regionId

リージョン ID。

String

いいえ

{{ ACS::RegionId }}

sourceType

ファイルのタイプ。

String

いいえ

local

destinationDir

ファイルを保存するディレクトリ。

String

いいえ

/root

timeout

タイムアウト期間 (秒)。

Number

いいえ

600

fileOwner

ファイル所有者。

String

いいえ

""

fileGroup

ファイルが属するファイルグループ。

String

いいえ

""

fileMode

ファイルの権限。

String

いいえ

""

overwrite

既存のファイルを上書きするかどうかを指定します。

Boolean

いいえ

True

rateControl

タスク実行の同時実行数

Json

いいえ

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

OOSAssumeRole

CloudOps Orchestration Service (OOS) がアシュームする Resource Access Management (RAM) ロール。

String

いいえ

""

出力パラメーター

パラメーター

説明

タイプ

commandOutput

String

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

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

詳細

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

テンプレートコンテンツ

注意事項: 
HTTPS 経由でファイルをダウンロードするには、Elastic Compute Service (ECS) インスタンスでパブリックネットワークアクセスを有効にする必要があります。
Object Storage Service (OSS) からファイルをダウンロードするには、ECS インスタンスに Resource Access Management (RAM) ロールを設定する必要があります。詳細については、こちらのドキュメントをご参照ください。
注意 
HTTPS を使用してファイルをダウンロードするには、ECS インスタンスにパブリックネットワークアクセスが必要です。
OSS を使用してファイルをダウンロードするには、ECS インスタンスに RAM ロールを設定する必要があります。詳細については、参照ドキュメントをご参照ください。
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: regionId
      Status: Running
  sourceType:
    Type: String
    Description:
      en: アップロードするローカルファイルのサイズは 500 MB を超えることはできません。
      zh-cn: The size of a local file to be uploaded cannot exceed 500 MB.
    Label:
      en: ソースタイプ
      zh-cn: Source type
    AllowedValues:
      - local
      - oss
      - https
    Default: local
    AssociationPropertyMetadata:
      LocaleKey: DownloadFileType
      RegionId: ${regionId}
  sourcePath:
    Type: String
    Label:
      en: ソースパス
      zh-cn: Select file
    AssociationProperty: ALIYUN::OOS::File::FileUrl
    AssociationPropertyMetadata:
      FileType: ${sourceType}
      RegionId: ${regionId}
  destinationDir:
    Label:
      en: 宛先ディレクトリ
      zh-cn: Destination directory
    Description:
      en: <li class="Li">ターゲットインスタンスにファイルを保存するための完全なパス。例:Linux の場合は /root、Windows の場合は E://。<!-- /li-->
      zh-cn: 
The full path to save the file on the target instance. For example, /root for Linux or E:// for Windows.
    Type: String
    Default: /root
  timeout:
    Label:
      en: タイムアウト (秒)
      zh-cn: Timeout (s)
    Type: Number
    Default: 600
  fileOwner:
    Label:
      en: ファイルオーナー
      zh-cn: File owner
    Type: String
    Default: ''
  fileGroup:
    Label:
      en: ファイルグループ
      zh-cn: File group
    Type: String
    Default: ''
  fileMode:
    Label:
      en: ファイルモード
      zh-cn: File mode
    Type: String
    Default: ''
  overwrite:
    Label:
      en: 既存のファイルを上書き
      zh-cn: Overwrite existing file
    Type: Boolean
    Default: true
  rateControl:
    Label:
      en: タスク実行の同時実行率
      zh-cn: Concurrency rate for task execution
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOS が偽装する RAM ロール
      zh-cn: RAM role for OOS to assume
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - 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: downloadFileToInstances
    Action: 'ACS::ECS::DownloadFile'
    Description:
      en: 指定された ECS インスタンスにファイルをダウンロードします
      zh-cn: Downloads a file to the specified ECS instances
    Properties:
      regionId: '{{ regionId }}'
      instanceId: '{{ ACS::TaskLoopItem }}'
      sourceType: '{{ sourceType }}'
      sourcePath: '{{ sourcePath }}'
      destinationDir: '{{ destinationDir }}'
      timeout: '{{ timeout }}'
      fileOwner: '{{ fileOwner }}'
      fileGroup: '{{ fileGroup }}'
      fileMode: '{{ fileMode }}'
      overwrite: '{{ overwrite }}'
    Loop:
      Items: '{{ getInstance.instanceIds }}'
      RateControl: '{{ rateControl }}'
      Outputs:
        commandOutputs:
          AggregateType: 'Fn::ListJoin'
          AggregateField: commandOutput
    Outputs:
      commandOutput:
        Type: String
        ValueSelector: commandOutput
Outputs:
  commandOutput:
    Type: String
    Value: '{{ downloadFileToInstances.commandOutputs }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - sourceType
          - sourcePath
          - destinationDir
        Label:
          default:
            zh-cn: Configure parameters
            en: パラメーターの設定
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            zh-cn: Select instances
            en: インスタンスの選択
      - Parameters:
          - timeout
          - fileOwner
          - fileGroup
          - fileMode
          - overwrite
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Advanced options
            en: 詳細オプション

    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: regionId
      Status: Running
  sourceType:
    Type: String
    Description:
      en: ローカルファイルのサイズは 500 MB を超えることはできません。
    Label:
      en: ソースタイプ
    AllowedValues:
      - local
      - oss
      - https
    Default: local
    AssociationPropertyMetadata:
      LocaleKey: DownloadFileType
      RegionId: ${regionId}
  sourcePath:
    Type: String
    Label:
      en: ソースパス
    AssociationProperty: ALIYUN::OOS::File::FileUrl
    AssociationPropertyMetadata:
      FileType: ${sourceType}
      RegionId: ${regionId}
  destinationDir:
    Label:
      en: 宛先ディレクトリ
    Description:
      en: 
    Type: String
    Default: /root
  timeout:
    Label:
      en: タイムアウト (秒)
    Type: Number
    Default: 600
  fileOwner:
    Label:
      en: ファイルオーナー
    Type: String
    Default: ''
  fileGroup:
    Label:
      en: ファイルグループ
    Type: String
    Default: ''
  fileMode:
    Label:
      en: ファイルモード
    Type: String
    Default: ''
  overwrite:
    Label:
      en: 既存のファイルを上書き
    Type: Boolean
    Default: true
  rateControl:
    Label:
      en: レートコントロール
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOS が偽装するロール
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: getInstance
    Description:
      en: 指定された ECS インスタンスを取得します。
    Action: 'ACS::SelectTargets'
    Properties:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: '{{ regionId }}'
      Filters:
        - '{{ targets }}'
    Outputs:
      instanceIds:
        Type: List
        ValueSelector: 'Instances.Instance[].InstanceId'
  - Name: downloadFileToInstances
    Action: 'ACS::ECS::DownloadFile'
    Description:
      en: 指定されたインスタンスにファイルをダウンロードします。
    Properties:
      regionId: '{{ regionId }}'
      instanceId: '{{ ACS::TaskLoopItem }}'
      sourceType: '{{ sourceType }}'
      sourcePath: '{{ sourcePath }}'
      destinationDir: '{{ destinationDir }}'
      timeout: '{{ timeout }}'
      fileOwner: '{{ fileOwner }}'
      fileGroup: '{{ fileGroup }}'
      fileMode: '{{ fileMode }}'
      overwrite: '{{ overwrite }}'
    Loop:
      Items: '{{ getInstance.instanceIds }}'
      RateControl: '{{ rateControl }}'
      Outputs:
        commandOutputs:
          AggregateType: 'Fn::ListJoin'
          AggregateField: commandOutput
    Outputs:
      commandOutput:
        Type: String
        ValueSelector: commandOutput
Outputs:
  commandOutput:
    Type: String
    Value: '{{ downloadFileToInstances.commandOutputs }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - sourceType
          - sourcePath
          - destinationDir
        Label:
          default:
            en: パラメーターの設定
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            en: インスタンスの選択
      - Parameters:
          - timeout
          - fileOwner
          - fileGroup
          - fileMode
          - overwrite
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            en: 詳細オプション
<p>注意事項:</p><ul> <li><font>HTTPS 経由でファイルをダウンロードするには、ECS インスタンスでパブリックネットワークアクセスを有効にする必要があります。</font></li><li><font>OSS からファイルをダウンロードするには、ECS インスタンスに RAM ロールを設定する必要があります。詳細については、<a href="https://www.alibabacloud.com/help/document_detail/175396.html?spm=a2c4g.120556.0.0.34c9de53iyt2Z1#vOk3w">こちらのドキュメント</a>をご参照ください。</font></li><p>注</p><ul> <li><font>HTTPS を使用してファイルをダウンロードするには、ECS インスタンスにパブリックネットワークアクセスが必要です。</font></li><li><font>OSS を使用してファイルをダウンロードするには、ECS インスタンスに RAM ロールが設定されている必要があります。詳細については、<a href="https://www.alibabacloud.com/help/document_detail/175396.html?spm=a2c4g.120556.0.0.34c9de53iyt2Z1#vOk3w">参照ドキュメント</a>をご参照ください。</font></li>
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: regionId
      Status: Running
  sourceType:
    Type: String
    Description:
      en: アップロードするローカルファイルのサイズは 500 MB を超えることはできません。
      zh-cn: The size of a local file to be uploaded cannot exceed 500 MB.
    Label:
      en: ソースタイプ
      zh-cn: Source type
    AllowedValues:
      - local
      - oss
      - https
    Default: local
    AssociationPropertyMetadata:
      LocaleKey: DownloadFileType
      RegionId: ${regionId}
  sourcePath:
    Type: String
    Label:
      en: ソースパス
      zh-cn: Select file
    AssociationProperty: ALIYUN::OOS::File::FileUrl
    AssociationPropertyMetadata:
      FileType: ${sourceType}
      RegionId: ${regionId}
  destinationDir:
    Label:
      en: 宛先ディレクトリ
      zh-cn: Destination directory
    Description:
      en: <li class="Li">ターゲットインスタンスにファイルを保存するための完全なパス。例:Linux の場合は /root、Windows の場合は E://。<!-- /li-->
      zh-cn: <li>The full path to save the file on the target instance. For example, /root for Linux or E:// for Windows.</li>
    Type: String
    Default: /root
  timeout:
    Label:
      en: タイムアウト (秒)
      zh-cn: Timeout (s)
    Type: Number
    Default: 600
  fileOwner:
    Label:
      en: ファイル所有者
      zh-cn: File owner
    Type: String
    Default: ''
  fileGroup:
    Label:
      en: ファイルグループ
      zh-cn: File group
    Type: String
    Default: ''
  fileMode:
    Label:
      en: ファイルモード
      zh-cn: File mode
    Type: String
    Default: ''
  overwrite:
    Label:
      en: 既存のファイルを上書き
      zh-cn: Overwrite existing file
    Type: Boolean
    Default: true
  rateControl:
    Label:
      en: タスク実行の同時実行レート
      zh-cn: Concurrency rate for task execution
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOS が偽装する RAM ロール
      zh-cn: RAM role for OOS to assume
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - 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: downloadFileToInstances
    Action: 'ACS::ECS::DownloadFile'
    Description:
      en: 指定された ECS インスタンスにファイルをダウンロードします
      zh-cn: Downloads a file to the specified ECS instances
    Properties:
      regionId: '{{ regionId }}'
      instanceId: '{{ ACS::TaskLoopItem }}'
      sourceType: '{{ sourceType }}'
      sourcePath: '{{ sourcePath }}'
      destinationDir: '{{ destinationDir }}'
      timeout: '{{ timeout }}'
      fileOwner: '{{ fileOwner }}'
      fileGroup: '{{ fileGroup }}'
      fileMode: '{{ fileMode }}'
      overwrite: '{{ overwrite }}'
    Loop:
      Items: '{{ getInstance.instanceIds }}'
      RateControl: '{{ rateControl }}'
      Outputs:
        commandOutputs:
          AggregateType: 'Fn::ListJoin'
          AggregateField: commandOutput
    Outputs:
      commandOutput:
        Type: String
        ValueSelector: commandOutput
Outputs:
  commandOutput:
    Type: String
    Value: '{{ downloadFileToInstances.commandOutputs }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - sourceType
          - sourcePath
          - destinationDir
        Label:
          default:
            zh-cn: Configure parameters
            en: パラメーターの設定
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            zh-cn: Select instances
            en: インスタンスの選択
      - Parameters:
          - timeout
          - fileOwner
          - fileGroup
          - fileMode
          - overwrite
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: Advanced options
            en: 詳細オプション
</ul>
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: regionId
      Status: Running
  sourceType:
    Type: String
    Description:
      en: ローカルファイルのサイズは 500 MB を超えることはできません。
    Label:
      en: ソースタイプ
    AllowedValues:
      - local
      - oss
      - https
    Default: local
    AssociationPropertyMetadata:
      LocaleKey: DownloadFileType
      RegionId: ${regionId}
  sourcePath:
    Type: String
    Label:
      en: ソースパス
    AssociationProperty: ALIYUN::OOS::File::FileUrl
    AssociationPropertyMetadata:
      FileType: ${sourceType}
      RegionId: ${regionId}
  destinationDir:
    Label:
      en: 宛先ディレクトリ
    Description:
      en: 
    Type: String
    Default: /root
  timeout:
    Label:
      en: タイムアウト (秒)
    Type: Number
    Default: 600
  fileOwner:
    Label:
      en: ファイル所有者
    Type: String
    Default: ''
  fileGroup:
    Label:
      en: ファイルグループ
    Type: String
    Default: ''
  fileMode:
    Label:
      en: ファイルモード
    Type: String
    Default: ''
  overwrite:
    Label:
      en: 既存のファイルを上書き
    Type: Boolean
    Default: true
  rateControl:
    Label:
      en: レート制御
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOS 偽装ロール
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: getInstance
    Description:
      en: 指定された ECS インスタンスを取得します。
    Action: 'ACS::SelectTargets'
    Properties:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: '{{ regionId }}'
      Filters:
        - '{{ targets }}'
    Outputs:
      instanceIds:
        Type: List
        ValueSelector: 'Instances.Instance[].InstanceId'
  - Name: downloadFileToInstances
    Action: 'ACS::ECS::DownloadFile'
    Description:
      en: 指定されたインスタンスにファイルをダウンロードします。
    Properties:
      regionId: '{{ regionId }}'
      instanceId: '{{ ACS::TaskLoopItem }}'
      sourceType: '{{ sourceType }}'
      sourcePath: '{{ sourcePath }}'
      destinationDir: '{{ destinationDir }}'
      timeout: '{{ timeout }}'
      fileOwner: '{{ fileOwner }}'
      fileGroup: '{{ fileGroup }}'
      fileMode: '{{ fileMode }}'
      overwrite: '{{ overwrite }}'
    Loop:
      Items: '{{ getInstance.instanceIds }}'
      RateControl: '{{ rateControl }}'
      Outputs:
        commandOutputs:
          AggregateType: 'Fn::ListJoin'
          AggregateField: commandOutput
    Outputs:
      commandOutput:
        Type: String
        ValueSelector: commandOutput
Outputs:
  commandOutput:
    Type: String
    Value: '{{ downloadFileToInstances.commandOutputs }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - sourceType
          - sourcePath
          - destinationDir
        Label:
          default:
            en: パラメーターの設定
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            en: インスタンスの選択
      - Parameters:
          - timeout
          - fileOwner
          - fileGroup
          - fileMode
          - overwrite
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            en: 詳細オプション
</ul>FormatVersion: OOS-2019-06-01
Description:
  en: '複数の Alibaba Cloud ECS インスタンスにファイルを一括でアップロードします。アプリケーションのデプロイメントやデータ同期など、複数のインスタンスにファイルを配布する必要があるシナリオに適用できます。設定時に、ユーザーは次の必須パラメーター情報を提供する必要があります:リージョン ID (regionId) は、ファイルがアップロードされるターゲット ECS インスタンスのリージョンを指定します。ターゲットインスタンス (targets) は、操作対象の特定の ECS インスタンスを定義します。ソースタイプ (sourceType) は、ファイルのソースメソッド (例:ローカル、OSS、または HTTPS) を指定します。ソースパス (sourcePath) は、ファイルの正確な場所です。実行後、テンプレートはファイルアップロード操作の結果を提供し、ユーザーがファイルアップロードのステータスを確認できるようにします。'
  name-en: ファイルのアップロード
  categories:
    - instance_manage
    - application_manage
    - computenest
    - tag_operate_resource
Parameters:
  regionId:
    Type: String
    Label:
      en: RegionId
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  targets:
    Type: Json
    Label:
      en: TargetInstance
    Description:
      en: <p class="p">注:</p> <ul class="ul"> <li class="li"><font color='red'>HTTPS 経由でファイルをダウンロードするには、ECS インスタンスにパブリックネットワークアクセスが必要です。</font></li><li class="li"><font color='red'>OSS からファイルをダウンロードするには、ECS インスタンスに RAM ロールがアタッチされている必要があります。詳細については、<a href="https://www.alibabacloud.com/help/operation-orchestration-service/latest/download-multiple-objects-to-an-instance#vOk3w">関連ドキュメント</a>をご参照ください。</font></li></ul>
    AssociationProperty: Targets
    AssociationPropertyMetadata:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: regionId
      Status: Running
  sourceType:
    Type: String
    Description:
      en: ローカルマシンからアップロードされるファイルのサイズは 500 MB を超えることはできません。
    Label:
      en: SourceType
    AllowedValues:
      - local
      - oss
      - https
    Default: local
    AssociationPropertyMetadata:
      LocaleKey: DownloadFileType
      RegionId: ${regionId}
  sourcePath:
    Type: String
    Label:
      en: SourcePath
    AssociationProperty: ALIYUN::OOS::File::FileUrl
    AssociationPropertyMetadata:
      FileType: ${sourceType}
      RegionId: ${regionId}
  destinationDir:
    Label:
      en: DestinationDir
    Description:
      en: ファイルが保存されるターゲットインスタンス上の完全なパス。例:Linux の場合は /root、Windows の場合は E://。
    Type: String
    Default: /root
  timeout:
    Label:
      en: タイムアウト (秒)
    Type: Number
    Default: 600
  fileOwner:
    Label:
      en: FileOwner
    Type: String
    Default: ''
  fileGroup:
    Label:
      en: FileGroup
    Type: String
    Default: ''
  fileMode:
    Label:
      en: FileMode
    Type: String
    Default: ''
  overwrite:
    Label:
      en: Overwrite
    Type: Boolean
    Default: true
  rateControl:
    Label:
      en: RateControl
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: getInstance
    Description:
      en: 指定された ECS インスタンスを取得します。
    Action: 'ACS::SelectTargets'
    Properties:
      ResourceType: 'ALIYUN::ECS::Instance'
      RegionId: '{{ regionId }}'
      Filters:
        - '{{ targets }}'
    Outputs:
      instanceIds:
        Type: List
        ValueSelector: 'Instances.Instance[].InstanceId'
  - Name: downloadFileToInstances
    Action: 'ACS::ECS::DownloadFile'
    Description:
      en: 指定された ECS インスタンスにファイルをダウンロードします。
    Properties:
      regionId: '{{ regionId }}'
      instanceId: '{{ ACS::TaskLoopItem }}'
      sourceType: '{{ sourceType }}'
      sourcePath: '{{ sourcePath }}'
      destinationDir: '{{ destinationDir }}'
      timeout: '{{ timeout }}'
      fileOwner: '{{ fileOwner }}'
      fileGroup: '{{ fileGroup }}'
      fileMode: '{{ fileMode }}'
      overwrite: '{{ overwrite }}'
    Loop:
      Items: '{{ getInstance.instanceIds }}'
      RateControl: '{{ rateControl }}'
      Outputs:
        commandOutputs:
          AggregateType: 'Fn::ListJoin'
          AggregateField: commandOutput
    Outputs:
      commandOutput:
        Type: String
        ValueSelector: commandOutput
Outputs:
  commandOutput:
    Type: String
    Value: '{{ downloadFileToInstances.commandOutputs }}'
Metadata:
  ALIYUN::OOS::Interface:
    ParameterGroups:
      - Parameters:
          - sourceType
          - sourcePath
          - destinationDir
        Label:
          default:
            en: パラメーターの設定
      - Parameters:
          - regionId
          - targets
        Label:
          default:
            en: インスタンスの選択
      - Parameters:
          - timeout
          - fileOwner
          - fileGroup
          - fileMode
          - overwrite
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            en: 制御オプション