amazonka-iam-1.3.3: Amazon Identity and Access Management SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <>
Portabilitynon-portable (GHC extensions)
Safe HaskellNone




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 the DeleteRolePolicy API. For information about policies, refer to Managed Policies and Inline Policies in the IAM User Guide.

See: AWS API Reference for DetachRolePolicy.


Creating a Request

detachRolePolicy Source

Creates a value of DetachRolePolicy with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Request Lenses

drpRoleName :: Lens' DetachRolePolicy Text Source

The name (friendly name, not ARN) of the role to detach the policy from.

Destructuring the Response

detachRolePolicyResponse :: DetachRolePolicyResponse Source

Creates a value of DetachRolePolicyResponse with the minimum fields required to make a request.