Class CfnRuleGroupProps.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleGroupProps>
- Enclosing interface:
- CfnRuleGroupProps
CfnRuleGroupProps
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionavailableLabels
(List<? extends Object> availableLabels) Sets the value ofCfnRuleGroupProps.getAvailableLabels()
availableLabels
(IResolvable availableLabels) Sets the value ofCfnRuleGroupProps.getAvailableLabels()
build()
Builds the configured instance.Sets the value ofCfnRuleGroupProps.getCapacity()
consumedLabels
(List<? extends Object> consumedLabels) Sets the value ofCfnRuleGroupProps.getConsumedLabels()
consumedLabels
(IResolvable consumedLabels) Sets the value ofCfnRuleGroupProps.getConsumedLabels()
customResponseBodies
(Map<String, ? extends Object> customResponseBodies) Sets the value ofCfnRuleGroupProps.getCustomResponseBodies()
customResponseBodies
(IResolvable customResponseBodies) Sets the value ofCfnRuleGroupProps.getCustomResponseBodies()
description
(String description) Sets the value ofCfnRuleGroupProps.getDescription()
Sets the value ofCfnRuleGroupProps.getName()
Sets the value ofCfnRuleGroupProps.getRules()
rules
(IResolvable rules) Sets the value ofCfnRuleGroupProps.getRules()
Sets the value ofCfnRuleGroupProps.getScope()
Sets the value ofCfnRuleGroupProps.getTags()
visibilityConfig
(IResolvable visibilityConfig) Sets the value ofCfnRuleGroupProps.getVisibilityConfig()
visibilityConfig
(CfnRuleGroup.VisibilityConfigProperty visibilityConfig) Sets the value ofCfnRuleGroupProps.getVisibilityConfig()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
capacity
Sets the value ofCfnRuleGroupProps.getCapacity()
- Parameters:
capacity
- The web ACL capacity units (WCUs) required for this rule group. This parameter is required. When you create your own rule group, you define this, and you cannot change it after creation. When you add or modify the rules in a rule group, AWS WAF enforces this limit.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.
- Returns:
this
-
scope
Sets the value ofCfnRuleGroupProps.getScope()
- Parameters:
scope
- Specifies whether this is for an Amazon CloudFront distribution or for a regional application. This parameter is required. 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 areCLOUDFRONT
andREGIONAL
.For
CLOUDFRONT
, you must create your WAFv2 resources in the US East (N. Virginia) Region,us-east-1
.- Returns:
this
-
visibilityConfig
Sets the value ofCfnRuleGroupProps.getVisibilityConfig()
- Parameters:
visibilityConfig
- Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required.- Returns:
this
-
visibilityConfig
@Stability(Stable) public CfnRuleGroupProps.Builder visibilityConfig(CfnRuleGroup.VisibilityConfigProperty visibilityConfig) Sets the value ofCfnRuleGroupProps.getVisibilityConfig()
- Parameters:
visibilityConfig
- Defines and enables Amazon CloudWatch metrics and web request sample collection. This parameter is required.- Returns:
this
-
availableLabels
Sets the value ofCfnRuleGroupProps.getAvailableLabels()
- Parameters:
availableLabels
- The labels that one or more rules in this rule group add to matching web requests. These labels are defined in theRuleLabels
for aRule
.- Returns:
this
-
availableLabels
@Stability(Stable) public CfnRuleGroupProps.Builder availableLabels(List<? extends Object> availableLabels) Sets the value ofCfnRuleGroupProps.getAvailableLabels()
- Parameters:
availableLabels
- The labels that one or more rules in this rule group add to matching web requests. These labels are defined in theRuleLabels
for aRule
.- Returns:
this
-
consumedLabels
Sets the value ofCfnRuleGroupProps.getConsumedLabels()
- Parameters:
consumedLabels
- The labels that one or more rules in this rule group match against in label match statements. These labels are defined in aLabelMatchStatement
specification, in theStatement
definition of a rule.- Returns:
this
-
consumedLabels
@Stability(Stable) public CfnRuleGroupProps.Builder consumedLabels(List<? extends Object> consumedLabels) Sets the value ofCfnRuleGroupProps.getConsumedLabels()
- Parameters:
consumedLabels
- The labels that one or more rules in this rule group match against in label match statements. These labels are defined in aLabelMatchStatement
specification, in theStatement
definition of a rule.- Returns:
this
-
customResponseBodies
@Stability(Stable) public CfnRuleGroupProps.Builder customResponseBodies(IResolvable customResponseBodies) Sets the value ofCfnRuleGroupProps.getCustomResponseBodies()
- Parameters:
customResponseBodies
- A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.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 .
- Returns:
this
-
customResponseBodies
@Stability(Stable) public CfnRuleGroupProps.Builder customResponseBodies(Map<String, ? extends Object> customResponseBodies) Sets the value ofCfnRuleGroupProps.getCustomResponseBodies()
- Parameters:
customResponseBodies
- A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.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 .
- Returns:
this
-
description
Sets the value ofCfnRuleGroupProps.getDescription()
- Parameters:
description
- A description of the rule group that helps with identification.- Returns:
this
-
name
Sets the value ofCfnRuleGroupProps.getName()
- Parameters:
name
- The name of the rule group. You cannot change the name of a rule group after you create it.- Returns:
this
-
rules
Sets the value ofCfnRuleGroupProps.getRules()
- Parameters:
rules
- The rule statements used to identify the web requests that you want to allow, block, or count. 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.- Returns:
this
-
rules
Sets the value ofCfnRuleGroupProps.getRules()
- Parameters:
rules
- The rule statements used to identify the web requests that you want to allow, block, or count. 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.- Returns:
this
-
tags
Sets the value ofCfnRuleGroupProps.getTags()
- Parameters:
tags
- Key:value pairs associated with an AWS resource. 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.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRuleGroupProps>
- Returns:
- a new instance of
CfnRuleGroupProps
- Throws:
NullPointerException
- if any required attribute was not provided
-