As the most important component of a template, the Tasks parameter defines the details of O&M operations. The type of a task is called an action. Operation Orchestration Service (OOS) provides you with a wide range of actions, including actions for common cloud products, such as Elastic Compute Service (ECS) and Relational Database Service (RDS). If you need common actions for cloud products that are not provided by OOS, you can contact us and provide us with your scenarios. You can also customize atom actions so that you can orchestrate and execute O&M operations immediately.
- YAML format
- Name: TaskName1 # Required. The name of the task. The name can contain letters, digits, underscores (_), and hyphens (-). It can be up to 200 characters in length. We recommend that you use the camel case for a name. Example: StartInstance.
Action: TaskType # Required. The type of the task. For more information, see the relevant documentation.
Description: description # Optional. The description of the task, such as the features of the task.
Properties: # The attributes of the task. The attribute list varies depending on the action used. For more information, see the relevant documentation.
Property1: Value1 # The attribute that the action depends on.
Outputs: # The output parameters of the task. These parameters can be used as the input of subsequent tasks or the output of the template.
Type: # Optional. The type of the output parameter. Valid values: List, Number, String, Boolean, and Json. Default value: String.
ValueSelector: "jq selector" # The jQuery selector for selecting the required JSON data. For example, when you call an API operation for a task, the jQuery selector extracts the required information from the returned JSON data. For more information, see the examples of cloud product actions and public templates.
# Parameters for process control
OnError: "ACS::END/ACS::NEXT/other-task-name" # Optional. The process to be executed if an error occurs when the task is executed. Default value: END, indicating that the execution will end when an error occurs.
OnSuccess: "ACS::NEXT/other-task-name/ACS::END" # Optional. The process to be executed when the task is successfully executed. Default value: NEXT, indicating that the next task will be executed after the current task is successfully executed.
# Parameters for risk warning
Risk: High/Normal # Optional. The level of the risk. For more information, see the relevant documentation.
# Parameters for advanced control of the ACS::ExecuteAPI action
Delay: duration # Optional. The time interval before a retry starts. It must be a positive integer, such as 10. Unit: seconds.
Retries: times # Optional. The number of retries. It must be a positive integer.
DelayType: delayType # Optional. The type of the time interval for retries. Valid values: Constant, Linear, and Exponential. If this parameter is set to Constant, the actual delay is the duration specified by the Delay parameter. If this parameter is set to Linear, the actual delay is the sum of the duration specified by the Delay parameter and the product of the values of the BackOff and Retries parameters. If this parameter is set to Exponential, the actual delay is the sum of the duration specified by the Delay parameter and the value of the BackOff parameter raised to the power of the value of the Retries parameter. Default value: Constant.
BackOff: backOff # Optional. The backoff period before a retry starts. It must be a positive integer. This parameter is valid only when the DelayType parameter is set to Linear or Exponential.
- JSON format (For more information, see the parameter description for the YAML format.)
"ValueSelector": "jq selector"