Query the status of the deletion task for a service linked role.

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 Required GetServiceLinkedRoleDeletionStatus

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

DeletionTaskId String Required task/acs-service-role/hdr.aliyuncs.com/AliyunServiceRoleForHdr/c4d22c52-247f-4ee1-83a2-6c0460bd****

The ID of the deletion task.

Response parameters

Parameter Type Sample response Description
Reason Struct

The reason why the deletion task failed.

Message String Service-Linked Role acs:ram::196813227629****:role/aliyunserviceroleforhdr cannot be deleted as it is in use by hdr.aliyuncs.com.

Failure information.

RoleUsages Array

Use resource information of the service linked role.

RoleUsage
Region String global

The IDs of the regions in which the resources are to be queried.

Resources List acs:hdr::196813227629****:sitepair/s-000h0y6kld0zwk8l****

The returned resources.

RequestId String Cost

The ID of the request.

Status String FAILED

The status of the task.

  • SUCCEEDED
  • IN_PROGRESS
  • FAILED
  • NOT_STARTED
  • INTERNAL_ERROR

Examples

Sample requests

https://resourcemanager.aliyuncs.com/? Action=GetServiceLinkedRoleDeletionStatus
&DeletionTaskId=task/acs-service-role/hdr.aliyuncs.com/AliyunServiceRoleForHdr/c4d22c52-247f-4ee1-83a2-6c0460bd****
&<Common request parameters>

Sample success responses

XML format

<GetServiceLinkedRoleDeletionStatusResponse>
      <Status>FAILED</Status>
      <RequestId>07194EB1-DB50-4513-A51D-99B30D635AEF</RequestId>
      <Reason>
            <Message>Service-Linked Role acs:ram::196813227629****:role/aliyunserviceroleforhdr cannot be deleted as it is in use by hdr.aliyuncs.com. </Message>
            <RoleUsages>
                  <RoleUsage>
                        <Region>global</Region>
                        <Resources>
                              <Resource>acs:hdr::196813227629****:sitepair/s-000h0y6kld0zwk8l****</Resource>
                        </Resources>
                  </RoleUsage>
            </RoleUsages>
      </Reason>
</GetServiceLinkedRoleDeletionStatusResponse>

JSON format

{
    "Status": "FAILED",
    "RequestId": "07194EB1-DB50-4513-A51D-99B30D635AEF",
    "Reason": {
        "Message": "Service-Linked Role acs:ram::196813227629****:role/aliyunserviceroleforhdr cannot be deleted as it is in use by hdr.aliyuncs.com.",
        "RoleUsages": {
            "RoleUsage": [
                {
                    "Region": "global",
                    "Resources": {
                        "Resource": [
                            "acs:hdr::196813227629****:sitepair/s-000h0y6kld0zwk8l****"
                        ]
                    }
                }
            ]
        }
    }
}

Error code

HTTP status code Error code Error message Description
400 InvalidParameter.DeletionTaskId The DeletionTaskId is invalid. The error message returned because the specified DeletionTaskId parameter is invalid.
400 InvalidParameter.DeletionTaskId.Length The length of DeletionTaskId must be between 26 and 255 characters. The length of the DeletionTaskId parameter exceeds the upper limit.
404 EntityNotExist.ServiceLinkedRole.DeletionTask The deletion task for the given ID does not exist. The service linked role deletion task does not exist.

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