/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Details about a rate-based rule for global resources. A rate-based rule
* provides settings to indicate when to allow, block, or count a request.
* Rate-based rules include the number of requests that arrive over a specified
* period of time.See Also:
AWS
* API Reference
The name of the metrics for the rate-based rule.
*/ inline const Aws::String& GetMetricName() const{ return m_metricName; } /** *The name of the metrics for the rate-based rule.
*/ inline bool MetricNameHasBeenSet() const { return m_metricNameHasBeenSet; } /** *The name of the metrics for the rate-based rule.
*/ inline void SetMetricName(const Aws::String& value) { m_metricNameHasBeenSet = true; m_metricName = value; } /** *The name of the metrics for the rate-based rule.
*/ inline void SetMetricName(Aws::String&& value) { m_metricNameHasBeenSet = true; m_metricName = std::move(value); } /** *The name of the metrics for the rate-based rule.
*/ inline void SetMetricName(const char* value) { m_metricNameHasBeenSet = true; m_metricName.assign(value); } /** *The name of the metrics for the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithMetricName(const Aws::String& value) { SetMetricName(value); return *this;} /** *The name of the metrics for the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithMetricName(Aws::String&& value) { SetMetricName(std::move(value)); return *this;} /** *The name of the metrics for the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithMetricName(const char* value) { SetMetricName(value); return *this;} /** *The name of the rate-based rule.
*/ inline const Aws::String& GetName() const{ return m_name; } /** *The name of the rate-based rule.
*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *The name of the rate-based rule.
*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *The name of the rate-based rule.
*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *The name of the rate-based rule.
*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *The name of the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithName(const Aws::String& value) { SetName(value); return *this;} /** *The name of the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *The name of the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithName(const char* value) { SetName(value); return *this;} /** *The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.
*/ inline const Aws::String& GetRateKey() const{ return m_rateKey; } /** *The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.
*/ inline bool RateKeyHasBeenSet() const { return m_rateKeyHasBeenSet; } /** *The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.
*/ inline void SetRateKey(const Aws::String& value) { m_rateKeyHasBeenSet = true; m_rateKey = value; } /** *The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.
*/ inline void SetRateKey(Aws::String&& value) { m_rateKeyHasBeenSet = true; m_rateKey = std::move(value); } /** *The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.
*/ inline void SetRateKey(const char* value) { m_rateKeyHasBeenSet = true; m_rateKey.assign(value); } /** *The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.
*/ inline AwsWafRateBasedRuleDetails& WithRateKey(const Aws::String& value) { SetRateKey(value); return *this;} /** *The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.
*/ inline AwsWafRateBasedRuleDetails& WithRateKey(Aws::String&& value) { SetRateKey(std::move(value)); return *this;} /** *The field that WAF uses to determine whether requests are likely arriving * from single source and are subject to rate monitoring.
*/ inline AwsWafRateBasedRuleDetails& WithRateKey(const char* value) { SetRateKey(value); return *this;} /** *The maximum number of requests that have an identical value for the field
* specified in RateKey
that are allowed within a five-minute period.
* If the number of requests exceeds RateLimit
and the other
* predicates specified in the rule are met, WAF triggers the action for the
* rule.
The maximum number of requests that have an identical value for the field
* specified in RateKey
that are allowed within a five-minute period.
* If the number of requests exceeds RateLimit
and the other
* predicates specified in the rule are met, WAF triggers the action for the
* rule.
The maximum number of requests that have an identical value for the field
* specified in RateKey
that are allowed within a five-minute period.
* If the number of requests exceeds RateLimit
and the other
* predicates specified in the rule are met, WAF triggers the action for the
* rule.
The maximum number of requests that have an identical value for the field
* specified in RateKey
that are allowed within a five-minute period.
* If the number of requests exceeds RateLimit
and the other
* predicates specified in the rule are met, WAF triggers the action for the
* rule.
The unique identifier for the rate-based rule.
*/ inline const Aws::String& GetRuleId() const{ return m_ruleId; } /** *The unique identifier for the rate-based rule.
*/ inline bool RuleIdHasBeenSet() const { return m_ruleIdHasBeenSet; } /** *The unique identifier for the rate-based rule.
*/ inline void SetRuleId(const Aws::String& value) { m_ruleIdHasBeenSet = true; m_ruleId = value; } /** *The unique identifier for the rate-based rule.
*/ inline void SetRuleId(Aws::String&& value) { m_ruleIdHasBeenSet = true; m_ruleId = std::move(value); } /** *The unique identifier for the rate-based rule.
*/ inline void SetRuleId(const char* value) { m_ruleIdHasBeenSet = true; m_ruleId.assign(value); } /** *The unique identifier for the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithRuleId(const Aws::String& value) { SetRuleId(value); return *this;} /** *The unique identifier for the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithRuleId(Aws::String&& value) { SetRuleId(std::move(value)); return *this;} /** *The unique identifier for the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithRuleId(const char* value) { SetRuleId(value); return *this;} /** *The predicates to include in the rate-based rule.
*/ inline const Aws::VectorThe predicates to include in the rate-based rule.
*/ inline bool MatchPredicatesHasBeenSet() const { return m_matchPredicatesHasBeenSet; } /** *The predicates to include in the rate-based rule.
*/ inline void SetMatchPredicates(const Aws::VectorThe predicates to include in the rate-based rule.
*/ inline void SetMatchPredicates(Aws::VectorThe predicates to include in the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithMatchPredicates(const Aws::VectorThe predicates to include in the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& WithMatchPredicates(Aws::VectorThe predicates to include in the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& AddMatchPredicates(const AwsWafRateBasedRuleMatchPredicate& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates.push_back(value); return *this; } /** *The predicates to include in the rate-based rule.
*/ inline AwsWafRateBasedRuleDetails& AddMatchPredicates(AwsWafRateBasedRuleMatchPredicate&& value) { m_matchPredicatesHasBeenSet = true; m_matchPredicates.push_back(std::move(value)); return *this; } private: Aws::String m_metricName; bool m_metricNameHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_rateKey; bool m_rateKeyHasBeenSet = false; long long m_rateLimit; bool m_rateLimitHasBeenSet = false; Aws::String m_ruleId; bool m_ruleIdHasBeenSet = false; Aws::Vector