Skip to main content

permission_policies

Creates, updates, deletes, gets or lists a permission_policies resource.

Overview

Namepermission_policies
TypeResource
Idaws.wafv2.permission_policies

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
policystringThe IAM policy that is attached to the specified rule group. (pattern: <code>.\S.</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_permission_policyselectregionReturns the IAM policy that is attached to the specified rule group. You must be the owner of the rule group to perform this operation.
put_permission_policyreplaceregion, ResourceArnUse 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 PutPermissionPolicy request. 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.
delete_permission_policydeleteregionPermanently deletes an IAM policy from the specified rule group. You must be the owner of the rule group to perform this operation.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns the IAM policy that is attached to the specified rule group. You must be the owner of the rule group to perform this operation.

SELECT
policy
FROM aws.wafv2.permission_policies
WHERE region = '{{ region }}' -- required
;

REPLACE examples

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 PutPermissionPolicy request. 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.

REPLACE aws.wafv2.permission_policies
SET
ResourceArn = '{{ ResourceArn }}',
Policy = '{{ Policy }}'
WHERE
region = '{{ region }}' --required
AND ResourceArn = '{{ ResourceArn }}' --required;

DELETE examples

Permanently deletes an IAM policy from the specified rule group. You must be the owner of the rule group to perform this operation.

DELETE FROM aws.wafv2.permission_policies
WHERE region = '{{ region }}' --required
;