| Copyright | (c) 2013-2023 Brendan Hay |
|---|---|
| License | Mozilla Public License, v. 2.0. |
| Maintainer | Brendan Hay |
| Stability | auto-generated |
| Portability | non-portable (GHC extensions) |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Amazonka.WAFV2.PutPermissionPolicy
Description
Attaches an IAM policy to the specified resource. Use this to share a rule group across accounts.
You must be the owner of the rule group to perform this operation.
This action is subject to the following restrictions:
- You can attach only one policy with each
PutPermissionPolicyrequest. - The ARN in the request must be a valid WAF RuleGroup ARN and the rule group must exist in the same Region.
- The user making the request must be the owner of the rule group.
Synopsis
- data PutPermissionPolicy = PutPermissionPolicy' {
- resourceArn :: Text
- policy :: Text
- newPutPermissionPolicy :: Text -> Text -> PutPermissionPolicy
- putPermissionPolicy_resourceArn :: Lens' PutPermissionPolicy Text
- putPermissionPolicy_policy :: Lens' PutPermissionPolicy Text
- data PutPermissionPolicyResponse = PutPermissionPolicyResponse' {
- httpStatus :: Int
- newPutPermissionPolicyResponse :: Int -> PutPermissionPolicyResponse
- putPermissionPolicyResponse_httpStatus :: Lens' PutPermissionPolicyResponse Int
Creating a Request
data PutPermissionPolicy Source #
See: newPutPermissionPolicy smart constructor.
Constructors
| PutPermissionPolicy' | |
Fields
| |
Instances
newPutPermissionPolicy Source #
Create a value of PutPermissionPolicy 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:
PutPermissionPolicy, putPermissionPolicy_resourceArn - The Amazon Resource Name (ARN) of the RuleGroup to which you want to
attach the policy.
$sel:policy:PutPermissionPolicy', putPermissionPolicy_policy - The policy to attach to the specified rule group.
The policy specifications must conform to the following:
- The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.
- The policy must include specifications for
Effect,Action, andPrincipal. Effectmust specifyAllow.Actionmust specifywafv2:CreateWebACL,wafv2:UpdateWebACL, andwafv2:PutFirewallManagerRuleGroupsand may optionally specifywafv2:GetRuleGroup. WAF rejects any extra actions or wildcard actions in the policy.- The policy must not include a
Resourceparameter.
For more information, see IAM Policies.
Request Lenses
putPermissionPolicy_resourceArn :: Lens' PutPermissionPolicy Text Source #
The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the policy.
putPermissionPolicy_policy :: Lens' PutPermissionPolicy Text Source #
The policy to attach to the specified rule group.
The policy specifications must conform to the following:
- The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.
- The policy must include specifications for
Effect,Action, andPrincipal. Effectmust specifyAllow.Actionmust specifywafv2:CreateWebACL,wafv2:UpdateWebACL, andwafv2:PutFirewallManagerRuleGroupsand may optionally specifywafv2:GetRuleGroup. WAF rejects any extra actions or wildcard actions in the policy.- The policy must not include a
Resourceparameter.
For more information, see IAM Policies.
Destructuring the Response
data PutPermissionPolicyResponse Source #
See: newPutPermissionPolicyResponse smart constructor.
Constructors
| PutPermissionPolicyResponse' | |
Fields
| |
Instances
newPutPermissionPolicyResponse Source #
Create a value of PutPermissionPolicyResponse 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:httpStatus:PutPermissionPolicyResponse', putPermissionPolicyResponse_httpStatus - The response's http status code.
Response Lenses
putPermissionPolicyResponse_httpStatus :: Lens' PutPermissionPolicyResponse Int Source #
The response's http status code.