All Products
Search
Document Center

Operation Orchestration Service:ListTaskExecutions

Last Updated:Oct 28, 2022

Queries task executions. Multiple methods are supported to filter task executions.

Authorization information

The following table is the authorization information corresponding to the API, which can be found in the RAM permission policy statement.Action Used in the element to grant the RAM user or RAM role permission to call this API. The specific instructions are as follows:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All resources is used in the Resource type column of the operation.
  • Condition keyword: refers to the condition keyword defined by the cloud product itself.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operateaccess levelResource typeconditional keywordAssociation operation
oos:ListTaskExecutionsREAD
  • OOS
    acs:oos:{#regionId}:{#accountId}:execution/*
  • OOS
    acs:oos:{#regionId}:{#accountId}:execution/{#executionId}
  • oos:tag
without

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the region in which you want to query task executions.

cn-hangzhou
ExecutionIdstringNo

The ID of the execution.

exec-xxx
StatusstringNo

The status of the execution. Valid values: Running, Started, Success, Failed, Waiting, Cancelled, Pending, and Skipped.

Running
StartDateBeforestringNo

Specifies to query task executions that start to run at or before the specified time.

2019-05-16T10:26:14Z
StartDateAfterstringNo

Specifies to query task executions that start to run at or later than the specified time.

2019-05-16T10:26:14Z
EndDateBeforestringNo

Specifies to query task executions that stop running at or before the specified time.

2019-05-16T10:26:14Z
EndDateAfterstringNo

Specifies to query task executions that stop running at or later than the specified time.

2019-05-16T10:26:14Z
TaskExecutionIdstringNo

The execution ID of the task.

task-exec-xxx
TaskNamestringNo

The name of the task.

describeInstance
TaskActionstringNo

The action of the task.

ACS::Sleep
ParentTaskExecutionIdstringNo

The execution ID of the parent node. In a loop task, set this parameter to the execution ID of the parent node.

task-exec-xxx
IncludeChildTaskExecutionbooleanNo

Specifies whether to show the child nodes in the loop task. Default value: False.

false
MaxResultsintegerNo

The number of entries to return on each page. Valid values: 20 to 100. Default value: 50.

50
NextTokenstringNo

The token that is used to retrieve the next page of results.

MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ3NjFENDdB
SortFieldstringNo

Sorts the task executions to query. Valid values:

  • StartDate: specifies that the task executions are sorted based on the time when they are created. This is the default value.
  • EndDate: specifies that the task executions are sorted based on the time when the time when they stop running.
  • Status: specifies that the task executions are sorted based on their statuses.
StartDate
SortOrderstringNo

The order in which you want to sort the task executions to query. Valid values:

  • Ascending: ascending order.
  • Descending: descending order. This is the default value.
Ascending

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

The token that is used to retrieve the next page of results.

MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ3NjFENDdB
RequestIdstring

The ID of the request.

CDABABABAB-FC28-4D9C-8FB5-68DC6F0486FC
MaxResultsinteger

The number of entries returned on each page.

50
TaskExecutionsarray

The details of the task executions.

object
ChildExecutionIdstring

The execution ID of the child node.

exec-xxx
Outputsstring

The output of the execution.

{ "InstanceId":"i-xxx" }
Statusstring

The status of the task.

Running
EndDatestring

The time when the task execution stopped running.

2019-05-16T10:26:14Z
ParentTaskExecutionIdstring

The execution ID of the parent node.

task-exec-xxx
TaskNamestring

The name of the task.

describeInstance
StartDatestring

The time when the execution started.

2019-05-16T10:26:14Z
LoopItemstring

The elements in the loop task.

i-1234566zxcvvb
CreateDatestring

The time when the execution was created.

2019-05-16T10:26:14Z
ExecutionIdstring

The ID of the execution.

exec-44d32b45d2a449e49899
TaskActionstring

The action of the task.

ACS::Sleep
TaskExecutionIdstring

The execution ID of the task.

task-exec-xxx
UpdateDatestring

The time when the execution was last updated.

2019-05-16T10:26:14Z
Loopobject

The configuration and statistics information of the loop task. This parameter is returned only for the parent node of the loop task.

TemplateIdstring

The ID of the template.

xxx
LoopBatchNumberinteger

The number of times for which the loop task is run.

2
StatusMessagestring

The status information of the task execution.

""
ExtraDataobject

The additional information.

Propertiesstring

The Input parameters of the task execution.

{ "Status":"Running" }

Example

Normal return example

JSONFormat

{
    "code": 200,
    "data": {
        "RequestId": "CDABABABAB-FC28-4D9C-8FB5-68DC6F0486FC",
        "MaxResults": 100,
        "TaskExecutions": {
            "Status": "Success",
            "Loop": "",
            "TaskAction": "ACS::Sleep",
            "ExtraData": {
                "NotifyNote": ""
            },
            "Properties": {
                "Duration": "PT1M"
            },
            "CreateDate": "2019-10-16T07:45:09Z",
            "EndDate": "2019-10-16T07:46:10Z",
            "StatusMessage": "Sleep estimated finish time (2019-10-16 07:46:09.502154)",
            "StartDate": "2019-10-16T07:45:09Z",
            "UpdateDate": "2019-10-16T07:46:10Z",
            "LoopItem": "",
            "TaskName": "waitDataRecover",
            "Outputs": "",
            "TaskExecutionId": "exec-934bc37ea31f4b9e9312.t0001",
            "ExecutionId": "exec-934bc37ea31f4b9e9312"
        }
    },
    "requestId": "CDABABABAB-FC28-4D9C-8FB5-68DC6F0486FC",
    "successResponse": true
}

XMLFormat

<code>200</code>
<data>
    <RequestId>CDABABABAB-FC28-4D9C-8FB5-68DC6F0486FC</RequestId>
    <MaxResults>100</MaxResults>
    <TaskExecutions>
        <Status>Success</Status>
        <Loop/>
        <TaskAction>ACS::Sleep</TaskAction>
        <ExtraData>
            <NotifyNote/>
        </ExtraData>
        <Properties>
            <Duration>PT1M</Duration>
        </Properties>
        <CreateDate>2019-10-16T07:45:09Z</CreateDate>
        <EndDate>2019-10-16T07:46:10Z</EndDate>
        <StatusMessage>Sleep estimated finish time (2019-10-16 07:46:09.502154)</StatusMessage>
        <StartDate>2019-10-16T07:45:09Z</StartDate>
        <UpdateDate>2019-10-16T07:46:10Z</UpdateDate>
        <LoopItem/>
        <TaskName>waitDataRecover</TaskName>
        <Outputs/>
        <TaskExecutionId>exec-934bc37ea31f4b9e9312.t0001</TaskExecutionId>
        <ExecutionId>exec-934bc37ea31f4b9e9312</ExecutionId>
    </TaskExecutions>
</data>
<requestId>CDABABABAB-FC28-4D9C-8FB5-68DC6F0486FC</requestId>
<successResponse>true</successResponse>

Error codes

For a list of error codes, visit the API error center.