Copyright | (c) 2013-2021 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 |
Attaches the specified managed policy to the specified IAM group.
You use this operation to attach a managed policy to a group. To embed an inline policy in a group, use PutGroupPolicy.
As a best practice, you can validate your IAM policies. To learn more, see Validating IAM policies in the IAM User Guide.
For more information about policies, see Managed policies and inline policies in the IAM User Guide.
Synopsis
- data AttachGroupPolicy = AttachGroupPolicy' {}
- newAttachGroupPolicy :: Text -> Text -> AttachGroupPolicy
- attachGroupPolicy_groupName :: Lens' AttachGroupPolicy Text
- attachGroupPolicy_policyArn :: Lens' AttachGroupPolicy Text
- data AttachGroupPolicyResponse = AttachGroupPolicyResponse' {
- newAttachGroupPolicyResponse :: AttachGroupPolicyResponse
Creating a Request
data AttachGroupPolicy Source #
See: newAttachGroupPolicy
smart constructor.
AttachGroupPolicy' | |
|
Instances
:: Text | |
-> Text | |
-> AttachGroupPolicy |
Create a value of AttachGroupPolicy
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.
The following record fields are available, with the corresponding lenses provided for backwards compatibility:
$sel:groupName:AttachGroupPolicy'
, attachGroupPolicy_groupName
- The name (friendly name, not ARN) of the group to attach the policy to.
This parameter allows (through 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: _+=,.@-
$sel:policyArn:AttachGroupPolicy'
, attachGroupPolicy_policyArn
- The Amazon Resource Name (ARN) of the IAM policy you want to attach.
For more information about ARNs, see Amazon Resource Names (ARNs) in the Amazon Web Services General Reference.
Request Lenses
attachGroupPolicy_groupName :: Lens' AttachGroupPolicy Text Source #
The name (friendly name, not ARN) of the group to attach the policy to.
This parameter allows (through 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: _+=,.@-
attachGroupPolicy_policyArn :: Lens' AttachGroupPolicy 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) in the Amazon Web Services General Reference.
Destructuring the Response
data AttachGroupPolicyResponse Source #
See: newAttachGroupPolicyResponse
smart constructor.
Instances
Eq AttachGroupPolicyResponse Source # | |
Defined in Amazonka.IAM.AttachGroupPolicy | |
Read AttachGroupPolicyResponse Source # | |
Show AttachGroupPolicyResponse Source # | |
Defined in Amazonka.IAM.AttachGroupPolicy showsPrec :: Int -> AttachGroupPolicyResponse -> ShowS # show :: AttachGroupPolicyResponse -> String # showList :: [AttachGroupPolicyResponse] -> ShowS # | |
Generic AttachGroupPolicyResponse Source # | |
Defined in Amazonka.IAM.AttachGroupPolicy type Rep AttachGroupPolicyResponse :: Type -> Type # | |
NFData AttachGroupPolicyResponse Source # | |
Defined in Amazonka.IAM.AttachGroupPolicy rnf :: AttachGroupPolicyResponse -> () # | |
type Rep AttachGroupPolicyResponse Source # | |
newAttachGroupPolicyResponse :: AttachGroupPolicyResponse Source #
Create a value of AttachGroupPolicyResponse
with all optional fields omitted.
Use generic-lens or optics to modify other optional fields.