全部产品
Search
文档中心

资源编排:ALIYUN::CloudPhone::RunCommand

更新时间:May 27, 2024

ALIYUN::CloudPhone::RunCommand类型用于在云手机中执行命令。

语法

{
  "Type": "ALIYUN::CloudPhone::RunCommand",
  "Properties": {
    "Command": String,
    "InstanceIds": List,
    "RunAgainOn": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

Command

String

待执行的命令。

最大长度为1024字节,只支持大小写字母、数字、下划线(_)、点(.)、斜线(/)、冒号(:)、中划线(-)。

InstanceIds

List

待执行命令的实例ID列表。

最多支持10个实例。

RunAgainOn

List

再次执行命令的阶段。

无。

返回值

Fn::GetAtt

示例

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Command:
    Description:
      en: 'The command to be executed.

        The maximum length of a command is 1024 bytes, and only supports lowercase
        letters, numbers, downline (_), points (.), Slanting (/), colon (:), medium
        line (-).'
    Required: true
    Type: String
  InstanceIds:
    AssociationProperty: List[Parameter]
    AssociationPropertyMetadata:
      Parameter:
        Required: false
        Type: String
    Description:
      en: 'ID of the instance executing the command.

        Range of n: 1 ~ 10'
    MaxLength: 10
    MinLength: 1
    Required: true
    Type: Json
Resources:
  RunCommand:
    Properties:
      Command:
        Ref: Command
      InstanceIds:
        Ref: InstanceIds
    Type: ALIYUN::CloudPhone::RunCommand
                        

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Command": {
      "Type": "String",
      "Description": {
        "en": "The command to be executed.\nThe maximum length of a command is 1024 bytes, and only supports lowercase letters, numbers, downline (_), points (.), Slanting (/), colon (:), medium line (-)."
      },
      "Required": true
    },
    "InstanceIds": {
      "AssociationPropertyMetadata": {
        "Parameter": {
          "Type": "String",
          "Required": false
        }
      },
      "AssociationProperty": "List[Parameter]",
      "Type": "Json",
      "Description": {
        "en": "ID of the instance executing the command.\nRange of n: 1 ~ 10"
      },
      "Required": true,
      "MinLength": 1,
      "MaxLength": 10
    }
  },
  "Resources": {
    "RunCommand": {
      "Type": "ALIYUN::CloudPhone::RunCommand",
      "Properties": {
        "Command": {
          "Ref": "Command"
        },
        "InstanceIds": {
          "Ref": "InstanceIds"
        }
      }
    }
  }
}