Class CfnWebACL
A CloudFormation AWS::WAFv2::WebACL
.
Inherited Members
Namespace: Amazon.CDK.AWS.WAFv2
Assembly: Amazon.CDK.AWS.WAFv2.dll
Syntax (csharp)
public class CfnWebACL : CfnResource, IConstruct, IDependable, IInspectable
Syntax (vb)
Public Class CfnWebACL
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 WebACL
to define a collection of rules to use to inspect and control web requests. Each rule has an action defined (allow, block, or count) for requests that match the statement of the rule. In the web ACL, you specify a default action to take (allow, block) for any request that doesn't match any of the rules. The rules in a web ACL can contain rule statements that you define explicitly and rule statements that reference rule groups and managed rule groups. You can associate a web ACL with one or more AWS resources to protect. The resources can be an Amazon CloudFront distribution, an Amazon API Gateway REST API, an Application Load Balancer , an AWS AppSync GraphQL API , an Amazon Cognito user pool, or an AWS App Runner service.
CloudformationResource: AWS::WAFv2::WebACL
Link: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-wafv2-webacl.html
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 all;
var allQueryArguments;
var count;
var method;
var none;
var queryString;
var singleHeader;
var singleQueryArgument;
StatementProperty statementProperty_;
var uriPath;
var cfnWebACL = new CfnWebACL(this, "MyCfnWebACL", new CfnWebACLProps {
DefaultAction = new DefaultActionProperty {
Allow = new AllowActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Block = new BlockActionProperty {
CustomResponse = new CustomResponseProperty {
ResponseCode = 123,
// the properties below are optional
CustomResponseBodyKey = "customResponseBodyKey",
ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
}
},
Scope = "scope",
VisibilityConfig = new VisibilityConfigProperty {
CloudWatchMetricsEnabled = false,
MetricName = "metricName",
SampledRequestsEnabled = false
},
// the properties below are optional
CaptchaConfig = new CaptchaConfigProperty {
ImmunityTimeProperty = new ImmunityTimePropertyProperty {
ImmunityTime = 123
}
},
ChallengeConfig = new ChallengeConfigProperty {
ImmunityTimeProperty = new ImmunityTimePropertyProperty {
ImmunityTime = 123
}
},
CustomResponseBodies = new Dictionary<string, object> {
{ "customResponseBodiesKey", new CustomResponseBodyProperty {
Content = "content",
ContentType = "contentType"
} }
},
Description = "description",
Name = "name",
Rules = new [] { new RuleProperty {
Name = "name",
Priority = 123,
Statement = new StatementProperty {
AndStatement = new AndStatementProperty {
Statements = new [] { statementProperty_ }
},
ByteMatchStatement = new ByteMatchStatementProperty {
FieldToMatch = new FieldToMatchProperty {
AllQueryArguments = allQueryArguments,
Body = new BodyProperty {
OversizeHandling = "oversizeHandling"
},
Cookies = new CookiesProperty {
MatchPattern = new CookieMatchPatternProperty {
All = all,
ExcludedCookies = new [] { "excludedCookies" },
IncludedCookies = new [] { "includedCookies" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
Headers = new HeadersProperty {
MatchPattern = new HeaderMatchPatternProperty {
All = all,
ExcludedHeaders = new [] { "excludedHeaders" },
IncludedHeaders = new [] { "includedHeaders" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
JsonBody = new JsonBodyProperty {
MatchPattern = new JsonMatchPatternProperty {
All = all,
IncludedPaths = new [] { "includedPaths" }
},
MatchScope = "matchScope",
// the properties below are optional
InvalidFallbackBehavior = "invalidFallbackBehavior",
OversizeHandling = "oversizeHandling"
},
Method = method,
QueryString = queryString,
SingleHeader = singleHeader,
SingleQueryArgument = singleQueryArgument,
UriPath = uriPath
},
PositionalConstraint = "positionalConstraint",
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} },
// the properties below are optional
SearchString = "searchString",
SearchStringBase64 = "searchStringBase64"
},
GeoMatchStatement = new GeoMatchStatementProperty {
CountryCodes = new [] { "countryCodes" },
ForwardedIpConfig = new ForwardedIPConfigurationProperty {
FallbackBehavior = "fallbackBehavior",
HeaderName = "headerName"
}
},
IpSetReferenceStatement = new Dictionary<string, object> {
{ "arn", "arn" },
// the properties below are optional
{ "ipSetForwardedIpConfig", new Dictionary<string, string> {
{ "fallbackBehavior", "fallbackBehavior" },
{ "headerName", "headerName" },
{ "position", "position" }
} }
},
LabelMatchStatement = new LabelMatchStatementProperty {
Key = "key",
Scope = "scope"
},
ManagedRuleGroupStatement = new ManagedRuleGroupStatementProperty {
Name = "name",
VendorName = "vendorName",
// the properties below are optional
ExcludedRules = new [] { new ExcludedRuleProperty {
Name = "name"
} },
ManagedRuleGroupConfigs = new [] { new ManagedRuleGroupConfigProperty {
AwsManagedRulesAtpRuleSet = new AWSManagedRulesATPRuleSetProperty {
LoginPath = "loginPath",
// the properties below are optional
RequestInspection = new RequestInspectionProperty {
PasswordField = new FieldIdentifierProperty {
Identifier = "identifier"
},
PayloadType = "payloadType",
UsernameField = new FieldIdentifierProperty {
Identifier = "identifier"
}
},
ResponseInspection = new ResponseInspectionProperty {
BodyContains = new ResponseInspectionBodyContainsProperty {
FailureStrings = new [] { "failureStrings" },
SuccessStrings = new [] { "successStrings" }
},
Header = new ResponseInspectionHeaderProperty {
FailureValues = new [] { "failureValues" },
Name = "name",
SuccessValues = new [] { "successValues" }
},
Json = new ResponseInspectionJsonProperty {
FailureValues = new [] { "failureValues" },
Identifier = "identifier",
SuccessValues = new [] { "successValues" }
},
StatusCode = new ResponseInspectionStatusCodeProperty {
FailureCodes = new [] { 123 },
SuccessCodes = new [] { 123 }
}
}
},
AwsManagedRulesBotControlRuleSet = new AWSManagedRulesBotControlRuleSetProperty {
InspectionLevel = "inspectionLevel"
},
LoginPath = "loginPath",
PasswordField = new FieldIdentifierProperty {
Identifier = "identifier"
},
PayloadType = "payloadType",
UsernameField = new FieldIdentifierProperty {
Identifier = "identifier"
}
} },
RuleActionOverrides = new [] { new RuleActionOverrideProperty {
ActionToUse = new RuleActionProperty {
Allow = new AllowActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Block = new BlockActionProperty {
CustomResponse = new CustomResponseProperty {
ResponseCode = 123,
// the properties below are optional
CustomResponseBodyKey = "customResponseBodyKey",
ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Captcha = new CaptchaActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Challenge = new ChallengeActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Count = new CountActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
}
},
Name = "name"
} },
ScopeDownStatement = statementProperty_,
Version = "version"
},
NotStatement = new NotStatementProperty {
Statement = statementProperty_
},
OrStatement = new OrStatementProperty {
Statements = new [] { statementProperty_ }
},
RateBasedStatement = new RateBasedStatementProperty {
AggregateKeyType = "aggregateKeyType",
Limit = 123,
// the properties below are optional
ForwardedIpConfig = new ForwardedIPConfigurationProperty {
FallbackBehavior = "fallbackBehavior",
HeaderName = "headerName"
},
ScopeDownStatement = statementProperty_
},
RegexMatchStatement = new RegexMatchStatementProperty {
FieldToMatch = new FieldToMatchProperty {
AllQueryArguments = allQueryArguments,
Body = new BodyProperty {
OversizeHandling = "oversizeHandling"
},
Cookies = new CookiesProperty {
MatchPattern = new CookieMatchPatternProperty {
All = all,
ExcludedCookies = new [] { "excludedCookies" },
IncludedCookies = new [] { "includedCookies" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
Headers = new HeadersProperty {
MatchPattern = new HeaderMatchPatternProperty {
All = all,
ExcludedHeaders = new [] { "excludedHeaders" },
IncludedHeaders = new [] { "includedHeaders" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
JsonBody = new JsonBodyProperty {
MatchPattern = new JsonMatchPatternProperty {
All = all,
IncludedPaths = new [] { "includedPaths" }
},
MatchScope = "matchScope",
// the properties below are optional
InvalidFallbackBehavior = "invalidFallbackBehavior",
OversizeHandling = "oversizeHandling"
},
Method = method,
QueryString = queryString,
SingleHeader = singleHeader,
SingleQueryArgument = singleQueryArgument,
UriPath = uriPath
},
RegexString = "regexString",
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} }
},
RegexPatternSetReferenceStatement = new RegexPatternSetReferenceStatementProperty {
Arn = "arn",
FieldToMatch = new FieldToMatchProperty {
AllQueryArguments = allQueryArguments,
Body = new BodyProperty {
OversizeHandling = "oversizeHandling"
},
Cookies = new CookiesProperty {
MatchPattern = new CookieMatchPatternProperty {
All = all,
ExcludedCookies = new [] { "excludedCookies" },
IncludedCookies = new [] { "includedCookies" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
Headers = new HeadersProperty {
MatchPattern = new HeaderMatchPatternProperty {
All = all,
ExcludedHeaders = new [] { "excludedHeaders" },
IncludedHeaders = new [] { "includedHeaders" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
JsonBody = new JsonBodyProperty {
MatchPattern = new JsonMatchPatternProperty {
All = all,
IncludedPaths = new [] { "includedPaths" }
},
MatchScope = "matchScope",
// the properties below are optional
InvalidFallbackBehavior = "invalidFallbackBehavior",
OversizeHandling = "oversizeHandling"
},
Method = method,
QueryString = queryString,
SingleHeader = singleHeader,
SingleQueryArgument = singleQueryArgument,
UriPath = uriPath
},
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} }
},
RuleGroupReferenceStatement = new RuleGroupReferenceStatementProperty {
Arn = "arn",
// the properties below are optional
ExcludedRules = new [] { new ExcludedRuleProperty {
Name = "name"
} },
RuleActionOverrides = new [] { new RuleActionOverrideProperty {
ActionToUse = new RuleActionProperty {
Allow = new AllowActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Block = new BlockActionProperty {
CustomResponse = new CustomResponseProperty {
ResponseCode = 123,
// the properties below are optional
CustomResponseBodyKey = "customResponseBodyKey",
ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Captcha = new CaptchaActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Challenge = new ChallengeActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Count = new CountActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
}
},
Name = "name"
} }
},
SizeConstraintStatement = new SizeConstraintStatementProperty {
ComparisonOperator = "comparisonOperator",
FieldToMatch = new FieldToMatchProperty {
AllQueryArguments = allQueryArguments,
Body = new BodyProperty {
OversizeHandling = "oversizeHandling"
},
Cookies = new CookiesProperty {
MatchPattern = new CookieMatchPatternProperty {
All = all,
ExcludedCookies = new [] { "excludedCookies" },
IncludedCookies = new [] { "includedCookies" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
Headers = new HeadersProperty {
MatchPattern = new HeaderMatchPatternProperty {
All = all,
ExcludedHeaders = new [] { "excludedHeaders" },
IncludedHeaders = new [] { "includedHeaders" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
JsonBody = new JsonBodyProperty {
MatchPattern = new JsonMatchPatternProperty {
All = all,
IncludedPaths = new [] { "includedPaths" }
},
MatchScope = "matchScope",
// the properties below are optional
InvalidFallbackBehavior = "invalidFallbackBehavior",
OversizeHandling = "oversizeHandling"
},
Method = method,
QueryString = queryString,
SingleHeader = singleHeader,
SingleQueryArgument = singleQueryArgument,
UriPath = uriPath
},
Size = 123,
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} }
},
SqliMatchStatement = new SqliMatchStatementProperty {
FieldToMatch = new FieldToMatchProperty {
AllQueryArguments = allQueryArguments,
Body = new BodyProperty {
OversizeHandling = "oversizeHandling"
},
Cookies = new CookiesProperty {
MatchPattern = new CookieMatchPatternProperty {
All = all,
ExcludedCookies = new [] { "excludedCookies" },
IncludedCookies = new [] { "includedCookies" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
Headers = new HeadersProperty {
MatchPattern = new HeaderMatchPatternProperty {
All = all,
ExcludedHeaders = new [] { "excludedHeaders" },
IncludedHeaders = new [] { "includedHeaders" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
JsonBody = new JsonBodyProperty {
MatchPattern = new JsonMatchPatternProperty {
All = all,
IncludedPaths = new [] { "includedPaths" }
},
MatchScope = "matchScope",
// the properties below are optional
InvalidFallbackBehavior = "invalidFallbackBehavior",
OversizeHandling = "oversizeHandling"
},
Method = method,
QueryString = queryString,
SingleHeader = singleHeader,
SingleQueryArgument = singleQueryArgument,
UriPath = uriPath
},
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} },
// the properties below are optional
SensitivityLevel = "sensitivityLevel"
},
XssMatchStatement = new XssMatchStatementProperty {
FieldToMatch = new FieldToMatchProperty {
AllQueryArguments = allQueryArguments,
Body = new BodyProperty {
OversizeHandling = "oversizeHandling"
},
Cookies = new CookiesProperty {
MatchPattern = new CookieMatchPatternProperty {
All = all,
ExcludedCookies = new [] { "excludedCookies" },
IncludedCookies = new [] { "includedCookies" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
Headers = new HeadersProperty {
MatchPattern = new HeaderMatchPatternProperty {
All = all,
ExcludedHeaders = new [] { "excludedHeaders" },
IncludedHeaders = new [] { "includedHeaders" }
},
MatchScope = "matchScope",
OversizeHandling = "oversizeHandling"
},
JsonBody = new JsonBodyProperty {
MatchPattern = new JsonMatchPatternProperty {
All = all,
IncludedPaths = new [] { "includedPaths" }
},
MatchScope = "matchScope",
// the properties below are optional
InvalidFallbackBehavior = "invalidFallbackBehavior",
OversizeHandling = "oversizeHandling"
},
Method = method,
QueryString = queryString,
SingleHeader = singleHeader,
SingleQueryArgument = singleQueryArgument,
UriPath = uriPath
},
TextTransformations = new [] { new TextTransformationProperty {
Priority = 123,
Type = "type"
} }
}
},
VisibilityConfig = new VisibilityConfigProperty {
CloudWatchMetricsEnabled = false,
MetricName = "metricName",
SampledRequestsEnabled = false
},
// the properties below are optional
Action = new RuleActionProperty {
Allow = new AllowActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Block = new BlockActionProperty {
CustomResponse = new CustomResponseProperty {
ResponseCode = 123,
// the properties below are optional
CustomResponseBodyKey = "customResponseBodyKey",
ResponseHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Captcha = new CaptchaActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Challenge = new ChallengeActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
},
Count = new CountActionProperty {
CustomRequestHandling = new CustomRequestHandlingProperty {
InsertHeaders = new [] { new CustomHTTPHeaderProperty {
Name = "name",
Value = "value"
} }
}
}
},
CaptchaConfig = new CaptchaConfigProperty {
ImmunityTimeProperty = new ImmunityTimePropertyProperty {
ImmunityTime = 123
}
},
ChallengeConfig = new ChallengeConfigProperty {
ImmunityTimeProperty = new ImmunityTimePropertyProperty {
ImmunityTime = 123
}
},
OverrideAction = new OverrideActionProperty {
Count = count,
None = none
},
RuleLabels = new [] { new LabelProperty {
Name = "name"
} }
} },
Tags = new [] { new CfnTag {
Key = "key",
Value = "value"
} },
TokenDomains = new [] { "tokenDomains" }
});
Synopsis
Constructors
CfnWebACL(Construct, String, ICfnWebACLProps) | Create a new |
CfnWebACL(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
CfnWebACL(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
AttrArn | The Amazon Resource Name (ARN) of the web ACL. |
AttrCapacity | The web ACL capacity units (WCUs) currently being used by this web ACL. |
AttrId | The ID of the web ACL. |
AttrLabelNamespace | The label namespace prefix for this web ACL. |
CaptchaConfig | Specifies how AWS WAF should handle |
CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
CfnProperties | |
ChallengeConfig | Specifies how AWS WAF should handle challenge evaluations for rules that don't have their own |
CustomResponseBodies | A map of custom response keys and content bodies. |
DefaultAction | The action to perform if none of the |
Description | A description of the web ACL that helps with identification. |
Name | The name of the web ACL. |
Rules | The rule statements used to identify the web requests that you want to allow, block, or count. |
Scope | Specifies whether this is for an Amazon CloudFront distribution or for a regional application. |
Tags | Key:value pairs associated with an AWS resource. |
TokenDomains | Specifies the domains that AWS WAF should accept in a web request token. |
VisibilityConfig | Defines and enables Amazon CloudWatch metrics and web request sample collection. |
Methods
Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
RenderProperties(IDictionary<String, Object>) |
Constructors
CfnWebACL(Construct, String, ICfnWebACLProps)
Create a new AWS::WAFv2::WebACL
.
public CfnWebACL(Construct scope, string id, ICfnWebACLProps props)
Parameters
- scope Construct
- scope in which this resource is defined.
- id System.String
- scoped id of the resource.
- props ICfnWebACLProps
- resource properties.
CfnWebACL(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected CfnWebACL(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
CfnWebACL(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected CfnWebACL(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
AttrArn
The Amazon Resource Name (ARN) of the web ACL.
public virtual string AttrArn { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Arn
AttrCapacity
The web ACL capacity units (WCUs) currently being used by this web ACL.
public virtual double AttrCapacity { get; }
Property Value
System.Double
Remarks
AWS WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. AWS WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.
CloudformationAttribute: Capacity
AttrId
The ID of the web ACL.
public virtual string AttrId { get; }
Property Value
System.String
Remarks
CloudformationAttribute: Id
AttrLabelNamespace
The label namespace prefix for this web ACL.
public virtual string AttrLabelNamespace { get; }
Property Value
System.String
Remarks
All labels added by rules in this web ACL have this prefix.
The syntax for the label namespace prefix for a web ACL is the following: awswaf:<account ID>:webacl:<web ACL name>:
When a rule with a label matches a web request, AWS WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon.
CloudformationAttribute: LabelNamespace
CaptchaConfig
Specifies how AWS WAF should handle CAPTCHA
evaluations for rules that don't have their own CaptchaConfig
settings.
public virtual object CaptchaConfig { get; set; }
Property Value
System.Object
Remarks
If you don't specify this, AWS WAF uses its default settings for CaptchaConfig
.
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
ChallengeConfig
Specifies how AWS WAF should handle challenge evaluations for rules that don't have their own ChallengeConfig
settings.
public virtual object ChallengeConfig { get; set; }
Property Value
System.Object
Remarks
If you don't specify this, AWS WAF uses its default settings for ChallengeConfig
.
CustomResponseBodies
A map of custom response keys and content bodies.
public virtual object CustomResponseBodies { get; set; }
Property Value
System.Object
Remarks
When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.
For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide .
For information about the limits on count and size for custom request and response settings, see AWS WAF quotas in the AWS WAF Developer Guide .
DefaultAction
The action to perform if none of the Rules
contained in the WebACL
match.
public virtual object DefaultAction { get; set; }
Property Value
System.Object
Remarks
Description
A description of the web ACL that helps with identification.
public virtual string Description { get; set; }
Property Value
System.String
Remarks
Name
The name of the web ACL.
public virtual string Name { get; set; }
Property Value
System.String
Remarks
You cannot change the name of a web ACL after you create it.
Rules
The rule statements used to identify the web requests that you want to allow, block, or count.
public virtual object Rules { get; set; }
Property Value
System.Object
Remarks
Each rule includes one top-level statement that AWS WAF uses to identify matching web requests, and parameters that govern how AWS WAF handles them.
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
.
For information about how to define the association of the web ACL with your resource, see WebACLAssociation
.
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.
TokenDomains
Specifies the domains that AWS WAF should accept in a web request token.
public virtual string[] TokenDomains { get; set; }
Property Value
System.String[]
Remarks
This enables the use of tokens across multiple protected websites. When AWS WAF provides a token, it uses the domain of the AWS resource that the web ACL is protecting. If you don't specify a list of token domains, AWS WAF accepts tokens only for the domain of the protected resource. With a token domain list, AWS WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
VisibilityConfig
Defines and enables Amazon CloudWatch metrics and web request sample collection.
public virtual object VisibilityConfig { get; set; }
Property Value
System.Object
Remarks
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>