Class CfnRegexPatternSet
A CloudFormation AWS::WAFv2::RegexPatternSet
.
Inherited Members
Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.AWS.WAFv2.dll
Syntax (csharp)
public class CfnRegexPatternSet : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnRegexPatternSet
Inherits CfnResource
Implements IConstruct, IDependable, IInspectable
Remarks
This is the latest version of AWS WAF , named AWS WAF V2, released in November, 2019. For information, including how to migrate your AWS WAF resources from the prior release, see the AWS WAF Developer Guide .
Use an RegexPatternSet
to have AWS WAF inspect a web request component for a specific set of regular expression patterns.
You use a regex pattern set by providing its Amazon Resource Name (ARN) to the rule statement RegexPatternSetReferenceStatement
, when you add a rule to a rule group or web ACL.
CloudformationResource: AWS::WAFv2::RegexPatternSet
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAFv2;
var cfnRegexPatternSet = new CfnRegexPatternSet(this, "MyCfnRegexPatternSet", new CfnRegexPatternSetProps {
RegularExpressionList = new [] { "regularExpressionList" },
Scope = "scope",
// the properties below are optional
Description = "description",
Name = "name",
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} }
});
Synopsis
Constructors
CfnRegexPatternSet(Construct, String, ICfnRegexPatternSetProps) | Create a new |
CfnRegexPatternSet(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnRegexPatternSet(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The Amazon Resource Name (ARN) of the regex pattern set. |
AttrId | The ID of the regex pattern set. |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
Description | A description of the set that helps with identification. |
Name | The name of the set. |
RegularExpressionList | The regular expression patterns in the set. |
Scope | Specifies whether this is for an Amazon CloudFront distribution or for a regional application. |
Tags | Key:value pairs associated with an AWS resource. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnRegexPatternSet(Construct, String, ICfnRegexPatternSetProps)
Create a new AWS::WAFv2::RegexPatternSet
.
public CfnRegexPatternSet(Construct scope, string id, ICfnRegexPatternSetProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnRegexPatternSetProps
- resource properties.
CfnRegexPatternSet(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnRegexPatternSet(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnRegexPatternSet(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnRegexPatternSet(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The Amazon Resource Name (ARN) of the regex pattern set.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrId
The ID of the regex pattern set.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
System.String
CfnProperties
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.Object>
Overrides
Description
A description of the set that helps with identification.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
Name
The name of the set.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
You cannot change the name after you create the set.
RegularExpressionList
The regular expression patterns in the set.
public virtual string[] RegularExpressionList { get; set; }
Property Value
System.String[]
Remarks
Scope
Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
public virtual string Scope { get; set; }
Property Value
System.String
Remarks
A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AWS AppSync GraphQL API, an Amazon Cognito user pool, or an AWS App Runner service. Valid Values are CLOUDFRONT
and REGIONAL
.
For CLOUDFRONT
, you must create your WAFv2 resources in the US East (N. Virginia) Region, us-east-1
.
Tags
Key:value pairs associated with an AWS resource.
public virtual TagManager Tags { get; }
Property Value
Remarks
The key:value pair can be anything you define. Typically, the tag key represents a category (such as "environment") and the tag value represents a specific value within that category (such as "test," "development," or "production"). You can add up to 50 tags to each AWS resource.
To modify tags on existing resources, use the AWS WAF APIs or command line interface. With AWS CloudFormation , you can only add tags to AWS WAF resources during resource creation.
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
- tree inspector to collect and process attributes.
RenderProperties(IDictionary<String, Object>)
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props System.Collections.Generic.IDictionary<System.String, System.Object>
Returns
System.Collections.Generic.IDictionary<System.String, System.Object>