/AWS1/IF_WA2=>PUTPERMISSIONPOLICY()¶
About PutPermissionPolicy¶
Use this to share a rule group with other accounts.
This action attaches an IAM policy to the specified resource. 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.
If a rule group has been shared with your account, you can access it through the call GetRuleGroup,
and you can reference it in CreateWebACL and UpdateWebACL.
Rule groups that are shared with you don't appear in your WAF console rule groups listing.
Method Signature¶
METHODS /AWS1/IF_WA2~PUTPERMISSIONPOLICY
IMPORTING
!IV_RESOURCEARN TYPE /AWS1/WA2RESOURCEARN OPTIONAL
!IV_POLICY TYPE /AWS1/WA2POLICYSTRING OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_wa2putpermpolicyrsp
RAISING
/AWS1/CX_WA2WAFINTERNALERROREX
/AWS1/CX_WA2WAFINVALIDPARAMEX
/AWS1/CX_WA2WAFINVPERMPOLICYEX
/AWS1/CX_WA2WAFNONEXENTITEMEX
/AWS1/CX_WA2CLIENTEXC
/AWS1/CX_WA2SERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_resourcearn TYPE /AWS1/WA2RESOURCEARN /AWS1/WA2RESOURCEARN¶
The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the policy.
iv_policy TYPE /AWS1/WA2POLICYSTRING /AWS1/WA2POLICYSTRING¶
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.
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.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_wa2putpermpolicyrsp /AWS1/CL_WA2PUTPERMPOLICYRSP¶
Domain /AWS1/RT_ACCOUNT_ID Primitive Type NUMC
Examples¶
Syntax Example¶
This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.
DATA(lo_result) = lo_client->putpermissionpolicy(
iv_policy = |string|
iv_resourcearn = |string|
).
This is an example of reading all possible response values
lo_result = lo_result.
IF lo_result IS NOT INITIAL.
ENDIF.