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

Safe HaskellNone




Attaches the specified managed policy to the specified role.

When you attach a managed policy to a role, the managed policy is used as the role's access (permissions) policy. You cannot use a managed policy as the role's trust policy. The role's trust policy is created at the same time as the role, using CreateRole. You can update a role's trust policy using UpdateAssumeRolePolicy.

Use this API to attach a managed policy to a role. To embed an inline policy in a role, use PutRolePolicy. For more information about policies, refer to Managed Policies and Inline Policies in the Using IAM guide.



Request constructor

attachRolePolicy Source

AttachRolePolicy constructor.

The fields accessible through corresponding lenses are:

Request lenses

arpRoleName :: Lens' AttachRolePolicy Text Source

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


Response constructor