Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeleteRoleCommand

Deletes the specified role. The role must not have any policies attached. For more information about roles, see Working with roles.

Make sure that you do not have any Amazon EC2 instances running with the role you are about to delete. Deleting a role or instance profile that is associated with a running instance will break any applications running on the instance.

example

Use a bare-bones client and the command you need to make an API call.

import { IAMClient, DeleteRoleCommand } from "@aws-sdk/client-iam"; // ES Modules import
// const { IAMClient, DeleteRoleCommand } = require("@aws-sdk/client-iam"); // CommonJS import
const client = new IAMClient(config);
const command = new DeleteRoleCommand(input);
const response = await client.send(command);
see

DeleteRoleCommandInput for command's input shape.

see

DeleteRoleCommandOutput for command's response shape.

see

config for IAMClient's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: DeleteRoleCommandInput

Readonly middlewareStack

middlewareStack: IMiddlewareStack<DeleteRoleCommandInput, DeleteRoleCommandOutput>

Methods

Static getEndpointParameterInstructions