public static final class CfnRuleGroup.RateBasedStatementProperty.Builder
extends java.lang.Object
CfnRuleGroup.RateBasedStatementProperty
Constructor and Description |
---|
Builder() |
public CfnRuleGroup.RateBasedStatementProperty.Builder aggregateKeyType(java.lang.String aggregateKeyType)
CfnRuleGroup.RateBasedStatementProperty.getAggregateKeyType()
aggregateKeyType
- Setting that indicates how to aggregate the request counts. The options are the following:. This parameter is required.
ForwardedIPConfig
, to specify the header to use.this
public CfnRuleGroup.RateBasedStatementProperty.Builder limit(java.lang.Number limit)
CfnRuleGroup.RateBasedStatementProperty.getLimit()
limit
- The limit on requests per 5-minute period for a single originating IP address. This parameter is required.
If the statement includes a ScopeDownStatement
, this limit is applied only to the requests that match the statement.this
public CfnRuleGroup.RateBasedStatementProperty.Builder forwardedIpConfig(IResolvable forwardedIpConfig)
CfnRuleGroup.RateBasedStatementProperty.getForwardedIpConfig()
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 AggregateKeyType
is set to FORWARDED_IP
.
this
public CfnRuleGroup.RateBasedStatementProperty.Builder forwardedIpConfig(CfnRuleGroup.ForwardedIPConfigurationProperty forwardedIpConfig)
CfnRuleGroup.RateBasedStatementProperty.getForwardedIpConfig()
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 AggregateKeyType
is set to FORWARDED_IP
.
this
public CfnRuleGroup.RateBasedStatementProperty.Builder scopeDownStatement(IResolvable scopeDownStatement)
CfnRuleGroup.RateBasedStatementProperty.getScopeDownStatement()
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 nestable statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.this
public CfnRuleGroup.RateBasedStatementProperty.Builder scopeDownStatement(CfnRuleGroup.StatementProperty scopeDownStatement)
CfnRuleGroup.RateBasedStatementProperty.getScopeDownStatement()
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 nestable statement in the scope-down statement, and you can nest statements at any level, the same as you can for a rule statement.this
public CfnRuleGroup.RateBasedStatementProperty build()
CfnRuleGroup.RateBasedStatementProperty
java.lang.NullPointerException
- if any required attribute was not provided