Queries the status of an asynchronous task.
Usage notes
You can call the GetTaskStatus operation to query the status of an asynchronous task. If you want to query more information about an asynchronous task, you can call the GetTask operation.
This topic provides an example on how to query the information about the task whose
ID is t-shfqw1u1edszvxw5****
.
Limits
You can call this operation up to 100 times per second per account. This operation is globally limited to 100 times per second across all accounts. If the number of the calls per second exceeds a limit, throttling is triggered. As a result, your business may be affected. We recommend that you take note of the limits when you call this operation.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetTaskStatus |
The operation that you want to perform. Set the value to GetTaskStatus. |
DirectoryId | String | Yes | d-00fc2p61**** |
The ID of the directory. |
TaskId | String | Yes | t-shfqw1u1edszvxw5**** |
The ID of the task. |
For more information about common request parameters, see Common parameters.
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 005F4623-AE53-504D-830F-44825F7DC211 |
The ID of the request. |
TaskStatus | Object |
The status information of the task. |
|
Status | String | Success |
The status of the task. Valid values:
|
TaskId | String | t-shfqw1u1edszvxw5**** |
The ID of the task. |
EndTime | String | 2021-11-05T02:58:08Z |
The time when the task ended. |
TaskType | String | DeleteAccessAssignment |
The type of the task. Valid values:
|
FailureReason | String | No Permission. |
The cause of the task failure. Note This parameter is returned only when the value of
Status is Failed .
|
StartTime | String | 2021-11-05T02:58:07Z |
The time when the task started. |
Examples
Sample requests
https://[Endpoint]/?Action=GetTaskStatus
&DirectoryId=d-00fc2p61****
&TaskId=t-shfqw1u1edszvxw5****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetTaskStatusResponse>
<RequestId>005F4623-AE53-504D-830F-44825F7DC211</RequestId>
<TaskStatus>
<Status>Success</Status>
<TaskId>t-shfqw1u1edszvxw5****</TaskId>
<EndTime>2021-11-05T02:58:08Z</EndTime>
<TaskType>DeleteAccessAssignment</TaskType>
<StartTime>2021-11-05T02:58:07Z</StartTime>
</TaskStatus>
</GetTaskStatusResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "005F4623-AE53-504D-830F-44825F7DC211",
"TaskStatus" : {
"Status" : "Success",
"TaskId" : "t-shfqw1u1edszvxw5****",
"EndTime" : "2021-11-05T02:58:08Z",
"TaskType" : "DeleteAccessAssignment",
"StartTime" : "2021-11-05T02:58:07Z"
}
}
Error codes
For a list of error codes, visit the API Error Center.