Class CfnRuleGroupPropsMixin.GeoMatchStatementProperty.Builder
java.lang.Object
software.amazon.awscdk.cfnpropertymixins.services.wafv2.CfnRuleGroupPropsMixin.GeoMatchStatementProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleGroupPropsMixin.GeoMatchStatementProperty>
- Enclosing interface:
CfnRuleGroupPropsMixin.GeoMatchStatementProperty
@Stability(Stable)
public static final class CfnRuleGroupPropsMixin.GeoMatchStatementProperty.Builder
extends Object
implements software.amazon.jsii.Builder<CfnRuleGroupPropsMixin.GeoMatchStatementProperty>
A builder for
CfnRuleGroupPropsMixin.GeoMatchStatementProperty-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the configured instance.countryCodes(List<String> countryCodes) Sets the value ofCfnRuleGroupPropsMixin.GeoMatchStatementProperty.getCountryCodes()forwardedIpConfig(CfnRuleGroupPropsMixin.ForwardedIPConfigurationProperty forwardedIpConfig) Sets the value ofCfnRuleGroupPropsMixin.GeoMatchStatementProperty.getForwardedIpConfig()forwardedIpConfig(IResolvable forwardedIpConfig) Sets the value ofCfnRuleGroupPropsMixin.GeoMatchStatementProperty.getForwardedIpConfig()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
countryCodes
@Stability(Stable) public CfnRuleGroupPropsMixin.GeoMatchStatementProperty.Builder countryCodes(List<String> countryCodes) Sets the value ofCfnRuleGroupPropsMixin.GeoMatchStatementProperty.getCountryCodes()- Parameters:
countryCodes- An array of two-character country codes that you want to match against, for example,[ "US", "CN" ], from the alpha-2 country ISO codes of the ISO 3166 international standard. When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.- Returns:
this
-
forwardedIpConfig
@Stability(Stable) public CfnRuleGroupPropsMixin.GeoMatchStatementProperty.Builder forwardedIpConfig(IResolvable forwardedIpConfig) Sets the value ofCfnRuleGroupPropsMixin.GeoMatchStatementProperty.getForwardedIpConfig()- Parameters:
forwardedIpConfig- The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.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
-
forwardedIpConfig
@Stability(Stable) public CfnRuleGroupPropsMixin.GeoMatchStatementProperty.Builder forwardedIpConfig(CfnRuleGroupPropsMixin.ForwardedIPConfigurationProperty forwardedIpConfig) Sets the value ofCfnRuleGroupPropsMixin.GeoMatchStatementProperty.getForwardedIpConfig()- Parameters:
forwardedIpConfig- The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin. Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.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:
buildin interfacesoftware.amazon.jsii.Builder<CfnRuleGroupPropsMixin.GeoMatchStatementProperty>- Returns:
- a new instance of
CfnRuleGroupPropsMixin.GeoMatchStatementProperty - Throws:
NullPointerException- if any required attribute was not provided
-