Skip to main content

regex_pattern_sets

Creates, updates, deletes or gets a regex_pattern_set resource or lists regex_pattern_sets in a region

Overview

Nameregex_pattern_sets
TypeResource
DescriptionContains a list of Regular expressions based on the provided inputs. RegexPatternSet can be used with other WAF entities with RegexPatternSetReferenceStatement to perform other actions .
Idaws.wafv2.regex_pattern_sets

Fields

NameDatatypeDescription
arnstringARN of the WAF entity.
descriptionstringDescription of the entity.
namestringName of the RegexPatternSet.
idstringId of the RegexPatternSet
regular_expression_listarray
scopestringUse CLOUDFRONT for CloudFront RegexPatternSet, use REGIONAL for Application Load Balancer and API Gateway.
tagsarray
regionstringAWS region.

Methods

NameAccessible byRequired Params
create_resourceINSERTScope, RegularExpressionList, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.wafv2.regex_pattern_sets (
RegularExpressionList,
Scope,
region
)
SELECT
'{{ RegularExpressionList }}',
'{{ Scope }}',
'{{ region }}';

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