ACS-ECD-BulkyRunCommand

更新时间:2024-09-05 08:51:59

模板名称

ACS-ECD-BulkyRunCommand 批量在多个云桌面中执行云助手命令

立即执行

模板描述

批量在多个云桌面中执行云助手命令

模板类型

自动化

所有者

Alibaba Cloud

输入参数

参数名称

描述

类型

是否必填

默认值

约束

参数名称

描述

类型

是否必填

默认值

约束

commandType

云助手命令类型

String

commandContent

云助手命令内容

String

regionId

地域ID

String

{{ ACS::RegionId }}

desktopIds

云桌面ID

List

[]

contentEncoding

脚本内容的编码方式

String

PlainText

timeout

执行脚本的超时时间

Number

600

rateControl

任务执行的并发比率

Json

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

OOSAssumeRole

OOS扮演的RAM角色

String

""

输出参数

参数名称

描述

类型

参数名称

描述

类型

commandOutputs

List

执行此模板需要的权限策略

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

详情

ACS-ECD-BulkyRunCommand详情

模板内容

FormatVersion: OOS-2019-06-01
Description:
  en: Bulky run command on ECD desktops
  zh-cn: 批量在多个云桌面中执行云助手命令
  name-en: ACS-ECD-BulkyRunCommand
  name-zh-cn: 批量在多个云桌面中执行云助手命令
Parameters:
  regionId:
    Label:
      en: RegionId
      zh-cn: 地域ID
    Type: String
    AssociationProperty: RegionId
    Default: '{{ ACS::RegionId }}'
  desktopIds:
    Label:
      en: DesktopIds
      zh-cn: 云桌面ID
    Type: List
    Default: []
  commandType:
    Label:
      en: CommandType
      zh-cn: 云助手命令类型
    Type: String
    AllowedValues:
      - RunBatScript
      - RunPowerShellScript
  contentEncoding:
    Label:
      en: ContentEncoding
      zh-cn: 脚本内容的编码方式
    Type: String
    AllowedValues:
      - PlainText
      - Base64
    Default: PlainText
  commandContent:
    Label:
      en: CommandContent
      zh-cn: 云助手命令内容
    Type: String
    AssociationProperty: Code
  timeout:
    Label:
      en: Timeout
      zh-cn: 执行脚本的超时时间
    Type: Number
    Default: 600
  rateControl:
    Label:
      en: RateControl
      zh-cn: 任务执行的并发比率
    Type: Json
    AssociationProperty: RateControl
    Default:
      Mode: Concurrency
      MaxErrors: 0
      Concurrency: 10
  OOSAssumeRole:
    Label:
      en: OOSAssumeRole
      zh-cn: OOS扮演的RAM角色
    Type: String
    Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
  - Name: runCommand
    Action: ACS::ECD::RunCommand
    Description:
      en: Run command on desktops
      zh-cn: 在云桌面中执行命令
    Properties:
      regionId: '{{ regionId }}'
      desktopId: '{{ ACS::TaskLoopItem }}'
      commandType: '{{ commandType }}'
      contentEncoding: '{{ contentEncoding }}'
      commandContent: '{{ commandContent }}'
      timeout: '{{ timeout }}'
    Loop:
      RateControl: '{{ rateControl }}'
      Items: '{{ desktopIds }}'
      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:
          - commandType
          - contentEncoding
          - commandContent
          - timeout
        Label:
          default:
            zh-cn: 配置参数
            en: Configure Parameters
      - Parameters:
          - regionId
          - desktopIds
        Label:
          default:
            zh-cn: 选择云桌面
            en: Select ECD Desktops
      - Parameters:
          - rateControl
          - OOSAssumeRole
        Label:
          default:
            zh-cn: 高级选项
            en: Control Options
  • 本页导读 (1)
  • 模板名称
  • 模板描述
  • 模板类型
  • 所有者
  • 输入参数
  • 输出参数
  • 执行此模板需要的权限策略
  • 详情