Class CfnWebACL.ForwardedIPConfigurationProperty.Builder
java.lang.Object
software.amazon.awscdk.services.wafv2.CfnWebACL.ForwardedIPConfigurationProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnWebACL.ForwardedIPConfigurationProperty>
- Enclosing interface:
CfnWebACL.ForwardedIPConfigurationProperty
@Stability(Stable)
public static final class CfnWebACL.ForwardedIPConfigurationProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnWebACL.ForwardedIPConfigurationProperty>
A builder for
CfnWebACL.ForwardedIPConfigurationProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds the configured instance.fallbackBehavior
(String fallbackBehavior) Sets the value ofCfnWebACL.ForwardedIPConfigurationProperty.getFallbackBehavior()
headerName
(String headerName) Sets the value ofCfnWebACL.ForwardedIPConfigurationProperty.getHeaderName()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
fallbackBehavior
@Stability(Stable) public CfnWebACL.ForwardedIPConfigurationProperty.Builder fallbackBehavior(String fallbackBehavior) Sets the value ofCfnWebACL.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 CfnWebACL.ForwardedIPConfigurationProperty.Builder headerName(String headerName) Sets the value ofCfnWebACL.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<CfnWebACL.ForwardedIPConfigurationProperty>
- Returns:
- a new instance of
CfnWebACL.ForwardedIPConfigurationProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-