Copyright | (c) 2013-2018 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
Attaches the specified managed policy to the specified IAM role. When you attach a managed policy to a role, the managed policy becomes part of the role's permission (access) policy.
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, see Managed Policies and Inline Policies in the IAM User Guide .
Creating a Request
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:
arpRoleName
- The name (friendly name, not ARN) of the role to attach the policy to. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-arpPolicyARN
- The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .
data AttachRolePolicy Source #
See: attachRolePolicy
smart constructor.
Instances
Request Lenses
arpRoleName :: Lens' AttachRolePolicy Text Source #
The name (friendly name, not ARN) of the role to attach the policy to. This parameter allows (per its regex pattern ) a string of characters consisting of upper and lowercase alphanumeric characters with no spaces. You can also include any of the following characters: _+=,.@-
arpPolicyARN :: Lens' AttachRolePolicy Text Source #
The Amazon Resource Name (ARN) of the IAM policy you want to attach. For more information about ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces in the AWS General Reference .
Destructuring the Response
attachRolePolicyResponse :: AttachRolePolicyResponse Source #
Creates a value of AttachRolePolicyResponse
with the minimum fields required to make a request.
data AttachRolePolicyResponse Source #
See: attachRolePolicyResponse
smart constructor.