Class CfnRuleGroup.RateBasedStatementProperty.Builder
- All Implemented Interfaces:
software.amazon.jsii.Builder<CfnRuleGroup.RateBasedStatementProperty>
- Enclosing interface:
CfnRuleGroup.RateBasedStatementProperty
CfnRuleGroup.RateBasedStatementProperty
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaggregateKeyType
(String aggregateKeyType) Sets the value ofCfnRuleGroup.RateBasedStatementProperty.getAggregateKeyType()
build()
Builds the configured instance.forwardedIpConfig
(IResolvable forwardedIpConfig) Sets the value ofCfnRuleGroup.RateBasedStatementProperty.getForwardedIpConfig()
forwardedIpConfig
(CfnRuleGroup.ForwardedIPConfigurationProperty forwardedIpConfig) Sets the value ofCfnRuleGroup.RateBasedStatementProperty.getForwardedIpConfig()
Sets the value ofCfnRuleGroup.RateBasedStatementProperty.getLimit()
scopeDownStatement
(IResolvable scopeDownStatement) Sets the value ofCfnRuleGroup.RateBasedStatementProperty.getScopeDownStatement()
scopeDownStatement
(CfnRuleGroup.StatementProperty scopeDownStatement) Sets the value ofCfnRuleGroup.RateBasedStatementProperty.getScopeDownStatement()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
aggregateKeyType
@Stability(Stable) public CfnRuleGroup.RateBasedStatementProperty.Builder aggregateKeyType(String aggregateKeyType) Sets the value ofCfnRuleGroup.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 ofCfnRuleGroup.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 CfnRuleGroup.RateBasedStatementProperty.Builder forwardedIpConfig(IResolvable forwardedIpConfig) Sets the value ofCfnRuleGroup.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 CfnRuleGroup.RateBasedStatementProperty.Builder forwardedIpConfig(CfnRuleGroup.ForwardedIPConfigurationProperty forwardedIpConfig) Sets the value ofCfnRuleGroup.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 CfnRuleGroup.RateBasedStatementProperty.Builder scopeDownStatement(IResolvable scopeDownStatement) Sets the value ofCfnRuleGroup.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 nestable statement 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 CfnRuleGroup.RateBasedStatementProperty.Builder scopeDownStatement(CfnRuleGroup.StatementProperty scopeDownStatement) Sets the value ofCfnRuleGroup.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 nestable statement 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<CfnRuleGroup.RateBasedStatementProperty>
- Returns:
- a new instance of
CfnRuleGroup.RateBasedStatementProperty
- Throws:
NullPointerException
- if any required attribute was not provided
-