/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include Provides details about rules in a rule group. A rule identifies web requests
* that you want to allow, block, or count. Each rule includes one top-level
* Statement that WAF uses to identify matching web requests, and parameters that
* govern how WAF handles them. See Also:
AWS
* API Reference
The action that WAF should take on a web request when it matches the rule * statement. Settings at the web ACL level can override the rule action setting. *
*/ inline const AwsWafv2RulesActionDetails& GetAction() const{ return m_action; } /** *The action that WAF should take on a web request when it matches the rule * statement. Settings at the web ACL level can override the rule action setting. *
*/ inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; } /** *The action that WAF should take on a web request when it matches the rule * statement. Settings at the web ACL level can override the rule action setting. *
*/ inline void SetAction(const AwsWafv2RulesActionDetails& value) { m_actionHasBeenSet = true; m_action = value; } /** *The action that WAF should take on a web request when it matches the rule * statement. Settings at the web ACL level can override the rule action setting. *
*/ inline void SetAction(AwsWafv2RulesActionDetails&& value) { m_actionHasBeenSet = true; m_action = std::move(value); } /** *The action that WAF should take on a web request when it matches the rule * statement. Settings at the web ACL level can override the rule action setting. *
*/ inline AwsWafv2RulesDetails& WithAction(const AwsWafv2RulesActionDetails& value) { SetAction(value); return *this;} /** *The action that WAF should take on a web request when it matches the rule * statement. Settings at the web ACL level can override the rule action setting. *
*/ inline AwsWafv2RulesDetails& WithAction(AwsWafv2RulesActionDetails&& value) { SetAction(std::move(value)); return *this;} /** *The name of the rule.
*/ inline const Aws::String& GetName() const{ return m_name; } /** *The name of the rule.
*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *The name of the rule.
*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *The name of the rule.
*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *The name of the rule.
*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *The name of the rule.
*/ inline AwsWafv2RulesDetails& WithName(const Aws::String& value) { SetName(value); return *this;} /** *The name of the rule.
*/ inline AwsWafv2RulesDetails& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *The name of the rule.
*/ inline AwsWafv2RulesDetails& WithName(const char* value) { SetName(value); return *this;} /** *The action to use in the place of the action that results from the rule * group evaluation.
*/ inline const Aws::String& GetOverrideAction() const{ return m_overrideAction; } /** *The action to use in the place of the action that results from the rule * group evaluation.
*/ inline bool OverrideActionHasBeenSet() const { return m_overrideActionHasBeenSet; } /** *The action to use in the place of the action that results from the rule * group evaluation.
*/ inline void SetOverrideAction(const Aws::String& value) { m_overrideActionHasBeenSet = true; m_overrideAction = value; } /** *The action to use in the place of the action that results from the rule * group evaluation.
*/ inline void SetOverrideAction(Aws::String&& value) { m_overrideActionHasBeenSet = true; m_overrideAction = std::move(value); } /** *The action to use in the place of the action that results from the rule * group evaluation.
*/ inline void SetOverrideAction(const char* value) { m_overrideActionHasBeenSet = true; m_overrideAction.assign(value); } /** *The action to use in the place of the action that results from the rule * group evaluation.
*/ inline AwsWafv2RulesDetails& WithOverrideAction(const Aws::String& value) { SetOverrideAction(value); return *this;} /** *The action to use in the place of the action that results from the rule * group evaluation.
*/ inline AwsWafv2RulesDetails& WithOverrideAction(Aws::String&& value) { SetOverrideAction(std::move(value)); return *this;} /** *The action to use in the place of the action that results from the rule * group evaluation.
*/ inline AwsWafv2RulesDetails& WithOverrideAction(const char* value) { SetOverrideAction(value); return *this;} /** * If you define more than one Rule in a WebACL, WAF evaluates each request
* against the Rules in order based on the value of Priority
. WAF
* processes rules with lower priority first. The priorities don't need to be
* consecutive, but they must all be different.
If you define more than one Rule in a WebACL, WAF evaluates each request
* against the Rules in order based on the value of Priority
. WAF
* processes rules with lower priority first. The priorities don't need to be
* consecutive, but they must all be different.
If you define more than one Rule in a WebACL, WAF evaluates each request
* against the Rules in order based on the value of Priority
. WAF
* processes rules with lower priority first. The priorities don't need to be
* consecutive, but they must all be different.
If you define more than one Rule in a WebACL, WAF evaluates each request
* against the Rules in order based on the value of Priority
. WAF
* processes rules with lower priority first. The priorities don't need to be
* consecutive, but they must all be different.
Defines and enables Amazon CloudWatch metrics and web request sample * collection.
*/ inline const AwsWafv2VisibilityConfigDetails& GetVisibilityConfig() const{ return m_visibilityConfig; } /** *Defines and enables Amazon CloudWatch metrics and web request sample * collection.
*/ inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; } /** *Defines and enables Amazon CloudWatch metrics and web request sample * collection.
*/ inline void SetVisibilityConfig(const AwsWafv2VisibilityConfigDetails& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = value; } /** *Defines and enables Amazon CloudWatch metrics and web request sample * collection.
*/ inline void SetVisibilityConfig(AwsWafv2VisibilityConfigDetails&& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = std::move(value); } /** *Defines and enables Amazon CloudWatch metrics and web request sample * collection.
*/ inline AwsWafv2RulesDetails& WithVisibilityConfig(const AwsWafv2VisibilityConfigDetails& value) { SetVisibilityConfig(value); return *this;} /** *Defines and enables Amazon CloudWatch metrics and web request sample * collection.
*/ inline AwsWafv2RulesDetails& WithVisibilityConfig(AwsWafv2VisibilityConfigDetails&& value) { SetVisibilityConfig(std::move(value)); return *this;} private: AwsWafv2RulesActionDetails m_action; bool m_actionHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_overrideAction; bool m_overrideActionHasBeenSet = false; int m_priority; bool m_priorityHasBeenSet = false; AwsWafv2VisibilityConfigDetails m_visibilityConfig; bool m_visibilityConfigHasBeenSet = false; }; } // namespace Model } // namespace SecurityHub } // namespace Aws