permission_policies
Creates, updates, deletes, gets or lists a permission_policies resource.
Overview
| Name | permission_policies |
| Type | Resource |
| Id | aws.wafv2.permission_policies |
Fields
The following fields are returned by SELECT queries:
- get_permission_policy
| Name | Datatype | Description |
|---|---|---|
policy | string | The IAM policy that is attached to the specified rule group. (pattern: <code>.\S.</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_permission_policy | select | region | 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. | |
put_permission_policy | replace | region, ResourceArn | 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. | |
delete_permission_policy | delete | region | Permanently 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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_permission_policy
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
- put_permission_policy
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
- delete_permission_policy
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
;