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

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.IAM.AttachRolePolicy

Contents

Description

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.

See: AWS API Reference for AttachRolePolicy.

Synopsis

Creating a Request

attachRolePolicy Source

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

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

Request Lenses

arpRoleName :: Lens' AttachRolePolicy Text Source

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

Destructuring the Response

attachRolePolicyResponse :: AttachRolePolicyResponse Source

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