ALIYUN::OOS::Execution类型用于启动一个执行。
语法
{
"Type": "ALIYUN::OOS::Execution",
"Properties": {
"ResourceOptions": Map,
"Parameters": Map,
"TemplateName": String,
"ParentExecutionId": String,
"SafetyCheck": String,
"Mode": String,
"TemplateVersion": String
}
}
属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
ResourceOptions | Map | 否 | 否 | ROS使用的资源选项。 | 详情请参见ResourceOptions属性。 |
Parameters | Map | 否 | 否 | 由参数集合组成的JSON字符串。 | 示例值:{"Status": "Running"} 。默认值:{}。
|
TemplateName | String | 是 | 否 | 模板名称。 | 最长为200个字符,不能以ALIYUN、ACS、ALIBABA开头。可包含英文字母、数字、短划线(-)和下划线(_)。 |
ParentExecutionId | String | 否 | 否 | 父执行ID。 | 无 |
SafetyCheck | String | 否 | 否 | 安全检查模式。 | 取值:
|
Mode | String | 否 | 否 | 执行模式。 | 取值范围:
|
TemplateVersion | String | 否 | 否 | 版本号。 | 如果不填默认为最新的版本号。 |
ResourceOptions语法
"ResourceOptions": {
"SuccessStatuses": List,
"Timeout": Number,
"CancelOnDelete": Boolean,
"FailureStatuses": List
}
ResourceOptions属性
属性名称 | 类型 | 必须 | 允许更新 | 描述 | 约束 |
---|---|---|---|---|---|
SuccessStatuses | List | 否 | 否 | ROS使用该属性判断资源是否创建成功。 | 取值范围:
|
Timeout | Number | 否 | 否 | 超时时间。 | 单位:秒。
默认值:1800。 |
CancelOnDelete | Boolean | 否 | 否 | 删除资源时,如果执行未完成是否取消执行。 | 取值:
|
FailureStatuses | List | 否 | 否 | ROS使用该属性判断资源是否创建失败。FailureStatuses优先级高于SuccessStatuses。 | 取值:
默认值: |
返回值
Fn::GetAtt
- Status:执行状态。
- WindowsCurlCli:为Windows提供curl CLI命令前缀,可用于发出处理完成或失败的信号。详情请参见NotifyExecution。
- PowerShellCurlCli:为PowerShell提供curl CLI命令前缀,可用于发出信号处理完成或失败。
- Outputs:执行输出结果。
- ExecutionId:执行的唯一标识。
- CurlCli:curl命令。
- StatusMessage:状态信息。
- Counters:执行数。
示例
JSON
格式: {
"ROSTemplateFormatVersion": "2015-09-01",
"Resources": {
"Execution": {
"Type": "ALIYUN::OOS::Execution",
"Properties": {
"ResourceOptions": {
"Ref": "ResourceOptions"
},
"Parameters": {
"Ref": "Parameters"
},
"TemplateName": {
"Ref": "TemplateName"
},
"ParentExecutionId": {
"Ref": "ParentExecutionId"
},
"SafetyCheck": {
"Ref": "SafetyCheck"
},
"Mode": {
"Ref": "Mode"
},
"TemplateVersion": {
"Ref": "TemplateVersion"
}
}
}
},
"Parameters": {
"ResourceOptions": {
"Type": "Json",
"Description": "Resource options user by ROS."
},
"Parameters": {
"Type": "Json",
"Description": "Parameters for the execution of template."
},
"TemplateName": {
"Type": "String",
"Description": "Template name. Content is limited to letters, numbers, underlined, underline, the length of 200 characters, and can not begin to ALIYUN, ACS, ALIBABA.",
"MaxLength": 200
},
"ParentExecutionId": {
"Type": "String",
"Description": "Parent execution ID."
},
"SafetyCheck": {
"Default": "ConfirmEveryHighRiskAction",
"Type": "String",
"Description": "Security check mode. Allowed values:- Skip: This option means that customers understand the risks, you can do anything without confirmation Action, no matter what the level of risk. It takes effect only if Mode is Automatic. - ConfirmEveryHighRiskAction (default): This option would require customers to confirm each Action a high risk. NotifyExecution by calling customer interface to confirm or cancel.",
"AllowedValues": [
"ConfirmEveryHighRiskAction",
"Skip"
]
},
"Mode": {
"Default": "Automatic",
"Type": "String",
"Description": "Execution mode.",
"AllowedValues": [
"Automatic",
"Debug"
]
},
"TemplateVersion": {
"Type": "String",
"Description": "Version number of template. Default to the latest version."
}
},
"Outputs": {
"Status": {
"Description": "Execution status.",
"Value": {
"Fn::GetAtt": [
"Execution",
"Status"
]
}
},
"WindowsCurlCli": {
"Description": "Convenience attribute, provides curl CLI command prefix for Windows, which can be used to notify oos execution instead of OOS API NotifyExecution. You can notify approve to oos execution by adding --data-binary \"{\\\"data\\\": {\\\"NotifyType\\\": \\\"Approve\\\"}}\" You can also notify execution via ROS API SignalResource. API parameters Status and UniqueId are ignored. Use API parameter Data to pass data.",
"Value": {
"Fn::GetAtt": [
"Execution",
"WindowsCurlCli"
]
}
},
"PowerShellCurlCli": {
"Description": "Convenience attribute, provides curl CLI command prefix for PowerShell, which can be used to notify oos execution instead of OOS API NotifyExecution. You can notify approve to oos execution by adding -Body '{\"data\": {\"NotifyType\": \"Approve\"}}' You can also notify execution via ROS API SignalResource. API parameters Status and UniqueId are ignored. Use API parameter Data to pass data.",
"Value": {
"Fn::GetAtt": [
"Execution",
"PowerShellCurlCli"
]
}
},
"Outputs": {
"Description": "Execution output.",
"Value": {
"Fn::GetAtt": [
"Execution",
"Outputs"
]
}
},
"ExecutionId": {
"Description": "Execution ID.",
"Value": {
"Fn::GetAtt": [
"Execution",
"ExecutionId"
]
}
},
"CurlCli": {
"Description": "Convenience attribute, provides curl CLI command prefix, which can be used to notify oos execution instead of OOS API NotifyExecution. You can notify approve to oos execution by adding --data-binary '{\"data\": {\"NotifyType\": \"Approve\"}}' You can also notify execution via ROS API SignalResource. API parameters Status and UniqueId are ignored. Use API parameter Data to pass data.",
"Value": {
"Fn::GetAtt": [
"Execution",
"CurlCli"
]
}
},
"StatusMessage": {
"Description": "Execution status information.",
"Value": {
"Fn::GetAtt": [
"Execution",
"StatusMessage"
]
}
},
"Counters": {
"Description": "Task statistics: FailedTasks, SuccessTasks, TotalTasks.",
"Value": {
"Fn::GetAtt": [
"Execution",
"Counters"
]
}
}
}
}
YAML
格式: ROSTemplateFormatVersion: '2015-09-01'
Resources:
Execution:
Type: ALIYUN::OOS::Execution
Properties:
ResourceOptions:
Ref: ResourceOptions
Parameters:
Ref: Parameters
TemplateName:
Ref: TemplateName
ParentExecutionId:
Ref: ParentExecutionId
SafetyCheck:
Ref: SafetyCheck
Mode:
Ref: Mode
TemplateVersion:
Ref: TemplateVersion
Parameters:
ResourceOptions:
Type: Json
Description: Resource options user by ROS.
Parameters:
Type: Json
Description: Parameters for the execution of template.
TemplateName:
Type: String
Description: Template name. Content is limited to letters, numbers, underlined,
underline, the length of 200 characters, and can not begin to ALIYUN, ACS, ALIBABA.
MaxLength: 200
ParentExecutionId:
Type: String
Description: Parent execution ID.
SafetyCheck:
Default: ConfirmEveryHighRiskAction
Type: String
Description: 'Security check mode. Allowed values:- Skip: This option means that
customers understand the risks, you can do anything without confirmation Action,
no matter what the level of risk. It takes effect only if Mode is Automatic.
- ConfirmEveryHighRiskAction (default): This option would require customers
to confirm each Action a high risk. NotifyExecution by calling customer interface
to confirm or cancel.'
AllowedValues:
- ConfirmEveryHighRiskAction
- Skip
Mode:
Default: Automatic
Type: String
Description: Execution mode.
AllowedValues:
- Automatic
- Debug
TemplateVersion:
Type: String
Description: Version number of template. Default to the latest version.
Outputs:
Status:
Description: Execution status.
Value:
Fn::GetAtt:
- Execution
- Status
WindowsCurlCli:
Description: 'Convenience attribute, provides curl CLI command prefix for Windows,
which can be used to notify oos execution instead of OOS API NotifyExecution.
You can notify approve to oos execution by adding --data-binary "{\"data\":
{\"NotifyType\": \"Approve\"}}"
You can also notify execution via ROS API SignalResource. API parameters Status
and UniqueId are ignored. Use API parameter Data to pass data.'
Value:
Fn::GetAtt:
- Execution
- WindowsCurlCli
PowerShellCurlCli:
Description: 'Convenience attribute, provides curl CLI command prefix for PowerShell,
which can be used to notify oos execution instead of OOS API NotifyExecution.
You can notify approve to oos execution by adding -Body ''{"data": {"NotifyType":
"Approve"}}''
You can also notify execution via ROS API SignalResource. API parameters Status
and UniqueId are ignored. Use API parameter Data to pass data.'
Value:
Fn::GetAtt:
- Execution
- PowerShellCurlCli
Outputs:
Description: Execution output.
Value:
Fn::GetAtt:
- Execution
- Outputs
ExecutionId:
Description: Execution ID.
Value:
Fn::GetAtt:
- Execution
- ExecutionId
CurlCli:
Description: 'Convenience attribute, provides curl CLI command prefix, which can
be used to notify oos execution instead of OOS API NotifyExecution. You can
notify approve to oos execution by adding --data-binary ''{"data": {"NotifyType":
"Approve"}}''
You can also notify execution via ROS API SignalResource. API parameters Status
and UniqueId are ignored. Use API parameter Data to pass data.'
Value:
Fn::GetAtt:
- Execution
- CurlCli
StatusMessage:
Description: Execution status information.
Value:
Fn::GetAtt:
- Execution
- StatusMessage
Counters:
Description: 'Task statistics: FailedTasks, SuccessTasks, TotalTasks.'
Value:
Fn::GetAtt:
- Execution
- Counters
在文档使用中是否遇到以下问题
更多建议
匿名提交