Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions,
see Getting Started with Amazon Web Services in China
(PDF).
Get an IAM service-linked role's deletion status using an Amazon SDK
The following code example shows how to get an Amazon Identity and Access Management (IAM) service-linked role's deletion status.
- JavaScript
-
- SDK for JavaScript (v3)
-
import { GetServiceLinkedRoleDeletionStatusCommand, IAMClient } from "@aws-sdk/client-iam";
const client = new IAMClient({});
/**
*
* @param {string} deletionTaskId
*/
export const getServiceLinkedRoleDeletionStatus = (deletionTaskId) => {
const command = new GetServiceLinkedRoleDeletionStatusCommand({
DeletionTaskId: deletionTaskId,
});
return client.send(command);
};
For a complete list of Amazon SDK developer guides and code examples, see
Using IAM with an Amazon SDK.
This topic also includes information about getting started and details about previous SDK versions.