Menu
AWS Identity and Access Management
API Reference (API Version 2010-05-08)

GetServiceLinkedRoleDeletionStatus

Retrieves the status of your service-linked role deletion. After you use the DeleteServiceLinkedRole API operation to submit a service-linked role for deletion, you can use the DeletionTaskId parameter in GetServiceLinkedRoleDeletionStatus to check the status of the deletion. If the deletion fails, this operation returns the reason that it failed, if that information is returned by the service.

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

DeletionTaskId

The deletion task identifier. This identifier is returned by the DeleteServiceLinkedRole operation in the format task/aws-service-role/<service-principal-name>/<role-name>/<task-uuid>.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 1000.

Required: Yes

Response Elements

The following elements are returned by the service.

Reason

An object that contains details about the reason the deletion failed.

Type: DeletionTaskFailureReasonType object

Status

The status of the deletion.

Type: String

Valid Values: SUCCEEDED | IN_PROGRESS | FAILED | NOT_STARTED

Errors

For information about the errors that are common to all actions, see Common Errors.

InvalidInput

The request was rejected because an invalid or out-of-range value was supplied for an input parameter.

HTTP Status Code: 400

NoSuchEntity

The request was rejected because it referenced an entity that does not exist. The error message describes the entity.

HTTP Status Code: 404

ServiceFailure

The request processing has failed because of an unknown error, exception or failure.

HTTP Status Code: 500

Examples

Example

The following example shows how to retrieve the status of the DeletionTaskId service-lined role deletion.

Sample Request

https://iam.amazonaws.com/?Action=GetServiceLinkedRoleDeletionStatus
&DeletionTaskId=task%2Faws-service-role%2Flex.amazonaws.com%2AWSServiceRoleForLexBots%2Fec720f7a-c0ba-4838-be33-f72e1873dd52
&Version=2010-05-08

Example

The following example shows the status of the successful DeletionTaskId service-lined role deletion.

Sample Response

<GetServiceLinkedRoleDeletionStatusResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
  <GetServiceLinkedRoleDeletionStatusResult>
    <Status>SUCCEEDED</Status>
  </GetServiceLinkedRoleDeletionStatusResult>
  <ResponseMetadata>
    <RequestId>aa9259f4-8297-11e7-9f8f-8b008627ec76</RequestId>
  </ResponseMetadata>
</GetServiceLinkedRoleDeletionStatusResponse>

Example

The following example shows the status of the failed DeletionTaskId service-lined role deletion.

Sample Response

<GetServiceLinkedRoleDeletionStatusResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
  <GetServiceLinkedRoleDeletionStatusResult>
    <Status>FAILED</Status>
  </GetServiceLinkedRoleDeletionStatusResult>
  <DeletionTaskFailureReasonType>
    <Reason>role is being used</Reason>
    <RoleUsageList>
      <RoleUsageType>
        <Region>us-east-1</Region>
        <Resources>
          <Resource>arn1<Resource>
          <Resource>arn2<Resource>
        </Resources>
      </RoleUsageType>
      <RoleUsageType>
        <Region>us-west-2</Region>
        <Resources>
          <Resource>arn3<Resource>
          <Resource>arn4<Resource>
        </Resources>
      </RoleUsageType>
    </RoleUsageList>
  </DeletionTaskFailureReasonType>
  <ResponseMetadata>
    <RequestId>aa9259f4-8297-11e7-9f8f-8b008627ec76</RequestId>
  </ResponseMetadata>
</GetServiceLinkedRoleDeletionStatusResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: