Class CfnRuleGroup.ForwardedIPConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.wafv2.CfnRuleGroup.ForwardedIPConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleGroup.ForwardedIPConfigurationProperty>
- Enclosing interface:
CfnRuleGroup.ForwardedIPConfigurationProperty
@Stability(Stable)
public static final class CfnRuleGroup.ForwardedIPConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRuleGroup.ForwardedIPConfigurationProperty>
A builder for
CfnRuleGroup.ForwardedIPConfigurationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.fallbackBehavior
(String fallbackBehavior) Sets the value ofCfnRuleGroup.ForwardedIPConfigurationProperty.getFallbackBehavior()
headerName
(String headerName) Sets the value ofCfnRuleGroup.ForwardedIPConfigurationProperty.getHeaderName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
fallbackBehavior
@Stability(Stable) public CfnRuleGroup.ForwardedIPConfigurationProperty.Builder fallbackBehavior(String fallbackBehavior) Sets the value ofCfnRuleGroup.ForwardedIPConfigurationProperty.getFallbackBehavior()
- Parameters:
fallbackBehavior
- The match status to assign to the web request if the request doesn't have a valid IP address in the specified position. This parameter is required.If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
You can specify the following fallback behaviors:
MATCH
- Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request.NO_MATCH
- Treat the web request as not matching the rule statement.
- Returns:
this
-
headerName
@Stability(Stable) public CfnRuleGroup.ForwardedIPConfigurationProperty.Builder headerName(String headerName) Sets the value ofCfnRuleGroup.ForwardedIPConfigurationProperty.getHeaderName()
- Parameters:
headerName
- The name of the HTTP header to use for the IP address. This parameter is required. For example, to use the X-Forwarded-For (XFF) header, set this toX-Forwarded-For
.If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnRuleGroup.ForwardedIPConfigurationProperty>
- Returns:
- a new instance of
CfnRuleGroup.ForwardedIPConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-