You can call this operation to query task executions with multiple filtering methods.
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListTaskExecutions | The operation that you want to perform. Set this parameter to ListTaskExecutions. |
ExecutionId | String | No | exec-xxx | The ID of the execution. |
Status | String | No | Running | The status of the execution. |
TaskName | String | No | describeInstance | The name of the task. |
StartDateBefore | String | No | 2019-05-16T10:26:14Z | Specifies a time so that only executions that start before the specified time are returned. |
StartDateAfter | String | No | 2019-05-16T10:26:14Z | Specifies a time so that only executions that start after the specified time are returned. |
EndDateBefore | String | No | 2019-05-16T10:26:14Z | Specifies a time so that only executions that end before the specified time are returned. |
EndDateAfter | String | No | 2019-05-16T10:26:14Z | Specifies a time so that only executions that end after the specified time are returned. |
TaskExecutionId | String | No | task-exec-xxx | The ID of the task execution. |
ParentTaskExecutionId | String | No | task-exec-xxx | The ID of the parent task execution. Use it to filter loop task executions. Set this parameter to the TaskExecutionId of the parent task execution. |
IncludeChildTaskExecution | Boolean | No | False | Specifies whether child task executions generated by the loop task are returned. Default value: False. |
MaxResults | Integer | No | 50 | The maximum number of task executions that are displayed on each page. Valid values: 20 to 100. Default value: 50. |
NextToken | String | No | MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ3NjFENDdB | The token that is required to retrieve the next page of results. |
SortField | String | No | StartDate | The field by which task executions are sorted. Valid values: - StartDate - EndDate - Status Default value: StartDate. |
SortOrder | String | No | Ascending | The order by which task executions are sorted. Valid values: - Ascending - Descending Default value: Descending. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 14A07460-EBE7-47CA-9757-12CC4761D47A | The ID of the request. |
TaskExecutions | List | - | The information of the execution. |
└ TaskExecutionId | String | task-exec-4f5cd1b9018642ac8832 | The unique ID of the task execution. |
└ Status | String | Running | The status of the task. |
└TaskName | String | describeInstance | The name of the task. |
└ CreatedDate | String | 2019-05-16T10:26:14Z | The time when the execution was created. |
└ ExecutionId | String | exec-44d32b45d2a449e49899 | The unique identifier of the execution. |
└ Outputs | String | { “InstanceId”:”i-xxx” } |
The output of the execution. |
└ Properties | String | { “Status”:”Running” } |
The input parameters of the execution. |
└ Loop | - | - | Loop configurations and statistics, which are only returned for parent task executions. |
└ Items | List | [“item1”, “item2”, “item3”] | The list of loop items. |
└ MaxErrors | Integer or String | 1 or “10%” | The maximum number of errors allowed for the loop task. |
└ Concurrency | Integer or List | 10 or [“10%”, “20%”] | The concurrency setting of the loop task. |
└ Counters | - | - | The status statistics of child tasks in the loop. |
└ Failed | Integer | 1 | The number of failed child tasks in the loop. |
└ Success | Integer | 1 | The number of successful child tasks in the loop. |
└ Running | Integer | 1 | The number of running child tasks in the loop. |
└ Total | Integer | 10 | The total number of child tasks in the loop. |
└ LoopItem | String | i-xxx | The information of the loop child task. |
└ StartDate | String | 2019-05-16T10:26:14Z | The start time of the execution. |
└ EndDate | String | 2019-05-16T10:26:14Z | The end time of the execution. |
└ UpdateDate | String | 2019-05-16T10:26:14Z | The update time of the execution. |
Example
Sample request
https://oos.cn-hangzhou.aliyuncs.com/?Action=ListTaskExecutions
&<Common request parameters>
Sample success response JSON
format
{
"TaskExecutions": [
{
"CurrentTasks": [],
"ExecutedBy": "2123455014356700",
"ExecutionId": "exec-4f5cd1b9018642ac8832",
"Mode": "Automatic",
"Outputs": {},
"Parameters": {
"LogTailUserDefinedId": "logtaildemo",
"TagKey": "oostest",
"TagValue": "installlogtail"
},
"RamRole": "OOSServiceRole",
"SafetyCheck": "Skip",
"StartDate": "2019-05-27T09:29:18Z",
"Status": "Started",
"TemplateId": "t-1bd35a07f",
"TemplateName": "loop-echo",
"TemplateVersion": "v1"
}
]
"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 | 401 | 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. |
InvalidNextToken | 400 | The NextToken is invalid. | The error message returned because the template failed the validation due to violations of data type, value range, or other constraints. |
InvalidNextTokenQuery | 400 | Query parameters changed for the next token | The error message returned because the parameter settings used in the current request with NextToken specified are different from the parameter settings used in the first request. |