/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace WAFV2 { namespace Model { /** *

The set of IP addresses that are currently blocked for a * RateBasedStatement. This is only available for rate-based rules that * aggregate on just the IP address, with the AggregateKeyType set to * IP or FORWARDED_IP.

A rate-based rule applies * its rule action to requests from IP addresses that are in the rule's managed * keys list and that match the rule's scope-down statement. When a rule has no * scope-down statement, it applies the action to all requests from the IP * addresses that are in the list. The rule applies its rule action to rate limit * the matching requests. The action is usually Block but it can be any valid rule * action except for Allow.

The maximum number of IP addresses that can be * rate limited by a single rate-based rule instance is 10,000. If more than 10,000 * addresses exceed the rate limit, WAF limits those with the highest rates. *

See Also:

AWS * API Reference

*/ class RateBasedStatementManagedKeysIPSet { public: AWS_WAFV2_API RateBasedStatementManagedKeysIPSet(); AWS_WAFV2_API RateBasedStatementManagedKeysIPSet(Aws::Utils::Json::JsonView jsonValue); AWS_WAFV2_API RateBasedStatementManagedKeysIPSet& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_WAFV2_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The version of the IP addresses, either IPV4 or * IPV6.

*/ inline const IPAddressVersion& GetIPAddressVersion() const{ return m_iPAddressVersion; } /** *

The version of the IP addresses, either IPV4 or * IPV6.

*/ inline bool IPAddressVersionHasBeenSet() const { return m_iPAddressVersionHasBeenSet; } /** *

The version of the IP addresses, either IPV4 or * IPV6.

*/ inline void SetIPAddressVersion(const IPAddressVersion& value) { m_iPAddressVersionHasBeenSet = true; m_iPAddressVersion = value; } /** *

The version of the IP addresses, either IPV4 or * IPV6.

*/ inline void SetIPAddressVersion(IPAddressVersion&& value) { m_iPAddressVersionHasBeenSet = true; m_iPAddressVersion = std::move(value); } /** *

The version of the IP addresses, either IPV4 or * IPV6.

*/ inline RateBasedStatementManagedKeysIPSet& WithIPAddressVersion(const IPAddressVersion& value) { SetIPAddressVersion(value); return *this;} /** *

The version of the IP addresses, either IPV4 or * IPV6.

*/ inline RateBasedStatementManagedKeysIPSet& WithIPAddressVersion(IPAddressVersion&& value) { SetIPAddressVersion(std::move(value)); return *this;} /** *

The IP addresses that are currently blocked.

*/ inline const Aws::Vector& GetAddresses() const{ return m_addresses; } /** *

The IP addresses that are currently blocked.

*/ inline bool AddressesHasBeenSet() const { return m_addressesHasBeenSet; } /** *

The IP addresses that are currently blocked.

*/ inline void SetAddresses(const Aws::Vector& value) { m_addressesHasBeenSet = true; m_addresses = value; } /** *

The IP addresses that are currently blocked.

*/ inline void SetAddresses(Aws::Vector&& value) { m_addressesHasBeenSet = true; m_addresses = std::move(value); } /** *

The IP addresses that are currently blocked.

*/ inline RateBasedStatementManagedKeysIPSet& WithAddresses(const Aws::Vector& value) { SetAddresses(value); return *this;} /** *

The IP addresses that are currently blocked.

*/ inline RateBasedStatementManagedKeysIPSet& WithAddresses(Aws::Vector&& value) { SetAddresses(std::move(value)); return *this;} /** *

The IP addresses that are currently blocked.

*/ inline RateBasedStatementManagedKeysIPSet& AddAddresses(const Aws::String& value) { m_addressesHasBeenSet = true; m_addresses.push_back(value); return *this; } /** *

The IP addresses that are currently blocked.

*/ inline RateBasedStatementManagedKeysIPSet& AddAddresses(Aws::String&& value) { m_addressesHasBeenSet = true; m_addresses.push_back(std::move(value)); return *this; } /** *

The IP addresses that are currently blocked.

*/ inline RateBasedStatementManagedKeysIPSet& AddAddresses(const char* value) { m_addressesHasBeenSet = true; m_addresses.push_back(value); return *this; } private: IPAddressVersion m_iPAddressVersion; bool m_iPAddressVersionHasBeenSet = false; Aws::Vector m_addresses; bool m_addressesHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws