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 a IAM policy to the specified resource. The only supported use for this action is to share a RuleGroup across accounts.
The PutPermissionPolicy
is subject to the following restrictions:
- You can attach only one policy with each
PutPermissionPolicy
request. - The policy must include an
Effect
,Action
andPrincipal
. Effect
must specifyAllow
.- The
Action
in the policy must bewaf:UpdateWebACL
andwaf-regional:UpdateWebACL
. Any extra or wildcard actions in the policy will be rejected. - The policy cannot include a
Resource
parameter. - The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup must exist in the same region.
- The user making the request must be the owner of the RuleGroup.
- Your policy must be composed using IAM Policy version 2012-10-17.
For more information, see IAM Policies .
An example of a valid policy parameter is shown in the Examples section below.
- putPermissionPolicy :: Text -> Text -> PutPermissionPolicy
- data PutPermissionPolicy
- pppResourceARN :: Lens' PutPermissionPolicy Text
- pppPolicy :: Lens' PutPermissionPolicy Text
- putPermissionPolicyResponse :: Int -> PutPermissionPolicyResponse
- data PutPermissionPolicyResponse
- ppprsResponseStatus :: Lens' PutPermissionPolicyResponse Int
Creating a Request
Creates a value of PutPermissionPolicy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
pppResourceARN
- The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the policy.pppPolicy
- The policy to attach to the specified RuleGroup.
data PutPermissionPolicy Source #
See: putPermissionPolicy
smart constructor.
Request Lenses
pppResourceARN :: Lens' PutPermissionPolicy Text Source #
The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the policy.
pppPolicy :: Lens' PutPermissionPolicy Text Source #
The policy to attach to the specified RuleGroup.
Destructuring the Response
putPermissionPolicyResponse Source #
Creates a value of PutPermissionPolicyResponse
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
ppprsResponseStatus
- -- | The response status code.
data PutPermissionPolicyResponse Source #
See: putPermissionPolicyResponse
smart constructor.
Response Lenses
ppprsResponseStatus :: Lens' PutPermissionPolicyResponse Int Source #
- - | The response status code.