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****.


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.


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 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:

  • InProgress: The task is running.
  • Success: The task is successful.
  • Failed: The task failed.
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:

  • ProvisionAccessConfiguration: An access configuration is provisioned.
  • DeprovisionAccessConfiguration: An access configuration is de-provisioned.
  • CreateAccessAssignment: Access permissions on an account in the resource directory are assigned.
  • DeleteAccessAssignment: Access permissions on an account in the resource directory are removed.
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:

  • User
  • Group
RequestId String 923CA5E8-57BF-5E15-8BA6-E75A966B7E3F

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK


JSON format

HTTP/1.1 200 OK

  "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.