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 .
Idawscc.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.

For more information, see AWS::WAFv2::RegexPatternSet.

Methods

NameResourceAccessible byRequired Params
create_resourceregex_pattern_setsINSERTScope, RegularExpressionList, region
delete_resourceregex_pattern_setsDELETEIdentifier, region
update_resourceregex_pattern_setsUPDATEIdentifier, PatchDocument, region
list_resourcesregex_pattern_sets_list_onlySELECTregion
get_resourceregex_pattern_setsSELECTIdentifier, region

SELECT examples

Gets all properties from an individual regex_pattern_set.

SELECT
region,
arn,
description,
name,
id,
regular_expression_list,
scope,
tags
FROM awscc.wafv2.regex_pattern_sets
WHERE
region = 'us-east-1' AND
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 awscc.wafv2.regex_pattern_sets (
RegularExpressionList,
Scope,
region
)
SELECT
'{{ regular_expression_list }}',
'{{ scope }}',
'{{ region }}';

UPDATE example

Use the following StackQL query and manifest file to update a regex_pattern_set resource, using stack-deploy.

/*+ update */
UPDATE awscc.wafv2.regex_pattern_sets
SET PatchDocument = string('{{ {
"Description": description,
"RegularExpressionList": regular_expression_list,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ name }}|{{ id }}|{{ scope }}';

DELETE example

/*+ delete */
DELETE FROM awscc.wafv2.regex_pattern_sets
WHERE
Identifier = '{{ name }}|{{ id }}|{{ scope }}' AND
region = 'us-east-1';

Permissions

To operate on the regex_pattern_sets resource, the following permissions are required:

wafv2:CreateRegexPatternSet,
wafv2:GetRegexPatternSet,
wafv2:TagResource,
wafv2:UntagResource,
wafv2:ListTagsForResource