Class CfnWebACL.RateBasedStatementProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnWebACL.RateBasedStatementProperty>
- Enclosing interface:
- CfnWebACL.RateBasedStatementProperty
CfnWebACL.RateBasedStatementProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaggregateKeyType
(String aggregateKeyType) Sets the value ofCfnWebACL.RateBasedStatementProperty.getAggregateKeyType()
build()
Builds the configured instance.forwardedIpConfig
(IResolvable forwardedIpConfig) Sets the value ofCfnWebACL.RateBasedStatementProperty.getForwardedIpConfig()
forwardedIpConfig
(CfnWebACL.ForwardedIPConfigurationProperty forwardedIpConfig) Sets the value ofCfnWebACL.RateBasedStatementProperty.getForwardedIpConfig()
Sets the value ofCfnWebACL.RateBasedStatementProperty.getLimit()
scopeDownStatement
(IResolvable scopeDownStatement) Sets the value ofCfnWebACL.RateBasedStatementProperty.getScopeDownStatement()
scopeDownStatement
(CfnWebACL.StatementProperty scopeDownStatement) Sets the value ofCfnWebACL.RateBasedStatementProperty.getScopeDownStatement()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
aggregateKeyType
@Stability(Stable) public CfnWebACL.RateBasedStatementProperty.Builder aggregateKeyType(String aggregateKeyType) Sets the value ofCfnWebACL.RateBasedStatementProperty.getAggregateKeyType()
- Parameters:
aggregateKeyType
- Setting that indicates how to aggregate the request counts. The options are the following:. This parameter is required.IP
- Aggregate the request counts on the IP address from the web request origin.FORWARDED_IP
- Aggregate the request counts on the first IP address in an HTTP header. If you use this, configure theForwardedIPConfig
, to specify the header to use.
You can only use the
IP
andFORWARDED_IP
key types.- Returns:
this
-
limit
Sets the value ofCfnWebACL.RateBasedStatementProperty.getLimit()
- Parameters:
limit
- The limit on requests per 5-minute period for a single originating IP address. This parameter is required. If the statement includes aScopeDownStatement
, this limit is applied only to the requests that match the statement.- Returns:
this
-
forwardedIpConfig
@Stability(Stable) public CfnWebACL.RateBasedStatementProperty.Builder forwardedIpConfig(IResolvable forwardedIpConfig) Sets the value ofCfnWebACL.RateBasedStatementProperty.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.
This is required if you specify a forwarded IP in the rule's aggregate key settings.
- Returns:
this
-
forwardedIpConfig
@Stability(Stable) public CfnWebACL.RateBasedStatementProperty.Builder forwardedIpConfig(CfnWebACL.ForwardedIPConfigurationProperty forwardedIpConfig) Sets the value ofCfnWebACL.RateBasedStatementProperty.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.
This is required if you specify a forwarded IP in the rule's aggregate key settings.
- Returns:
this
-
scopeDownStatement
@Stability(Stable) public CfnWebACL.RateBasedStatementProperty.Builder scopeDownStatement(IResolvable scopeDownStatement) Sets the value ofCfnWebACL.RateBasedStatementProperty.getScopeDownStatement()
- Parameters:
scopeDownStatement
- An optional nested statement that narrows the scope of the web requests that are evaluated by the rate-based statement. Requests are only tracked by the rate-based statement if they match the scope-down statement. You can use any nestableStatement
in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.- Returns:
this
-
scopeDownStatement
@Stability(Stable) public CfnWebACL.RateBasedStatementProperty.Builder scopeDownStatement(CfnWebACL.StatementProperty scopeDownStatement) Sets the value ofCfnWebACL.RateBasedStatementProperty.getScopeDownStatement()
- Parameters:
scopeDownStatement
- An optional nested statement that narrows the scope of the web requests that are evaluated by the rate-based statement. Requests are only tracked by the rate-based statement if they match the scope-down statement. You can use any nestableStatement
in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.- Returns:
this
-
build
Builds the configured instance.- Specified by:
build
in interfacesoftware.amazon.jsii.Builder<CfnWebACL.RateBasedStatementProperty>
- Returns:
- a new instance of
CfnWebACL.RateBasedStatementProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-