You can call this operation to query the details about completed domain name tasks, including successful tasks and tasks that still failed after the maximum number of attempts.

Description

You can call this operation with AcknowledgeTaskResult to confirm the execution result of a domain name task. After you confirm the execution result of a task, you cannot call this operation to query this task.

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 PollTaskResult

The operation that you want to perform. Set the value to PollTaskResult.

PageNum Integer Yes 1

The number of the page to return.

PageSize Integer Yes 20

The number of entries to return on each page.

UserClientIp String No 127.0.0.1

The IP address of the client that you use to initiate the query.

Lang String No en

The language of the error message to return. Valid values:

  • zh: Chinese
  • en: English

Default value: en

TaskNo String No 75addb07-28a3-450e-b5ec-test

The ID of the task that you want to query.

DomainName String No test.com

The domain name to which the task that you want to query corresponds.

InstanceId String No S20181T0WLI85212

The ID of the instance to which the domain name corresponds.

TaskResultStatus Integer No 2

The task execution result. Valid values:

  • 2: Successful
  • 3: Failed

Response parameters

Parameter Type Example Description
RequestId String E879DC07-38EE-4408-9F33-73B30CD965CD

The ID of the request.

TotalItemNum Integer 10

The total number of entries returned.

CurrentPageNum Integer 1

The page number of the returned page.

TotalPageNum Integer 10

The total number of pages returned.

PageSize Integer 1

The number of entries returned per page.

PrePage Boolean false

Indicates whether the current page follows another page.

NextPage Boolean false

Indicates whether the current page is followed by another page.

Data Array

The returned details of the task that was queried.

TaskNo String b95bc334-f7d8-4f39-8a62-4c4302a243d8

The ID of the task that was queried.

TaskDetailNo String 15fee9d10d514bada66bd08c5723c583

The ID of the task detail returned.

TaskType String CHG_DNS

The type of the task.

InstanceId String S201817141000000

The ID of the instance to which the domain name corresponds.

DomainName String test.com

The domain name corresponding to the task that was queried.

TaskStatus String EXECUTE_SUCCESS

The status of the task that was queried. Valid values:

  • WAITING_EXECUTE: To be executed
  • EXECUTING: Executing
  • EXECUTE_SUCCESS: Successful
  • EXECUTE_FAILURE: Failed
UpdateTime String 2018-03-26 15:22:18

The time when the task details were last queried.

CreateTime String 2018-03-26 15:08:20

The time when the task was created.

TryCount Integer 0

The number of query attempts.

ErrorMsg String The operation is successful.

The message that indicates the execution result of the task.

TaskStatusCode Integer 2

The status code of the task. Valid values:

  • 0: To be executed
  • 1: Executing
  • 2: Successful
  • 3: Failed
TaskResult String test

The task execution result.

TaskTypeDescription String Change DNS

The description of the task type. If you change the value of the Lang parameter, the corresponding language changes.

Examples

Sample requests

http(s)://[Endpoint]/? Action=PollTaskResult
&PageNum=1
&PageSize=20
&<Common request parameters>

Sample success responses

XML format

<PollTaskResultResponse>
    <Data>
        <TaskDetail>
            <TryCount>0</TryCount>
            <TaskDetailNo>15fee9d10d514bada66bd08c5723c583</TaskDetailNo>
            <TaskNo>b95bc334-f7d8-4f39-8a62-4c4302a243d8</TaskNo>
            <CreateTime>2018-03-26 15:08:20</CreateTime>
            <InstanceId>S201817141000000</InstanceId>
            <UpdateTime>2018-03-26 15:22:18</UpdateTime>
            <TaskStatus>EXECUTE_SUCCESS</TaskStatus>
            <DomainName>test.com</DomainName>
            <TaskTypeDescription>DNS Modification</TaskTypeDescription>
            <TaskStatusCode>2</TaskStatusCode>
            <ErrorMsg>The operation is successful. </ErrorMsg>
            <TaskType>CHG_DNS</TaskType>
        </TaskDetail>
    </Data>
    <TotalItemNum>10</TotalItemNum>
    <PageSize>1</PageSize>
    <CurrentPageNum>1</CurrentPageNum>
    <RequestId>C2CB6161-7971-4EB6-BC16-92A2BA3816D9</RequestId>
    <TotalPageNum>10</TotalPageNum>
</PollTaskResultResponse>

JSON format

{
    "CurrentPageNum":1,
    "Data":{
        "TaskDetail":[{
            "CreateTime":"2018-03-26 15:08:20",
            "DomainName":"test.com",
            "ErrorMsg":"The operation is successful.",
            "InstanceId":"S201817141000000",
            "TaskDetailNo":"15fee9d10d514bada66bd08c5723c583",
            "TaskNo":"b95bc334-f7d8-4f39-8a62-4c4302a243d8",
            "TaskStatus":"EXECUTE_SUCCESS",
            "TaskStatusCode":2,
            "TaskType":"CHG_DNS",
            "TaskTypeDescription":"DNS Modification",
            "TryCount":0,
            "UpdateTime":"2018-03-26 15:22:18"
        }]
    },
    "PageSize":1,
    "RequestId":"E879DC07-38EE-4408-9F33-73B30CD965CD",
    "TotalItemNum":10,
    "TotalPageNum":10
}

Error codes

For a list of error codes, visit the API Error Center.