You can call this operation in the following scenarios to manage an execution that is in waiting state:
- A template includes an ACS:Approve task. When an execution of the template runs to the task, the execution is suspended and enters the waiting state.
- In debug mode, after an execution starts or after a task is complete, you can call this operation to specify which task to perform next.
- An execution encounters a high-risk task. You can call this operation confirm whether to continue the execution. The notification type is Approve or Reject.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | NotifyExecution | The operation that you want to perform. Set this parameter to NotifyExecution. |
ExecutionId | String | Yes | exec-xxx | The ID of the execution. |
NotifyType | String | Yes | Approve | Approve: approves the execution of a task in waiting state or a high-risk task. For example, when you understand and accept related risks, you can call the operation with NotifyType set to Approve to allows a high-risk task to run. Reject: rejects the execution of a task in waiting state or a high-risk task. ExecuteTask: runs the specified task. Use it in debug mode along with the Parameters parameter. CancelTask: cancels the current task. Use it in debug mode along with Parameters parameter . CompleteExecution: terminates an execution. Use it in debug mode along with the ExecutionStatus parameter. |
NotifyNote | String | No | - | The message to provide a more detailed explanation. |
Parameters | String | No | {} | Specifies parameters for debugging. This parameter is only valid if you set NotifyType to ExecuteTask. |
TaskName | String | No | describeInstance | The name of the next task to run. |
ExecutionStatus | String | No | Success | The status of the execution. This parameter is only valid if you set NotifyType to CompleteExecution. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 14A07460-EBE7-47CA-9757-12CC4761D47A | The ID of the request. |
Examples
Sample request
https://oos.cn-hangzhou.aliyuncs.com/?Action=NotifyExecution
&ExecutionId=exec-8a2aaf460fdf47c6b5ef
&NotifyType=Approve
&<Common request parameters>
Sample success response JSON
format
{
"RequestId": "491DF8C2-34C9-4679-9DB3-4C0F49B129AC"
}
Error codes
Error code | HTTP status code | Error message | Description |
---|---|---|---|
InvalidVersion | 400 | Specified parameter Version is not valid. | The error message returned because the specified version is invalid. Specify a valid version in the URL and try again. |
InvalidAction.NotFound | 400 | Specified api is not found, please check your url and method. | The error message returned because the specified operation does not exist. Enter the correct Action in the URL. |
User.NoPermission | 400 | User has no permission to do the action: ({api_name}) | The error message returned because the user does not have the permission to call this operation. Check whether the current user has the permission to call the OOS API in the RAM console. |
InvalidStsToken | 400 | Invalid STS token to do the action: ({api_name}) | The error message returned because the specified STS token is invalid. |
ExpiredStsToken | 400 | Expired STS token to do the action: ({api_name}) | The error message returned because the specified STS token has expired. |
InvalidAccountType | 400 | The account type ({account_type}) was not supported. | The error message returned because the specified account type is not supported. |
EntityNotExist.TaskExecution | 404 | The specific task execution {{key}} does not exist. | The error message returned because the task does not exist. |
EntityNotExist.Execution | 404 | The specific execution {{key}} does not exist. | The error message returned because the specified execution does not exist. |