Queries a list of asynchronous tasks. The tasks are listed in reverse chronological order.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

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:

  • loadbalancer: an Application Load Balancer (ALB) instance
  • listener: a listener
  • rule: a forwarding rule
  • acl: a network access control list (ACL)
  • securitypolicy: a security policy
  • servergroup: a server group
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 yyyy-MM-ddTHH:mm:ssZ format.

EndTime Long No 2021-06-04T17:22Z

The time when the task ended. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format.

NextToken String No FFmyTO70tTpLG6I3FmYAXGKPd****

The token that is used for the next query. Valid values:

  • If this is your first query or no next query is to be sent, ignore this parameter.
  • If a next query is to be sent, set the value to the value of NextToken that is returned from the last call.
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.

  • Create: creation
  • Update: modification
  • Delete: deletion
ResourceId String lb-test

The ID of the associated resource.

ResourceType String loadbalancer

The type of the associated resource. Valid values:

  • loadbalancer: an ALB instance
  • listener: a listener
  • rule: a forwarding rule
  • acl: a network ACL
  • securitypolicy: a security policy
  • servergroup: a server group
Status String Succeeded

The status of the task.

  • Succeeded: The task is successful.
  • Failed: The task failed.
  • Processing: The task is being processed.
MaxResults Long 10

The number of entries returned.

NextToken String FFmyTO70tTpLG6I3FmYAXGKPd****

The token that is used for the next query. Valid values:

  • If NextToken is empty, it indicates that no next query is to be sent.
  • If NextToken is not empty, the value indicates the token that is used for the next query.
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.