AWS SDK for C++  1.9.132
AWS SDK for C++
Public Member Functions | List of all members
Aws::WAFV2::Model::RateBasedStatement Class Reference

#include <RateBasedStatement.h>

Public Member Functions

 RateBasedStatement ()
 
 RateBasedStatement (Aws::Utils::Json::JsonView jsonValue)
 
RateBasedStatementoperator= (Aws::Utils::Json::JsonView jsonValue)
 
Aws::Utils::Json::JsonValue Jsonize () const
 
long long GetLimit () const
 
bool LimitHasBeenSet () const
 
void SetLimit (long long value)
 
RateBasedStatementWithLimit (long long value)
 
const RateBasedStatementAggregateKeyTypeGetAggregateKeyType () const
 
bool AggregateKeyTypeHasBeenSet () const
 
void SetAggregateKeyType (const RateBasedStatementAggregateKeyType &value)
 
void SetAggregateKeyType (RateBasedStatementAggregateKeyType &&value)
 
RateBasedStatementWithAggregateKeyType (const RateBasedStatementAggregateKeyType &value)
 
RateBasedStatementWithAggregateKeyType (RateBasedStatementAggregateKeyType &&value)
 
const StatementGetScopeDownStatement () const
 
bool ScopeDownStatementHasBeenSet () const
 
void SetScopeDownStatement (const Statement &value)
 
void SetScopeDownStatement (Statement &&value)
 
RateBasedStatementWithScopeDownStatement (const Statement &value)
 
RateBasedStatementWithScopeDownStatement (Statement &&value)
 
const ForwardedIPConfigGetForwardedIPConfig () const
 
bool ForwardedIPConfigHasBeenSet () const
 
void SetForwardedIPConfig (const ForwardedIPConfig &value)
 
void SetForwardedIPConfig (ForwardedIPConfig &&value)
 
RateBasedStatementWithForwardedIPConfig (const ForwardedIPConfig &value)
 
RateBasedStatementWithForwardedIPConfig (ForwardedIPConfig &&value)
 

Detailed Description

A rate-based rule tracks the rate of requests for each originating IP address, and triggers the rule action when the rate exceeds a limit that you specify on the number of requests in any 5-minute time span. You can use this to put a temporary block on requests from an IP address that is sending excessive requests.

WAF tracks and manages web requests separately for each instance of a rate-based rule that you use. For example, if you provide the same rate-based rule settings in two web ACLs, each of the two rule statements represents a separate instance of the rate-based rule and gets its own tracking and management by WAF. If you define a rate-based rule inside a rule group, and then use that rule group in multiple places, each use creates a separate instance of the rate-based rule that gets its own tracking and management by WAF.

When the rule action triggers, WAF blocks additional requests from the IP address until the request rate falls below the limit.

You can optionally nest another statement inside the rate-based statement, to narrow the scope of the rule so that it only counts requests that match the nested statement. For example, based on recent requests that you have seen from an attacker, you might create a rate-based rule with a nested AND rule statement that contains the following nested statements:

In this rate-based rule, you also define a rate limit. For this example, the rate limit is 1,000. Requests that meet both of the conditions in the statements are counted. If the count exceeds 1,000 requests per five minutes, the rule action triggers. Requests that do not meet both conditions are not counted towards the rate limit and are not affected by this rule.

You cannot nest a RateBasedStatement inside another statement, for example inside a NotStatement or OrStatement. You can define a RateBasedStatement inside a web ACL and inside a rule group.

See Also:

AWS API Reference

Definition at line 62 of file RateBasedStatement.h.

Constructor & Destructor Documentation

◆ RateBasedStatement() [1/2]

Aws::WAFV2::Model::RateBasedStatement::RateBasedStatement ( )

◆ RateBasedStatement() [2/2]

Aws::WAFV2::Model::RateBasedStatement::RateBasedStatement ( Aws::Utils::Json::JsonView  jsonValue)

Member Function Documentation

◆ AggregateKeyTypeHasBeenSet()

bool Aws::WAFV2::Model::RateBasedStatement::AggregateKeyTypeHasBeenSet ( ) const
inline

Setting that indicates how to aggregate the request counts. The options are the following:

  • 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 the ForwardedIPConfig, to specify the header to use.

Definition at line 118 of file RateBasedStatement.h.

◆ ForwardedIPConfigHasBeenSet()

bool Aws::WAFV2::Model::RateBasedStatement::ForwardedIPConfigHasBeenSet ( ) const
inline

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, WAF doesn't apply the rule to the web request at all.

This is required if AggregateKeyType is set to FORWARDED_IP.

Definition at line 236 of file RateBasedStatement.h.

◆ GetAggregateKeyType()

const RateBasedStatementAggregateKeyType& Aws::WAFV2::Model::RateBasedStatement::GetAggregateKeyType ( ) const
inline

Setting that indicates how to aggregate the request counts. The options are the following:

  • 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 the ForwardedIPConfig, to specify the header to use.

Definition at line 108 of file RateBasedStatement.h.

◆ GetForwardedIPConfig()

const ForwardedIPConfig& Aws::WAFV2::Model::RateBasedStatement::GetForwardedIPConfig ( ) const
inline

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, WAF doesn't apply the rule to the web request at all.

This is required if AggregateKeyType is set to FORWARDED_IP.

Definition at line 225 of file RateBasedStatement.h.

◆ GetLimit()

long long Aws::WAFV2::Model::RateBasedStatement::GetLimit ( ) const
inline

The limit on requests per 5-minute period for a single originating IP address. If the statement includes a ScopeDownStatement, this limit is applied only to the requests that match the statement.

