All Products
Search
Document Center

CloudOps Orchestration Service:ListTaskExecutions

Last Updated:Mar 03, 2024

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • 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 Key: the condition key that is defined by the cloud service.
  • 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.
OperationAccess levelResource typeCondition keyAssociated operation
oos:ListTaskExecutionsRead
  • Execution
    acs:oos:{#regionId}:{#accountId}:execution/{#executionId}
  • oos:tag
none

Request syntax

POST /ListTaskExecutions

GET /ListTaskExecutions

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the execution.

cn-hangzhou
ExecutionIdstringNo

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

exec-xxx
StatusstringNo

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

Running
StartDateBeforestringNo

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

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

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

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

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

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

The execution ID of the task.

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

The name of the task.

task-exec-xxx
TaskNamestringNo

The action of the task.

describeInstance
TaskActionstringNo

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

ACS::Sleep
ParentTaskExecutionIdstringNo

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

task-exec-xxx
IncludeChildTaskExecutionbooleanNo

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

false
MaxResultsintegerNo

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

50
NextTokenstringNo

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.
MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ3NjFENDdB
SortFieldstringNo

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.
StartDate
SortOrderstringNo

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

Ascending

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

The ID of the request.

MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ3NjFENDdB
RequestIdstring

The number of entries returned on each page.

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

The details of the task executions.

50
TaskExecutionsobject []

The execution ID of the child node.

ChildExecutionIdstring

The output of the execution.

exec-xxx
Outputsstring

The status of the task.

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

The time when the task execution stopped running.

Running
EndDatestring

The execution ID of the parent node.

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

The name of the task.

task-exec-xxx
TaskNamestring

The time when the execution started.

describeInstance
StartDatestring

The elements in the loop task.

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

The time when the execution was created.

i-1234566zxcvvb
CreateDatestring

The ID of the execution.

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

The action of the task.

exec-44d32b45d2a449e49899
TaskActionstring

The execution ID of the task.

ACS::Sleep
TaskExecutionIdstring

The time when the execution was last updated.

task-exec-xxx
UpdateDatestring

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

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

The ID of the template.

{}
TemplateIdstring

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

xxx
LoopBatchNumberinteger

The status information of the task execution.

2
StatusMessagestring

The additional information.

""
ExtraDataobject

The Input parameters of the task execution.

{ "NotifyNote":"" }
Propertiesstring

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

{ "Status":"Running" }

Examples

Sample success responses

JSONformat

{
  "NextToken": "MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ3NjFENDdB",
  "RequestId": "CDABABABAB-FC28-4D9C-8FB5-68DC6F0486FC",
  "MaxResults": 50,
  "TaskExecutions": [
    {
      "ChildExecutionId": "exec-xxx",
      "Outputs": "{ \"InstanceId\":\"i-xxx\" }",
      "Status": "Running",
      "EndDate": "2019-05-16T10:26:14Z",
      "ParentTaskExecutionId": "task-exec-xxx",
      "TaskName": "describeInstance\t",
      "StartDate": "2019-05-16T10:26:14Z",
      "LoopItem": "i-1234566zxcvvb",
      "CreateDate": "2019-05-16T10:26:14Z",
      "ExecutionId": "exec-44d32b45d2a449e49899",
      "TaskAction": "ACS::Sleep",
      "TaskExecutionId": "task-exec-xxx",
      "UpdateDate": "2019-05-16T10:26:14Z",
      "Loop": {},
      "TemplateId": "xxx",
      "LoopBatchNumber": 2,
      "StatusMessage": "\"\"",
      "ExtraData": {
        "NotifyNote": ""
      },
      "Properties": "{ \"Status\":\"Running\" }"
    }
  ]
}

Error codes

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-08-15The internal configuration of the API is changed, but the call is not affectedsee changesets
Change itemChange content
The internal configuration of the API is changed, but the call is not affected.