ALIYUN::CloudPhone::RunCommand类型用于在云手机中执行命令。
语法
{
"Type": "ALIYUN::CloudPhone::RunCommand",
"Properties": {
"Command": String,
"InstanceIds": List
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
Command | String | 是 | 否 | 待执行的命令。 | 最大长度为1024字节,只支持大小写字母、数字、下划线(_)、点(.)、斜线(/)、冒号(:)、中划线(-)。 |
InstanceIds | List | 是 | 否 | 待执行命令的实例ID列表。 | 最多支持10个实例。 |
返回值
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" } } } } }