regex_pattern_sets
Creates, updates, deletes or gets a regex_pattern_set
resource or lists regex_pattern_sets
in a region
Overview
Name | regex_pattern_sets |
Type | Resource |
Description | Contains a list of Regular expressions based on the provided inputs. RegexPatternSet can be used with other WAF entities with RegexPatternSetReferenceStatement to perform other actions . |
Id | aws.wafv2.regex_pattern_sets |
Fields
Name | Datatype | Description |
---|---|---|
arn | string | ARN of the WAF entity. |
description | string | Description of the entity. |
name | string | Name of the RegexPatternSet. |
id | string | Id of the RegexPatternSet |
regular_expression_list | array | |
scope | string | Use CLOUDFRONT for CloudFront RegexPatternSet, use REGIONAL for Application Load Balancer and API Gateway. |
tags | array | |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | Scope, RegularExpressionList, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all regex_pattern_sets
in a region.
SELECT
region,
arn,
description,
name,
id,
regular_expression_list,
scope,
tags
FROM aws.wafv2.regex_pattern_sets
;
Gets all properties from an individual regex_pattern_set
.
SELECT
region,
arn,
description,
name,
id,
regular_expression_list,
scope,
tags
FROM aws.wafv2.regex_pattern_sets
WHERE data__Identifier = '<Name>|<Id>|<Scope>';
INSERT
example
Use the following StackQL query and manifest file to create a new regex_pattern_set
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.wafv2.regex_pattern_sets (
RegularExpressionList,
Scope,
region
)
SELECT
'{{ RegularExpressionList }}',
'{{ Scope }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.wafv2.regex_pattern_sets (
Description,
Name,
RegularExpressionList,
Scope,
Tags,
region
)
SELECT
'{{ Description }}',
'{{ Name }}',
'{{ RegularExpressionList }}',
'{{ Scope }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: regex_pattern_set
props:
- name: Description
value: '{{ Description }}'
- name: Name
value: '{{ Name }}'
- name: RegularExpressionList
value:
- '{{ RegularExpressionList[0] }}'
- name: Scope
value: '{{ Scope }}'
- name: Tags
value:
- Key: '{{ Key }}'
Value: '{{ Value }}'
DELETE
example
/*+ delete */
DELETE FROM aws.wafv2.regex_pattern_sets
WHERE data__Identifier = '<Name|Id|Scope>'
AND region = 'us-east-1';
Permissions
To operate on the regex_pattern_sets
resource, the following permissions are required:
Create
wafv2:CreateRegexPatternSet,
wafv2:GetRegexPatternSet,
wafv2:ListTagsForResource
Delete
wafv2:DeleteRegexPatternSet,
wafv2:GetRegexPatternSet
Read
wafv2:GetRegexPatternSet,
wafv2:ListTagsForResource
Update
wafv2:UpdateRegexPatternSet,
wafv2:GetRegexPatternSet,
wafv2:ListTagsForResource
List
wafv2:listRegexPatternSets