Definition at line 76 of file RateBasedStatement.h.

◆ GetScopeDownStatement()

const Statement& Aws::WAFV2::Model::RateBasedStatement::GetScopeDownStatement ( ) const

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.

◆ Jsonize()

Aws::Utils::Json::JsonValue Aws::WAFV2::Model::RateBasedStatement::Jsonize ( ) const

◆ LimitHasBeenSet()

bool Aws::WAFV2::Model::RateBasedStatement::LimitHasBeenSet ( ) const
inline

The limit on requests per 5-minute period for a single originating IP address. If the statement includes a ScopeDownStatement, this limit is applied only to the requests that match the statement.

Definition at line 83 of file RateBasedStatement.h.

◆ operator=()

RateBasedStatement& Aws::WAFV2::Model::RateBasedStatement::operator= ( Aws::Utils::Json::JsonView  jsonValue)

◆ ScopeDownStatementHasBeenSet()

bool Aws::WAFV2::Model::RateBasedStatement::ScopeDownStatementHasBeenSet ( ) const

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.

◆ SetAggregateKeyType() [1/2]

void Aws::WAFV2::Model::RateBasedStatement::SetAggregateKeyType ( const RateBasedStatementAggregateKeyType value)
inline

Setting that indicates how to aggregate the request counts. The options are the following:

  • 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 the ForwardedIPConfig, to specify the header to use.

Definition at line 128 of file RateBasedStatement.h.

◆ SetAggregateKeyType() [2/2]

void Aws::WAFV2::Model::RateBasedStatement::SetAggregateKeyType ( RateBasedStatementAggregateKeyType &&  value)
inline

Setting that indicates how to aggregate the request counts. The options are the following:

  • 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 the ForwardedIPConfig, to specify the header to use.

Definition at line 138 of file RateBasedStatement.h.

◆ SetForwardedIPConfig() [1/2]

void Aws::WAFV2::Model::RateBasedStatement::SetForwardedIPConfig ( const ForwardedIPConfig value)
inline

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, WAF doesn't apply the rule to the web request at all.

This is required if AggregateKeyType is set to FORWARDED_IP.

Definition at line 247 of file RateBasedStatement.h.

◆ SetForwardedIPConfig() [2/2]

void Aws::WAFV2::Model::RateBasedStatement::SetForwardedIPConfig ( ForwardedIPConfig &&  value)
inline

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, WAF doesn't apply the rule to the web request at all.

This is required if AggregateKeyType is set to FORWARDED_IP.

Definition at line 258 of file RateBasedStatement.h.

◆ SetLimit()

void Aws::WAFV2::Model::RateBasedStatement::SetLimit ( long long  value)
inline

The limit on requests per 5-minute period for a single originating IP address. If the statement includes a ScopeDownStatement, this limit is applied only to the requests that match the statement.

Definition at line 90 of file RateBasedStatement.h.

◆ SetScopeDownStatement() [1/2]

void Aws::WAFV2::Model::RateBasedStatement::SetScopeDownStatement ( const Statement value)

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.

◆ SetScopeDownStatement() [2/2]

void Aws::WAFV2::Model::RateBasedStatement::SetScopeDownStatement ( Statement &&  value)

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.

◆ WithAggregateKeyType() [1/2]

RateBasedStatement& Aws::WAFV2::Model::RateBasedStatement::WithAggregateKeyType ( const RateBasedStatementAggregateKeyType value)
inline

Setting that indicates how to aggregate the request counts. The options are the following:

  • 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 the ForwardedIPConfig, to specify the header to use.

Definition at line 148 of file RateBasedStatement.h.

◆ WithAggregateKeyType() [2/2]

RateBasedStatement& Aws::WAFV2::Model::RateBasedStatement::WithAggregateKeyType ( RateBasedStatementAggregateKeyType &&  value)
inline

Setting that indicates how to aggregate the request counts. The options are the following:

  • 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 the ForwardedIPConfig, to specify the header to use.

Definition at line 158 of file RateBasedStatement.h.

◆ WithForwardedIPConfig() [1/2]

RateBasedStatement& Aws::WAFV2::Model::RateBasedStatement::WithForwardedIPConfig ( const ForwardedIPConfig value)
inline

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, WAF doesn't apply the rule to the web request at all.

This is required if AggregateKeyType is set to FORWARDED_IP.

Definition at line 269 of file RateBasedStatement.h.

◆ WithForwardedIPConfig() [2/2]

RateBasedStatement& Aws::WAFV2::Model::RateBasedStatement::WithForwardedIPConfig ( ForwardedIPConfig &&  value)
inline

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, WAF doesn't apply the rule to the web request at all.

This is required if AggregateKeyType is set to FORWARDED_IP.

Definition at line 280 of file RateBasedStatement.h.

◆ WithLimit()

RateBasedStatement& Aws::WAFV2::Model::RateBasedStatement::WithLimit ( long long  value)
inline

The limit on requests per 5-minute period for a single originating IP address. If the statement includes a ScopeDownStatement, this limit is applied only to the requests that match the statement.

Definition at line 97 of file RateBasedStatement.h.

◆ WithScopeDownStatement() [1/2]

RateBasedStatement& Aws::WAFV2::Model::RateBasedStatement::WithScopeDownStatement ( const Statement value)

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.

◆ WithScopeDownStatement() [2/2]

RateBasedStatement& Aws::WAFV2::Model::RateBasedStatement::WithScopeDownStatement ( Statement &&  value)

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.


The documentation for this class was generated from the following file: