Modifier and Type | Method and Description |
---|---|
CfnWebACL |
build() |
CfnWebACL.Builder |
captchaConfig(CfnWebACL.CaptchaConfigProperty captchaConfig)
Specifies how AWS WAF should handle `CAPTCHA` evaluations for rules that don't have their own `CaptchaConfig` settings.
|
CfnWebACL.Builder |
captchaConfig(IResolvable captchaConfig)
Specifies how AWS WAF should handle `CAPTCHA` evaluations for rules that don't have their own `CaptchaConfig` settings.
|
static CfnWebACL.Builder |
create(Construct scope,
java.lang.String id) |
CfnWebACL.Builder |
customResponseBodies(IResolvable customResponseBodies)
A map of custom response keys and content bodies.
|
CfnWebACL.Builder |
customResponseBodies(java.util.Map<java.lang.String,? extends java.lang.Object> customResponseBodies)
A map of custom response keys and content bodies.
|
CfnWebACL.Builder |
defaultAction(CfnWebACL.DefaultActionProperty defaultAction)
The action to perform if none of the `Rules` contained in the `WebACL` match.
|
CfnWebACL.Builder |
defaultAction(IResolvable defaultAction)
The action to perform if none of the `Rules` contained in the `WebACL` match.
|
CfnWebACL.Builder |
description(java.lang.String description)
A description of the web ACL that helps with identification.
|
CfnWebACL.Builder |
name(java.lang.String name)
The name of the web ACL.
|
CfnWebACL.Builder |
rules(IResolvable rules)
The rule statements used to identify the web requests that you want to allow, block, or count.
|
CfnWebACL.Builder |
rules(java.util.List<? extends java.lang.Object> rules)
The rule statements used to identify the web requests that you want to allow, block, or count.
|
CfnWebACL.Builder |
scope(java.lang.String scope)
Specifies whether this is for an Amazon CloudFront distribution or for a regional application.
|
CfnWebACL.Builder |
tags(java.util.List<? extends CfnTag> tags)
Key:value pairs associated with an AWS resource.
|
CfnWebACL.Builder |
visibilityConfig(CfnWebACL.VisibilityConfigProperty visibilityConfig)
Defines and enables Amazon CloudWatch metrics and web request sample collection.
|
CfnWebACL.Builder |
visibilityConfig(IResolvable visibilityConfig)
Defines and enables Amazon CloudWatch metrics and web request sample collection.
|
public static CfnWebACL.Builder create(Construct scope, java.lang.String id)
scope
- - scope in which this resource is defined. This parameter is required.id
- - scoped id of the resource. This parameter is required.CfnWebACL.AllowActionProperty.Builder
.public CfnWebACL.Builder defaultAction(IResolvable defaultAction)
defaultAction
- The action to perform if none of the `Rules` contained in the `WebACL` match. This parameter is required.this
public CfnWebACL.Builder defaultAction(CfnWebACL.DefaultActionProperty defaultAction)
defaultAction
- The action to perform if none of the `Rules` contained in the `WebACL` match. This parameter is required.this
public CfnWebACL.Builder scope(java.lang.String scope)
A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, or an AWS AppSync GraphQL API. 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
.
scope
- Specifies whether this is for an Amazon CloudFront distribution or for a regional application. This parameter is required.this
public CfnWebACL.Builder visibilityConfig(IResolvable visibilityConfig)
visibilityConfig
- Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required.this
public CfnWebACL.Builder visibilityConfig(CfnWebACL.VisibilityConfigProperty visibilityConfig)
visibilityConfig
- Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required.this
public CfnWebACL.Builder captchaConfig(IResolvable captchaConfig)
If you don't specify this, AWS WAF uses its default settings for CaptchaConfig
.
captchaConfig
- Specifies how AWS WAF should handle `CAPTCHA` evaluations for rules that don't have their own `CaptchaConfig` settings. This parameter is required.this
public CfnWebACL.Builder captchaConfig(CfnWebACL.CaptchaConfigProperty captchaConfig)
If you don't specify this, AWS WAF uses its default settings for CaptchaConfig
.
captchaConfig
- Specifies how AWS WAF should handle `CAPTCHA` evaluations for rules that don't have their own `CaptchaConfig` settings. This parameter is required.this
public CfnWebACL.Builder customResponseBodies(IResolvable customResponseBodies)
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 .
customResponseBodies
- A map of custom response keys and content bodies. This parameter is required.this
public CfnWebACL.Builder customResponseBodies(java.util.Map<java.lang.String,? extends java.lang.Object> customResponseBodies)
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 .
customResponseBodies
- A map of custom response keys and content bodies. This parameter is required.this
public CfnWebACL.Builder description(java.lang.String description)
description
- A description of the web ACL that helps with identification. This parameter is required.this
public CfnWebACL.Builder name(java.lang.String name)
You cannot change the name of a web ACL after you create it.
name
- The name of the web ACL. This parameter is required.this
public CfnWebACL.Builder rules(IResolvable rules)
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.
rules
- The rule statements used to identify the web requests that you want to allow, block, or count. This parameter is required.this
public CfnWebACL.Builder rules(java.util.List<? extends java.lang.Object> rules)
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.
rules
- The rule statements used to identify the web requests that you want to allow, block, or count. This parameter is required.this
public CfnWebACL.Builder tags(java.util.List<? extends CfnTag> tags)
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.
tags
- Key:value pairs associated with an AWS resource. This parameter is required.this
public CfnWebACL build()