Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DetachRolePolicyCommand

Removes the specified managed policy from the specified role.

A role can also have inline policies embedded with it. To delete an inline policy, use DeleteRolePolicy. For information about policies, see Managed policies and inline policies in the IAM User Guide.

example

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

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

DetachRolePolicyCommandInput for command's input shape.

see

DetachRolePolicyCommandOutput for command's response shape.

see

config for IAMClient's config shape.

Hierarchy

Implements

Index

Constructors

constructor

Properties

Readonly input

input: DetachRolePolicyCommandInput

Readonly middlewareStack

Methods

Static getEndpointParameterInstructions