ListExecutions
Queries task executions with support for multiple filtering methods.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
oos:ListExecutions |
list |
*Execution
*Execution
|
|
None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-hangzhou |
| TemplateName |
string |
No |
The template name. This is a fuzzy match. All templates whose names contain the specified value are returned. |
MyTemplate |
| Status |
string |
No |
The execution status. Valid values: Running, Started, Success, Failed, Waiting, Cancelled, Pending, Skipped. |
Running |
| ExecutionId |
string |
No |
The execution ID. |
exec-xxx |
| StartDateBefore |
string |
No |
Specifies that the start time of the executions to query is earlier than or equal to the specified time. |
2019-05-16T10:26:14Z |
| StartDateAfter |
string |
No |
Specifies that the start time of the executions to query is later than or equal to the specified time. |
2019-05-16T10:26:14Z |
| EndDateBefore |
string |
No |
Specifies that the end time of the executions to query is earlier than or equal to the specified time. |
2019-05-16T10:26:14Z |
| EndDateAfter |
string |
No |
Specifies that the end time of the executions to query is later than or equal to the specified time. |
2019-05-16T10:26:14Z |
| Mode |
string |
No |
The execution mode. Valid values:
|
Automatic |
| ExecutedBy |
string |
No |
The executor. |
vme |
| ParentExecutionId |
string |
No |
The parent execution ID. |
exec-xxx |
| RamRole |
string |
No |
The RAM role. |
OOSServiceRole |
| IncludeChildExecution |
boolean |
No |
Specifies whether to include child executions. Default value: False. |
true |
| Category |
string |
No |
The template type of the execution. Valid values: Other, TimerTrigger, EventTrigger, AlarmTrigger. |
Other |
| Tags |
object |
No |
The tags of the execution. |
{ "k1": "v1", "k2": "v2" } |
| MaxResults |
integer |
No |
The number of entries per page. Valid values: 10 to 100. Default value: 50. |
50 |
| NextToken |
string |
No |
The pagination token. |
MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ |
| SortField |
string |
No |
The field used to sort the query results. Valid values:
|
StartDate |
| SortOrder |
string |
No |
The sort order. Valid values:
|
Ascending |
| ResourceId |
string |
No |
The ECS resource ID. |
i-xxx |
| ResourceTemplateName |
string |
No |
The template name of the resource. |
ACS-ECS-TEST |
| ResourceGroupId |
string |
No |
The resource group ID. |
rg-acfmxsn4m4****** |
| Description |
string |
No |
The description of the execution. |
MyDescription |
| Depth |
string |
No |
The depth of the execution. Valid values: RootDepth, FirstChildDepth. RootDepth returns only parent executions. FirstChildDepth returns only first-level child executions. You can specify only one of this parameter and the IncludeChildExecution parameter. We recommend that you use Depth. |
RootDepth |
| Categories |
string |
No |
The list of templatetypes for the execute. Valid values: Other, TimerTrigger, EventTrigger, AlarmTrigger. You can specify only one of this parameter and the Category parameter. Use Categories instead. |
["TimerTrigger"、"EventTrigger"] |
| RdFolderIds |
array |
No |
The list of resource folder IDs. |
|
|
string |
No |
The resource folder ID. |
rd-xxx |
|
| AccountId |
string |
No |
The user account ID. |
123456789 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| NextToken |
string |
The pagination token. |
MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ |
| RequestId |
string |
The request ID. |
14A074-47CA-9757-12CC4761D47A |
| MaxResults |
integer |
The number of entries per page. |
50 |
| Executions |
array<object> |
The execution data. |
|
|
array<object> |
|||
| Status |
string |
The execution status. Valid values: Started, Queued, Running, Waiting, Success, Failed, Cancelled. |
Success |
| WaitingStatus |
string |
The waiting status. |
"" |
| Targets |
string |
The target resources. |
"{"ResourceType": "ALIYUN::ECS::Instance", "Filters": [{"ResourceIds": ["i-bp14z07dg3464980x72o"], "RegionId": "cn-hangzhou", "Type": "ResourceIds"}]}" |
| StatusReason |
string |
The reason for the status. |
"" |
| Tags |
object |
The tags of the execution. |
{} |
| LastSuccessfulTriggerTime |
string |
The time when the template was last successfully triggered, in ISO 8601 format (UTC). |
2019-05-27T09:29:18Z |
| Mode |
string |
The execution mode. |
Automatic |
| SafetyCheck |
string |
The safety check mode. Valid values: Skip, ConfirmEveryHighRiskAction. |
Skip |
| TemplateName |
string |
The template name. |
MyTemplate |
| TemplateVersion |
string |
The template version number. |
v1 |
| CreateDate |
string |
The time when the execution was created, in ISO 8601 format (UTC). |
2019-05-16T10:26:14Z |
| UpdateDate |
string |
The time when the execution was updated, in ISO 8601 format (UTC). |
2019-05-16T10:26:14Z |
| Description |
string |
The description of the execution. |
MyDescription |
| LastTriggerTime |
string |
The time when the template was last triggered, in ISO 8601 format (UTC). |
2019-05-27T09:29:18Z |
| ParentExecutionId |
string |
The parent execution ID. |
exec-xxx |
| LastTriggerStatus |
string |
The execution status after the template was last triggered. |
Success |
| StatusMessage |
string |
The task execution status. |
“” |
| Outputs |
string |
The output of the execution. |
{ "InstanceId":"i-xxx" } |
| ExecutedBy |
string |
The user who executed the template. |
1309252800 |
| EndDate |
string |
The time when the execution ended, in ISO 8601 format (UTC). |
2019-05-16T10:26:14Z |
| IsParent |
boolean |
Indicates whether the execution contains child tasks. |
false |
| StartDate |
string |
The time when the execution started, in ISO 8601 format (UTC). |
2019-05-16T10:26:14Z |
| ExecutionId |
string |
The unique identifier of the execution. |
exec-44d32b45d2a449e |
| Parameters |
object |
The input parameters of the execution. |
{ "Status":"Running" } |
| Counters |
object |
The task count grouped by execution status. |
{"Failed": 0,"Success": 1,"Total": 2} |
| ResourceGroupId |
string |
The resource group ID. |
rg-acfmxsn4m4****** |
| Category |
string |
The template type of the execution. Valid values: Other, TimerTrigger, EventTrigger, AlarmTrigger. |
Other |
| TemplateId |
string |
The template ID. |
123 |
| RamRole |
string |
The RAM role used to execute the current template. |
OOSServiceRole |
| ResourceStatus |
string |
The resource status. |
{ "Success": 1 } |
| CurrentTasks |
array<object> |
The tasks that are currently running. |
|
|
object |
|||
| TaskExecutionId |
string |
The task execution ID. |
task-exec-44d32b45d2a49899#1 |
| TaskName |
string |
The task name. |
installSLSILogtail |
| TaskAction |
string |
The task execution template. |
acs::Template |
| LastTriggerStatusMessage |
string |
The status message of the most recent task execution. For timer-triggered, event-triggered, and alarm-triggered executions, this indicates the execution status of the most recent trigger. For non-triggered executions, this field is the same as the StatusMessage field. |
"" |
| LastTriggerOutputs |
string |
The output of the most recent execution. For timer-triggered, event-triggered, and alarm-triggered executions, this indicates the output of the most recent trigger. For non-triggered executions, this field is the same as the Outputs field. |
{ "InstanceId": "i-xxx" } |
| NextScheduleTime |
string |
The next trigger time for timer-triggered executions, in ISO 8601 format (UTC). |
2019-05-16T10:26:14Z |
| AccountId |
string |
The account ID associated with the execution record. |
123456789 |
| TotalCount |
integer |
The total number of executions. |
30 |
Examples
Success response
JSON format
{
"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": "MyDescription",
"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}",
"NextScheduleTime": "2019-05-16T10:26:14Z",
"AccountId": "123456789"
}
],
"TotalCount": 30
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.