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

A rule statement used to run the rules that are defined in a * RuleGroup. To use this, create a rule group with your rules, then provide * the ARN of the rule group in this statement.

You cannot nest a * RuleGroupReferenceStatement, for example for use inside a * NotStatement or OrStatement. You can only use a rule * group reference statement at the top level inside a web ACL.

See * Also:

AWS * API Reference

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

The Amazon Resource Name (ARN) of the entity.

*/ inline const Aws::String& GetARN() const{ return m_aRN; } /** *

The Amazon Resource Name (ARN) of the entity.

*/ inline bool ARNHasBeenSet() const { return m_aRNHasBeenSet; } /** *

The Amazon Resource Name (ARN) of the entity.

*/ inline void SetARN(const Aws::String& value) { m_aRNHasBeenSet = true; m_aRN = value; } /** *

The Amazon Resource Name (ARN) of the entity.

*/ inline void SetARN(Aws::String&& value) { m_aRNHasBeenSet = true; m_aRN = std::move(value); } /** *

The Amazon Resource Name (ARN) of the entity.

*/ inline void SetARN(const char* value) { m_aRNHasBeenSet = true; m_aRN.assign(value); } /** *

The Amazon Resource Name (ARN) of the entity.

*/ inline RuleGroupReferenceStatement& WithARN(const Aws::String& value) { SetARN(value); return *this;} /** *

The Amazon Resource Name (ARN) of the entity.

*/ inline RuleGroupReferenceStatement& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;} /** *

The Amazon Resource Name (ARN) of the entity.

*/ inline RuleGroupReferenceStatement& WithARN(const char* value) { SetARN(value); return *this;} /** *

Rules in the referenced rule group whose actions are set to * Count.

Instead of this option, use * RuleActionOverrides. It accepts any valid action setting, including * Count.

*/ inline const Aws::Vector& GetExcludedRules() const{ return m_excludedRules; } /** *

Rules in the referenced rule group whose actions are set to * Count.

Instead of this option, use * RuleActionOverrides. It accepts any valid action setting, including * Count.

*/ inline bool ExcludedRulesHasBeenSet() const { return m_excludedRulesHasBeenSet; } /** *

Rules in the referenced rule group whose actions are set to * Count.

Instead of this option, use * RuleActionOverrides. It accepts any valid action setting, including * Count.

*/ inline void SetExcludedRules(const Aws::Vector& value) { m_excludedRulesHasBeenSet = true; m_excludedRules = value; } /** *

Rules in the referenced rule group whose actions are set to * Count.

Instead of this option, use * RuleActionOverrides. It accepts any valid action setting, including * Count.

*/ inline void SetExcludedRules(Aws::Vector&& value) { m_excludedRulesHasBeenSet = true; m_excludedRules = std::move(value); } /** *

Rules in the referenced rule group whose actions are set to * Count.

Instead of this option, use * RuleActionOverrides. It accepts any valid action setting, including * Count.

*/ inline RuleGroupReferenceStatement& WithExcludedRules(const Aws::Vector& value) { SetExcludedRules(value); return *this;} /** *

Rules in the referenced rule group whose actions are set to * Count.

Instead of this option, use * RuleActionOverrides. It accepts any valid action setting, including * Count.

*/ inline RuleGroupReferenceStatement& WithExcludedRules(Aws::Vector&& value) { SetExcludedRules(std::move(value)); return *this;} /** *

Rules in the referenced rule group whose actions are set to * Count.

Instead of this option, use * RuleActionOverrides. It accepts any valid action setting, including * Count.

*/ inline RuleGroupReferenceStatement& AddExcludedRules(const ExcludedRule& value) { m_excludedRulesHasBeenSet = true; m_excludedRules.push_back(value); return *this; } /** *

Rules in the referenced rule group whose actions are set to * Count.

Instead of this option, use * RuleActionOverrides. It accepts any valid action setting, including * Count.

*/ inline RuleGroupReferenceStatement& AddExcludedRules(ExcludedRule&& value) { m_excludedRulesHasBeenSet = true; m_excludedRules.push_back(std::move(value)); return *this; } /** *

Action settings to use in the place of the rule actions that are configured * inside the rule group. You specify one override for each rule whose action you * want to change.

You can use overrides for testing, for example you can * override all of rule actions to Count and then monitor the * resulting count metrics to understand how the rule group would handle your web * traffic. You can also permanently override some or all actions, to modify how * the rule group manages your web traffic.

*/ inline const Aws::Vector& GetRuleActionOverrides() const{ return m_ruleActionOverrides; } /** *

Action settings to use in the place of the rule actions that are configured * inside the rule group. You specify one override for each rule whose action you * want to change.

You can use overrides for testing, for example you can * override all of rule actions to Count and then monitor the * resulting count metrics to understand how the rule group would handle your web * traffic. You can also permanently override some or all actions, to modify how * the rule group manages your web traffic.

*/ inline bool RuleActionOverridesHasBeenSet() const { return m_ruleActionOverridesHasBeenSet; } /** *

Action settings to use in the place of the rule actions that are configured * inside the rule group. You specify one override for each rule whose action you * want to change.

You can use overrides for testing, for example you can * override all of rule actions to Count and then monitor the * resulting count metrics to understand how the rule group would handle your web * traffic. You can also permanently override some or all actions, to modify how * the rule group manages your web traffic.

*/ inline void SetRuleActionOverrides(const Aws::Vector& value) { m_ruleActionOverridesHasBeenSet = true; m_ruleActionOverrides = value; } /** *

Action settings to use in the place of the rule actions that are configured * inside the rule group. You specify one override for each rule whose action you * want to change.

You can use overrides for testing, for example you can * override all of rule actions to Count and then monitor the * resulting count metrics to understand how the rule group would handle your web * traffic. You can also permanently override some or all actions, to modify how * the rule group manages your web traffic.

*/ inline void SetRuleActionOverrides(Aws::Vector&& value) { m_ruleActionOverridesHasBeenSet = true; m_ruleActionOverrides = std::move(value); } /** *

Action settings to use in the place of the rule actions that are configured * inside the rule group. You specify one override for each rule whose action you * want to change.

You can use overrides for testing, for example you can * override all of rule actions to Count and then monitor the * resulting count metrics to understand how the rule group would handle your web * traffic. You can also permanently override some or all actions, to modify how * the rule group manages your web traffic.

*/ inline RuleGroupReferenceStatement& WithRuleActionOverrides(const Aws::Vector& value) { SetRuleActionOverrides(value); return *this;} /** *

Action settings to use in the place of the rule actions that are configured * inside the rule group. You specify one override for each rule whose action you * want to change.

You can use overrides for testing, for example you can * override all of rule actions to Count and then monitor the * resulting count metrics to understand how the rule group would handle your web * traffic. You can also permanently override some or all actions, to modify how * the rule group manages your web traffic.

*/ inline RuleGroupReferenceStatement& WithRuleActionOverrides(Aws::Vector&& value) { SetRuleActionOverrides(std::move(value)); return *this;} /** *

Action settings to use in the place of the rule actions that are configured * inside the rule group. You specify one override for each rule whose action you * want to change.

You can use overrides for testing, for example you can * override all of rule actions to Count and then monitor the * resulting count metrics to understand how the rule group would handle your web * traffic. You can also permanently override some or all actions, to modify how * the rule group manages your web traffic.

*/ inline RuleGroupReferenceStatement& AddRuleActionOverrides(const RuleActionOverride& value) { m_ruleActionOverridesHasBeenSet = true; m_ruleActionOverrides.push_back(value); return *this; } /** *

Action settings to use in the place of the rule actions that are configured * inside the rule group. You specify one override for each rule whose action you * want to change.

You can use overrides for testing, for example you can * override all of rule actions to Count and then monitor the * resulting count metrics to understand how the rule group would handle your web * traffic. You can also permanently override some or all actions, to modify how * the rule group manages your web traffic.

*/ inline RuleGroupReferenceStatement& AddRuleActionOverrides(RuleActionOverride&& value) { m_ruleActionOverridesHasBeenSet = true; m_ruleActionOverrides.push_back(std::move(value)); return *this; } private: Aws::String m_aRN; bool m_aRNHasBeenSet = false; Aws::Vector m_excludedRules; bool m_excludedRulesHasBeenSet = false; Aws::Vector m_ruleActionOverrides; bool m_ruleActionOverridesHasBeenSet = false; }; } // namespace Model } // namespace WAFV2 } // namespace Aws