All Products
Search
Document Center

CloudOps Orchestration Service:ListExecutions

Last Updated:Mar 03, 2024

Queries executions. Multiple methods are supported to filter 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:ListExecutionsRead
  • Execution
    acs:oos:{#regionId}:{#accountId}:execution/*
  • Execution
    acs:oos:{#regionId}:{#accountId}:execution/{#executionId}
  • oos:tag
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The ID of the region.

cn-hangzhou
TemplateNamestringNo

The name of the template. All templates whose names contain the specified template name are queried.

MyTemplate
StatusstringNo

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

Running
ExecutionIdstringNo

The ID of the execution.

exec-xxx
StartDateBeforestringNo

The latest start time. The executions that start to run at or earlier than the specified point in time are queried.

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

The earliest start time. The executions that start to run at or later than the specified time are queried.

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

The latest end time. The executions that stop running at or earlier than the specified time are queried.

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

The earliest end time. The executions that stop running at or later than the specified time are queried.

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

The execution mode. Valid values:

  • Automatic
  • Debug
Automatic
ExecutedBystringNo

The executor.

vme
ParentExecutionIdstringNo

The ID of the parent execution.

exec-xxx
RamRolestringNo

The RAM role.

OOSServiceRole
IncludeChildExecutionbooleanNo

Specifies whether to include child executions. Default value: False.

true
CategorystringNo

The type of the execution template. Valid values: Other, TimerTrigger, EventTrigger, and AlarmTrigger.

Other
TagsobjectNo

The tags for the execution.

{"k1":"v2","k2":"v2"}
MaxResultsintegerNo

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

50
NextTokenstringNo

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

MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ
SortFieldstringNo

The field that is used to sort the executions to query. Valid values:

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

The order in which you want to sort the results. Valid values:

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

The ID of the Elastic Compute Service (ECS) resource.

i-xxx
ResourceTemplateNamestringNo

The name of the resource template.

ACS-ECS-TEST
ResourceGroupIdstringNo

The ID of the resource group to which the instances you want to query belong.

rg-acfmxsn4m4******
DescriptionstringNo

The description of the execution.

MyDescription
DepthstringNo

The depth of execution. Valid values: RootDepth and FirstChildDepth. If you set this parameter to RootDepth, only the parent execution is returned. If you set this parameter to FirstChildDepth, only the child executions at the first level are returned. You can specify only one of the Depth and IncludeChildExecution parameters. We recommend that you specify Depth.

RootDepth
CategoriesstringNo

The types of the execution template. Valid values: Other, TimerTrigger, EventTrigger, and AlarmTrigger. You can specify only one of the Categories and Category parameters. We recommend that you specify Categories.

["TimerTrigger"、"EventTrigger"]

Response parameters

ParameterTypeDescriptionExample
object
NextTokenstring

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

MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ
RequestIdstring

The ID of the request.

14A074-47CA-9757-12CC4761D47A
MaxResultsinteger

The number of entries returned per page.

50
Executionsobject []

The details of the task executions.

Statusstring

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

Success
WaitingStatusstring

The Waiting state.

""
Targetsstring

The target resource.

"{"ResourceType": "ALIYUN::ECS::Instance", "Filters": [{"ResourceIds": ["i-bp14z07dg3464980x72o"], "RegionId": "cn-hangzhou", "Type": "ResourceIds"}]}"
StatusReasonstring

The reason for which the status occurs.

""
Tagsobject

The tags of the execution.

{}
LastSuccessfulTriggerTimestring

The time when the template was last successfully triggered.

2019-05-27T09:29:18Z
Modestring

The execution mode.

Automatic
SafetyCheckstring

The security check mode. Valid values: Skip, and ConfirmEveryHighRiskAction.

Skip
TemplateNamestring

The name of the template.

MyTemplate
TemplateVersionstring

The version number of the template.

v1
CreateDatestring

The time when the execution was created.

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

The time when the execution was updated.

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

The description of the execution.

test execution.
LastTriggerTimestring

The time when the template was last successfully triggered.

2019-05-27T09:29:18Z
ParentExecutionIdstring

The ID of the parent execution.

exec-xxx
LastTriggerStatusstring

The status of the execution after the template was last triggered.

Success
StatusMessagestring

The status of the task execution.

“”
Outputsstring

The output of the execution.

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

The account ID of the user who started the execution of the template.

1309252800
EndDatestring

The time when the execution stops running.

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

Indicates whether the execution contains child executions.

false
StartDatestring

The time when the execution was started.

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

The unique ID of the execution.

exec-44d32b45d2a449e
Parametersobject

The input parameters of the execution.

{ "Status":"Running" }
Countersobject

The number of tasks that are counted by execution status.

{"Failed": 0,"Success": 1,"Total": 2}
ResourceGroupIdstring

The ID of the resource group.

rg-acfmxsn4m4******
Categorystring

The type of the execution template. Valid values: Other, TimerTrigger, EventTrigger, and AlarmTrigger.

Other
TemplateIdstring

The ID of the template.

123
RamRolestring

The role that started the execution of the template.

OOSServiceRole
ResourceStatusstring

The status of the resource.

{ "Success": 1 }
CurrentTasksobject []

The information about the tasks that are running.

TaskExecutionIdstring

The ID of the task execution.

task-exec-44d32b45d2a49899#1
TaskNamestring

The name of the task.

installSLSILogtail
TaskActionstring

The execution template of the task.

acs::Template
LastTriggerStatusMessagestring

The status message of last trigger.

""
LastTriggerOutputsstring

The outputs of last trigger.

{ "InstanceId": "i-xxx" }

Examples

Sample success responses

JSONformat

{
  "NextToken": "MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ",
  "RequestId": "14A074-47CA-9757-12CC4761D47A",
  "MaxResults": 50,
  "Executions": [
    {
      "Status": "Success",
      "WaitingStatus": "\"\"",
      "Targets": "\"{\"ResourceType\": \"ALIYUN::ECS::Instance\", \"Filters\": [{\"ResourceIds\": [\"i-bp14z07dg3464980x72o\"], \"RegionId\": \"cn-hangzhou\", \"Type\": \"ResourceIds\"}]}\"",
      "StatusReason": "\"\"",
      "Tags": {},
      "LastSuccessfulTriggerTime": "2019-05-27T09:29:18Z",
      "Mode": "Automatic",
      "SafetyCheck": "Skip",
      "TemplateName": "MyTemplate",
      "TemplateVersion": "v1",
      "CreateDate": "2019-05-16T10:26:14Z",
      "UpdateDate": "2019-05-16T10:26:14Z",
      "Description": "test execution.",
      "LastTriggerTime": "2019-05-27T09:29:18Z",
      "ParentExecutionId": "exec-xxx",
      "LastTriggerStatus": "Success",
      "StatusMessage": "“”",
      "Outputs": "{ \"InstanceId\":\"i-xxx\" }",
      "ExecutedBy": "1309252800",
      "EndDate": "2019-05-16T10:26:14Z",
      "IsParent": false,
      "StartDate": "2019-05-16T10:26:14Z",
      "ExecutionId": "exec-44d32b45d2a449e",
      "Parameters": {
        "Status": "Running"
      },
      "Counters": {
        "Failed": 0,
        "Success": 1,
        "Total": 2
      },
      "ResourceGroupId": "rg-acfmxsn4m4******",
      "Category": "Other",
      "TemplateId": "123",
      "RamRole": "OOSServiceRole",
      "ResourceStatus": "{ \t\t\t\"Success\": 1 \t\t}",
      "CurrentTasks": [
        {
          "TaskExecutionId": "task-exec-44d32b45d2a49899#1",
          "TaskName": "installSLSILogtail",
          "TaskAction": "acs::Template"
        }
      ],
      "LastTriggerStatusMessage": "\"\"",
      "LastTriggerOutputs": "{\n      \"InstanceId\": \"i-xxx\"\n}"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-04-27The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Depth
    Added Input Parameters: Categories
2023-03-27The request parameters of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: Description