Queries a list of asynchronous tasks. The tasks are listed in reverse chronological order.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListAsynJobs |
The operation that you want to perform. Set the value to ListAsynJobs. |
JobIds | Array of String | No | bp1bpn0kn9**** |
The ID of the asynchronous task. |
ResourceType | String | No | ACL |
The type of the resource. Valid values:
|
ResourceIds | Array of String | No | lb-test |
The ID of the resource. |
ApiName | String | No | CreateLoadBalancer |
The operation that you want to perform. |
BeginTime | Long | No | 2021-06-03T17:22Z |
The time when the task started. Specify the time in the |
EndTime | Long | No | 2021-06-04T17:22Z |
The time when the task ended. Specify the time in the |
NextToken | String | No | FFmyTO70tTpLG6I3FmYAXGKPd**** |
The token that is used for the next query. Valid values:
|
MaxResults | Long | No | 50 |
The maximum number of entries to return. Valid values: 1 to 100. Default value: 20. If you do not set this parameter, the default value is used. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Jobs | Array of Job |
The list of tasks. |
|
ApiName | String | CreateLoadBalancer |
The operation that you want to perform. |
CreateTime | Long | 213466323**** |
The timestamp that indicates the start time of the task. |
ErrorCode | String | 506 |
If the Status parameter indicates Failed. An error code is returned. |
ErrorMessage | String | AllocateEipAddress Failed |
If the Status parameter indicates Failed. An error message is returned. |
Id | String | 365F4154-92F6-4AE4-92F8-7FF34B5**** |
The ID of the task. |
ModifyTime | Long | 213466323**** |
The timestamp that indicates the end time of the task. |
OperateType | String | Create |
The type of the operation.
|
ResourceId | String | lb-test |
The ID of the associated resource. |
ResourceType | String | loadbalancer |
The type of the associated resource. Valid values:
|
Status | String | Succeeded |
The status of the task.
|
MaxResults | Long | 10 |
The number of entries returned. |
NextToken | String | FFmyTO70tTpLG6I3FmYAXGKPd**** |
The token that is used for the next query. Valid values:
|
RequestId | String | 365F4154-92F6-4AE4-92F8-7FF34B540710 |
The ID of the request. |
TotalCount | Long | 1000 |
The total number of entries returned. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListAsynJobs
&JobIds=["bp1bpn0kn9****"]
&ResourceType=ACL
&ResourceIds=["lb-test"]
&ApiName=CreateLoadBalancer
&NextToken=FFmyTO70tTpLG6I3FmYAXGKPd****
&MaxResults=50
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListAsynJobsResponse>
<Jobs>
<ApiName>CreateLoadBalancer</ApiName>
<ErrorCode>506</ErrorCode>
<ErrorMessage>AllocateEipAddress Failed</ErrorMessage>
<Id>365F4154-92F6-4AE4-92F8-7FF34B5****</Id>
<OperateType>Create</OperateType>
<ResourceId>lb-test</ResourceId>
<ResourceType>loadbalancer</ResourceType>
<Status>Succeeded</Status>
</Jobs>
<MaxResults>10</MaxResults>
<NextToken>FFmyTO70tTpLG6I3FmYAXGKPd****</NextToken>
<RequestId>365F4154-92F6-4AE4-92F8-7FF34B540710</RequestId>
<TotalCount>1000</TotalCount>
</ListAsynJobsResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Jobs" : {
"ApiName" : "CreateLoadBalancer",
"ErrorCode" : 506,
"ErrorMessage" : "AllocateEipAddress Failed",
"Id" : "365F4154-92F6-4AE4-92F8-7FF34B5****",
"OperateType" : "Create",
"ResourceId" : "lb-test",
"ResourceType" : "loadbalancer",
"Status" : "Succeeded"
},
"MaxResults" : 10,
"NextToken" : "FFmyTO70tTpLG6I3FmYAXGKPd****",
"RequestId" : "365F4154-92F6-4AE4-92F8-7FF34B540710",
"TotalCount" : 1000
}
Error codes
For a list of error codes, visit the API Error Center.