All Products
Search
Document Center

ListExecutions

Last Updated: Sep 02, 2019

You can call this operation to query executions with multiple filtering methods.

Request parameters

Parameter Type Required Example Description
Action String Yes ListExecutions The operation that you want to perform. Set this parameter to ListExecutions.
TemplateName String No MyTemplate The name of the template. A template is returned if its name contains the string specified for this parameter.
Status String No Running The status of the execution.
ExecutionId String No exec-xxx The ID of the execution.
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.
Mode String No Automatic The mode of the execution. Valid values:
- Automatic
- Debug
RamRole String No OOSServiceRole The role of the RAM user.
ParentExecutionId String No exec-xxx The ID of the parent execution.
IncludeChildExecution Boolean No True Indicates whether the current execution has child executions. Default value: False.
MaxResults Integer No 50 The maximum number of executions that are displayed on each page. Valid values: 10 to 100.
Default value: 50.
NextToken String No MTRBMDc0NjAtRUJFNy00N0NBLTk3NTctMTJDQzQ The token that is required to retrieve the next page of results.
SortField String No StartDate The field by which executions are sorted. Valid values:
- StartDate
- EndDate
- Status
Default value: StartDate.
SortOrder String No Ascending The order by which executions are sorted. Valid values:
- Ascending
- Descending
Default value: Descending.

Response parameters

Parameter Type Example Description
RequestId String 14A074-47CA-9757-12CC4761D47A The ID of the request.
Executions The information of the execution.
└ TemplateName String MyTemplate The name of the template.
└ TemplateVersion String v1 The version of the template.
└CurrentTasks String [
{
“TaskAction”: “acs::Template”,
“TaskExecutionId”: “task-exec-44d32b45d2a49899#1”,
“TaskName”: “installSLSILogtail”
}
]
The tasks that are running.
└ CreatedDate String 2019-05-16T10:26:14Z The time when the execution was created.
└ ExecutedBy String 1309252800 The user who executes the template.
└ ExecutionId String exec-44d32b45d2a449e The unique identifier of the execution.
└ Mode String Automatic The mode of the execution.
└ Outputs String {
“InstanceId”:”i-xxx”
}
The output of the execution.
└ Parameters String {
“Status”:”Running”
}
The input parameters of the execution.
└ Status String Success The status of the execution. Valid values: Started, Queued, Running, Waiting, Success, Failed, and Cancelled.
└ SafetyCheck String Skip The safety check mode. Valid values:
ConfirmEveryHighRiskAction and Skip.
└ 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.
└ RamRole String OOSServiceRole The RAM role that OOS assumes to start the execution.
└ UpdateDate String 2019-05-16T10:26:14Z The update time of the execution.
└ Counters - - The statistics for the status of the tasks.
└ Failed Integer 1 The number of failed tasks.
└ Success Integer 2 The number of successful tasks.
└ Total Integer 3 The total number of tasks.
└ IsParent Boolean False Indicates whether the current execution has child task executions.

Example

Sample request

  1. https://oos.cn-hangzhou.aliyuncs.com/?Action=ListExecutions
  2. &TemplateName=MyTemplate
  3. &<Common request parameters>

Sample success response
JSON format

  1. {
  2. "Executions": [
  3. {
  4. "CurrentTasks": [],
  5. "ExecutedBy": "25901550100",
  6. "ExecutionId": "exec-4f5cd190ac8832",
  7. "Mode": "Automatic",
  8. "Outputs": {},
  9. "Parameters": {
  10. "LogTailUserDefinedId": "logtaildemo",
  11. "TagKey": "oostest",
  12. "TagValue": "installlogtail"
  13. },
  14. "RamRole": "OOSServiceRole",
  15. "SafetyCheck": "Skip",
  16. "StartDate": "2019-05-27T09:29:18Z",
  17. "Status": "Started",
  18. "TemplateId": "t-1bd35ba07f",
  19. "TemplateName": "loop-echo",
  20. "TemplateVersion": "v1",
  21. "Counters": {
  22. "Failed": 0,
  23. "Success": 1,
  24. "Total": 2
  25. }
  26. }
  27. ]
  28. "RequestId": "4918C2-34C9-4679-9DB3-4C0F4129AC"
  29. }

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.