ALIYUN::OOS::Execution is used to start an execution.
Syntax
{
"Type": "ALIYUN::OOS::Execution",
"Properties": {
"ResourceOptions": Map,
"Parameters": Map,
"TemplateName": String,
"ParentExecutionId": String,
"SafetyCheck": String,
"Mode": String,
"TemplateVersion": String
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
ResourceOptions | Map | No | No | The resource options used by ROS. | None |
Parameters | Map | No | No | The JSON-formatted strings that consist of parameters. Example: {"Status": "Running"} . Default value: {}.
|
None |
TemplateName | String | Yes | No | The name of the template. | The template name can be up to 200 characters in length and can contain letters, digits, hyphens (-), and underscores (_). It cannot start with ALIYUN, ACS, or ALIBABA. |
ParentExecutionId | String | No | No | The ID of the parent execution. | None |
SafetyCheck | String | No | No | The safety check mode. | Valid values:
Default value: ConfirmEveryHighRiskAction. |
Mode | String | No | No | The execution mode. | Valid values:
Default value: Automatic. |
TemplateVersion | String | No | No | The version number. If you do not specify this parameter, the system uses the latest version. | None |
ResourceOptions syntax
"ResourceOptions": {
"SuccessStatuses": List,
"Timeout": Number,
"CancelOnDelete": Boolean,
"FailureStatuses": List
}
ResourceOptions properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
SuccessStatuses | List | No | No | Specifies whether resources are created. If the Status value is included in the FailureStatuses value, the creation is considered failed. If the Status value is included in the SuccessStatuses value, the creation is considered successful. If neither of the preceding conditions is met, the system waits till the stack creation request times out. | Valid values:
Default value: Success. |
Timeout | Number | No | No | The timeout period. Unit: seconds. Default value: 1800. | None |
CancelOnDelete | Boolean | No | No | Specifies whether to cancel the execution that has not been completed when the resource is being deleted. Default value: false | None |
FailureStatuses | List | No | No | Specifies whether resources fail to be created. FailureStatuses takes precedence over SuccessStatuses. | Valid values:
Default value: |
Response parameters
Fn::GetAtt
- Status: the execution status.
- WindowsCurlCli: provides Windows with cURL CLI command prefixes and sends a message that indicates whether the execution is completed or failed.
- PowerShellCurlCli: provides PowerShell with cURL CLI command prefixes and sends a message that indicates whether the execution is completed or failed.
- Outputs: the output of the execution.
- ExecutionId: the unique ID of the execution.
- CurlCli: the cURL command.
- StatusMessage: the status information.
- Counters: the number of executions.
Examples
JSON
format {
"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
format 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