Queries information about an asynchronous task.
Usage notes
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 20 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 | GetTask |
The operation that you want to perform. Set the value to GetTask. |
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 |
---|---|---|---|
Task | Object |
The information about 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. |
PrincipalId | String | u-00q8wbq42wiltcrk**** |
The ID of the CloudSSO identity. |
TargetPath | String | rd-3G****/r-Wm****/114240524784**** |
The path ID of the task object in the resource directory. |
StartTime | String | 2021-11-05T02:58:07Z |
The time when the task started. |
PrincipalName | String | Alice |
The name of the CloudSSO identity. |
TargetName | String | dev-test |
The name of the task object. |
TargetId | String | 114240524784**** |
The ID of the task object. |
AccessConfigurationName | String | ECS-Admin |
The name of the access configuration. |
TargetPathName | String | rd-3G****/root/dev-test |
The path name of the task object in the resource directory. |
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 .
|
TargetType | String | RD-Account |
The type of the task object. The value is fixed as RD-Account, which indicates the accounts in the resource directory. |
AccessConfigurationId | String | ac-00jhtfl8thteu6uj**** |
The ID of the access configuration. |
PrincipalType | String | User |
The type of the CloudSSO identity. Valid values:
|
RequestId | String | 923CA5E8-57BF-5E15-8BA6-E75A966B7E3F |
The ID of the request. |
Examples
Sample requests
https://[Endpoint]/?Action=GetTask
&DirectoryId=d-00fc2p61****
&TaskId=t-shfqw1u1edszvxw5****
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetTaskResponse>
<Task>
<Status>Success</Status>
<TaskId>t-shfqw1u1edszvxw5****</TaskId>
<EndTime>2021-11-05T02:58:08Z</EndTime>
<PrincipalId>u-00q8wbq42wiltcrk****</PrincipalId>
<TargetPath>rd-3G****/r-Wm****/114240524784****</TargetPath>
<StartTime>2021-11-05T02:58:07Z</StartTime>
<PrincipalName>Alice</PrincipalName>
<TargetName>dev-test</TargetName>
<TargetId>114240524784****</TargetId>
<AccessConfigurationName>ECS-Admin</AccessConfigurationName>
<TargetPathName>rd-3G****/root/dev-test</TargetPathName>
<TaskType>DeleteAccessAssignment</TaskType>
<TargetType>RD-Account</TargetType>
<AccessConfigurationId>ac-00jhtfl8thteu6uj****</AccessConfigurationId>
<PrincipalType>User</PrincipalType>
</Task>
<RequestId>923CA5E8-57BF-5E15-8BA6-E75A966B7E3F</RequestId>
</GetTaskResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Task" : {
"Status" : "Success",
"TaskId" : "t-shfqw1u1edszvxw5****",
"EndTime" : "2021-11-05T02:58:08Z",
"PrincipalId" : "u-00q8wbq42wiltcrk****",
"TargetPath" : "rd-3G****/r-Wm****/114240524784****",
"StartTime" : "2021-11-05T02:58:07Z",
"PrincipalName" : "Alice",
"TargetName" : "dev-test",
"TargetId" : "114240524784****",
"AccessConfigurationName" : "ECS-Admin",
"TargetPathName" : "rd-3G****/root/dev-test",
"TaskType" : "DeleteAccessAssignment",
"TargetType" : "RD-Account",
"AccessConfigurationId" : "ac-00jhtfl8thteu6uj****",
"PrincipalType" : "User"
},
"RequestId" : "923CA5E8-57BF-5E15-8BA6-E75A966B7E3F"
}
Error codes
For a list of error codes, visit the API Error Center.