437 lines
18 KiB
C++
437 lines
18 KiB
C++
/**
|
|
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
* SPDX-License-Identifier: Apache-2.0.
|
|
*/
|
|
|
|
#pragma once
|
|
#include <aws/wafv2/WAFV2_EXPORTS.h>
|
|
#include <aws/core/utils/memory/stl/AWSString.h>
|
|
#include <aws/core/utils/memory/stl/AWSVector.h>
|
|
#include <aws/wafv2/model/VisibilityConfig.h>
|
|
#include <aws/wafv2/model/Rule.h>
|
|
#include <utility>
|
|
|
|
namespace Aws
|
|
{
|
|
namespace Utils
|
|
{
|
|
namespace Json
|
|
{
|
|
class JsonValue;
|
|
class JsonView;
|
|
} // namespace Json
|
|
} // namespace Utils
|
|
namespace WAFV2
|
|
{
|
|
namespace Model
|
|
{
|
|
|
|
/**
|
|
* <p>This is the latest version of <b>AWS WAF</b>, named AWS WAFV2,
|
|
* released in November, 2019. For information, including how to migrate your AWS
|
|
* WAF resources from the prior release, see the <a
|
|
* href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS
|
|
* WAF Developer Guide</a>. </p> <p> A rule group defines a collection of
|
|
* rules to inspect and control web requests that you can use in a <a>WebACL</a>.
|
|
* When you create a rule group, you define an immutable capacity limit. If you
|
|
* update a rule group, you must stay within the capacity. This allows others to
|
|
* reuse the rule group with confidence in its capacity requirements.
|
|
* </p><p><h3>See Also:</h3> <a
|
|
* href="http://docs.aws.amazon.com/goto/WebAPI/wafv2-2019-07-29/RuleGroup">AWS API
|
|
* Reference</a></p>
|
|
*/
|
|
class AWS_WAFV2_API RuleGroup
|
|
{
|
|
public:
|
|
RuleGroup();
|
|
RuleGroup(Aws::Utils::Json::JsonView jsonValue);
|
|
RuleGroup& operator=(Aws::Utils::Json::JsonView jsonValue);
|
|
Aws::Utils::Json::JsonValue Jsonize() const;
|
|
|
|
|
|
/**
|
|
* <p>The name of the rule group. You cannot change the name of a rule group after
|
|
* you create it.</p>
|
|
*/
|
|
inline const Aws::String& GetName() const{ return m_name; }
|
|
|
|
/**
|
|
* <p>The name of the rule group. You cannot change the name of a rule group after
|
|
* you create it.</p>
|
|
*/
|
|
inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
|
|
|
|
/**
|
|
* <p>The name of the rule group. You cannot change the name of a rule group after
|
|
* you create it.</p>
|
|
*/
|
|
inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; }
|
|
|
|
/**
|
|
* <p>The name of the rule group. You cannot change the name of a rule group after
|
|
* you create it.</p>
|
|
*/
|
|
inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); }
|
|
|
|
/**
|
|
* <p>The name of the rule group. You cannot change the name of a rule group after
|
|
* you create it.</p>
|
|
*/
|
|
inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); }
|
|
|
|
/**
|
|
* <p>The name of the rule group. You cannot change the name of a rule group after
|
|
* you create it.</p>
|
|
*/
|
|
inline RuleGroup& WithName(const Aws::String& value) { SetName(value); return *this;}
|
|
|
|
/**
|
|
* <p>The name of the rule group. You cannot change the name of a rule group after
|
|
* you create it.</p>
|
|
*/
|
|
inline RuleGroup& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;}
|
|
|
|
/**
|
|
* <p>The name of the rule group. You cannot change the name of a rule group after
|
|
* you create it.</p>
|
|
*/
|
|
inline RuleGroup& WithName(const char* value) { SetName(value); return *this;}
|
|
|
|
|
|
/**
|
|
* <p>A unique identifier for the rule group. This ID is returned in the responses
|
|
* to create and list commands. You provide it to operations like update and
|
|
* delete.</p>
|
|
*/
|
|
inline const Aws::String& GetId() const{ return m_id; }
|
|
|
|
/**
|
|
* <p>A unique identifier for the rule group. This ID is returned in the responses
|
|
* to create and list commands. You provide it to operations like update and
|
|
* delete.</p>
|
|
*/
|
|
inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
|
|
|
|
/**
|
|
* <p>A unique identifier for the rule group. This ID is returned in the responses
|
|
* to create and list commands. You provide it to operations like update and
|
|
* delete.</p>
|
|
*/
|
|
inline void SetId(const Aws::String& value) { m_idHasBeenSet = true; m_id = value; }
|
|
|
|
/**
|
|
* <p>A unique identifier for the rule group. This ID is returned in the responses
|
|
* to create and list commands. You provide it to operations like update and
|
|
* delete.</p>
|
|
*/
|
|
inline void SetId(Aws::String&& value) { m_idHasBeenSet = true; m_id = std::move(value); }
|
|
|
|
/**
|
|
* <p>A unique identifier for the rule group. This ID is returned in the responses
|
|
* to create and list commands. You provide it to operations like update and
|
|
* delete.</p>
|
|
*/
|
|
inline void SetId(const char* value) { m_idHasBeenSet = true; m_id.assign(value); }
|
|
|
|
/**
|
|
* <p>A unique identifier for the rule group. This ID is returned in the responses
|
|
* to create and list commands. You provide it to operations like update and
|
|
* delete.</p>
|
|
*/
|
|
inline RuleGroup& WithId(const Aws::String& value) { SetId(value); return *this;}
|
|
|
|
/**
|
|
* <p>A unique identifier for the rule group. This ID is returned in the responses
|
|
* to create and list commands. You provide it to operations like update and
|
|
* delete.</p>
|
|
*/
|
|
inline RuleGroup& WithId(Aws::String&& value) { SetId(std::move(value)); return *this;}
|
|
|
|
/**
|
|
* <p>A unique identifier for the rule group. This ID is returned in the responses
|
|
* to create and list commands. You provide it to operations like update and
|
|
* delete.</p>
|
|
*/
|
|
inline RuleGroup& WithId(const char* value) { SetId(value); return *this;}
|
|
|
|
|
|
/**
|
|
* <p>The web ACL capacity units (WCUs) required for this rule group.</p> <p>When
|
|
* you create your own rule group, you define this, and you cannot change it after
|
|
* creation. When you add or modify the rules in a rule group, AWS WAF enforces
|
|
* this limit. You can check the capacity for a set of rules using
|
|
* <a>CheckCapacity</a>.</p> <p>AWS WAF uses WCUs to calculate and control the
|
|
* operating resources that are used to run your rules, rule groups, and web ACLs.
|
|
* AWS WAF calculates capacity differently for each rule type, to reflect the
|
|
* relative cost of each rule. Simple rules that cost little to run use fewer WCUs
|
|
* than more complex rules that use more processing power. Rule group capacity is
|
|
* fixed at creation, which helps users plan their web ACL WCU usage when they use
|
|
* a rule group. The WCU limit for web ACLs is 1,500. </p>
|
|
*/
|
|
inline long long GetCapacity() const{ return m_capacity; }
|
|
|
|
/**
|
|
* <p>The web ACL capacity units (WCUs) required for this rule group.</p> <p>When
|
|
* you create your own rule group, you define this, and you cannot change it after
|
|
* creation. When you add or modify the rules in a rule group, AWS WAF enforces
|
|
* this limit. You can check the capacity for a set of rules using
|
|
* <a>CheckCapacity</a>.</p> <p>AWS WAF uses WCUs to calculate and control the
|
|
* operating resources that are used to run your rules, rule groups, and web ACLs.
|
|
* AWS WAF calculates capacity differently for each rule type, to reflect the
|
|
* relative cost of each rule. Simple rules that cost little to run use fewer WCUs
|
|
* than more complex rules that use more processing power. Rule group capacity is
|
|
* fixed at creation, which helps users plan their web ACL WCU usage when they use
|
|
* a rule group. The WCU limit for web ACLs is 1,500. </p>
|
|
*/
|
|
inline bool CapacityHasBeenSet() const { return m_capacityHasBeenSet; }
|
|
|
|
/**
|
|
* <p>The web ACL capacity units (WCUs) required for this rule group.</p> <p>When
|
|
* you create your own rule group, you define this, and you cannot change it after
|
|
* creation. When you add or modify the rules in a rule group, AWS WAF enforces
|
|
* this limit. You can check the capacity for a set of rules using
|
|
* <a>CheckCapacity</a>.</p> <p>AWS WAF uses WCUs to calculate and control the
|
|
* operating resources that are used to run your rules, rule groups, and web ACLs.
|
|
* AWS WAF calculates capacity differently for each rule type, to reflect the
|
|
* relative cost of each rule. Simple rules that cost little to run use fewer WCUs
|
|
* than more complex rules that use more processing power. Rule group capacity is
|
|
* fixed at creation, which helps users plan their web ACL WCU usage when they use
|
|
* a rule group. The WCU limit for web ACLs is 1,500. </p>
|
|
*/
|
|
inline void SetCapacity(long long value) { m_capacityHasBeenSet = true; m_capacity = value; }
|
|
|
|
/**
|
|
* <p>The web ACL capacity units (WCUs) required for this rule group.</p> <p>When
|
|
* you create your own rule group, you define this, and you cannot change it after
|
|
* creation. When you add or modify the rules in a rule group, AWS WAF enforces
|
|
* this limit. You can check the capacity for a set of rules using
|
|
* <a>CheckCapacity</a>.</p> <p>AWS WAF uses WCUs to calculate and control the
|
|
* operating resources that are used to run your rules, rule groups, and web ACLs.
|
|
* AWS WAF calculates capacity differently for each rule type, to reflect the
|
|
* relative cost of each rule. Simple rules that cost little to run use fewer WCUs
|
|
* than more complex rules that use more processing power. Rule group capacity is
|
|
* fixed at creation, which helps users plan their web ACL WCU usage when they use
|
|
* a rule group. The WCU limit for web ACLs is 1,500. </p>
|
|
*/
|
|
inline RuleGroup& WithCapacity(long long value) { SetCapacity(value); return *this;}
|
|
|
|
|
|
/**
|
|
* <p>The Amazon Resource Name (ARN) of the entity.</p>
|
|
*/
|
|
inline const Aws::String& GetARN() const{ return m_aRN; }
|
|
|
|
/**
|
|
* <p>The Amazon Resource Name (ARN) of the entity.</p>
|
|
*/
|
|
inline bool ARNHasBeenSet() const { return m_aRNHasBeenSet; }
|
|
|
|
/**
|
|
* <p>The Amazon Resource Name (ARN) of the entity.</p>
|
|
*/
|
|
inline void SetARN(const Aws::String& value) { m_aRNHasBeenSet = true; m_aRN = value; }
|
|
|
|
/**
|
|
* <p>The Amazon Resource Name (ARN) of the entity.</p>
|
|
*/
|
|
inline void SetARN(Aws::String&& value) { m_aRNHasBeenSet = true; m_aRN = std::move(value); }
|
|
|
|
/**
|
|
* <p>The Amazon Resource Name (ARN) of the entity.</p>
|
|
*/
|
|
inline void SetARN(const char* value) { m_aRNHasBeenSet = true; m_aRN.assign(value); }
|
|
|
|
/**
|
|
* <p>The Amazon Resource Name (ARN) of the entity.</p>
|
|
*/
|
|
inline RuleGroup& WithARN(const Aws::String& value) { SetARN(value); return *this;}
|
|
|
|
/**
|
|
* <p>The Amazon Resource Name (ARN) of the entity.</p>
|
|
*/
|
|
inline RuleGroup& WithARN(Aws::String&& value) { SetARN(std::move(value)); return *this;}
|
|
|
|
/**
|
|
* <p>The Amazon Resource Name (ARN) of the entity.</p>
|
|
*/
|
|
inline RuleGroup& WithARN(const char* value) { SetARN(value); return *this;}
|
|
|
|
|
|
/**
|
|
* <p>A description of the rule group that helps with identification. You cannot
|
|
* change the description of a rule group after you create it.</p>
|
|
*/
|
|
inline const Aws::String& GetDescription() const{ return m_description; }
|
|
|
|
/**
|
|
* <p>A description of the rule group that helps with identification. You cannot
|
|
* change the description of a rule group after you create it.</p>
|
|
*/
|
|
inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
|
|
|
|
/**
|
|
* <p>A description of the rule group that helps with identification. You cannot
|
|
* change the description of a rule group after you create it.</p>
|
|
*/
|
|
inline void SetDescription(const Aws::String& value) { m_descriptionHasBeenSet = true; m_description = value; }
|
|
|
|
/**
|
|
* <p>A description of the rule group that helps with identification. You cannot
|
|
* change the description of a rule group after you create it.</p>
|
|
*/
|
|
inline void SetDescription(Aws::String&& value) { m_descriptionHasBeenSet = true; m_description = std::move(value); }
|
|
|
|
/**
|
|
* <p>A description of the rule group that helps with identification. You cannot
|
|
* change the description of a rule group after you create it.</p>
|
|
*/
|
|
inline void SetDescription(const char* value) { m_descriptionHasBeenSet = true; m_description.assign(value); }
|
|
|
|
/**
|
|
* <p>A description of the rule group that helps with identification. You cannot
|
|
* change the description of a rule group after you create it.</p>
|
|
*/
|
|
inline RuleGroup& WithDescription(const Aws::String& value) { SetDescription(value); return *this;}
|
|
|
|
/**
|
|
* <p>A description of the rule group that helps with identification. You cannot
|
|
* change the description of a rule group after you create it.</p>
|
|
*/
|
|
inline RuleGroup& WithDescription(Aws::String&& value) { SetDescription(std::move(value)); return *this;}
|
|
|
|
/**
|
|
* <p>A description of the rule group that helps with identification. You cannot
|
|
* change the description of a rule group after you create it.</p>
|
|
*/
|
|
inline RuleGroup& WithDescription(const char* value) { SetDescription(value); return *this;}
|
|
|
|
|
|
/**
|
|
* <p>The <a>Rule</a> statements used to identify the web requests that you want to
|
|
* allow, block, or count. Each rule includes one top-level statement that AWS WAF
|
|
* uses to identify matching web requests, and parameters that govern how AWS WAF
|
|
* handles them. </p>
|
|
*/
|
|
inline const Aws::Vector<Rule>& GetRules() const{ return m_rules; }
|
|
|
|
/**
|
|
* <p>The <a>Rule</a> statements used to identify the web requests that you want to
|
|
* allow, block, or count. Each rule includes one top-level statement that AWS WAF
|
|
* uses to identify matching web requests, and parameters that govern how AWS WAF
|
|
* handles them. </p>
|
|
*/
|
|
inline bool RulesHasBeenSet() const { return m_rulesHasBeenSet; }
|
|
|
|
/**
|
|
* <p>The <a>Rule</a> statements used to identify the web requests that you want to
|
|
* allow, block, or count. Each rule includes one top-level statement that AWS WAF
|
|
* uses to identify matching web requests, and parameters that govern how AWS WAF
|
|
* handles them. </p>
|
|
*/
|
|
inline void SetRules(const Aws::Vector<Rule>& value) { m_rulesHasBeenSet = true; m_rules = value; }
|
|
|
|
/**
|
|
* <p>The <a>Rule</a> statements used to identify the web requests that you want to
|
|
* allow, block, or count. Each rule includes one top-level statement that AWS WAF
|
|
* uses to identify matching web requests, and parameters that govern how AWS WAF
|
|
* handles them. </p>
|
|
*/
|
|
inline void SetRules(Aws::Vector<Rule>&& value) { m_rulesHasBeenSet = true; m_rules = std::move(value); }
|
|
|
|
/**
|
|
* <p>The <a>Rule</a> statements used to identify the web requests that you want to
|
|
* allow, block, or count. Each rule includes one top-level statement that AWS WAF
|
|
* uses to identify matching web requests, and parameters that govern how AWS WAF
|
|
* handles them. </p>
|
|
*/
|
|
inline RuleGroup& WithRules(const Aws::Vector<Rule>& value) { SetRules(value); return *this;}
|
|
|
|
/**
|
|
* <p>The <a>Rule</a> statements used to identify the web requests that you want to
|
|
* allow, block, or count. Each rule includes one top-level statement that AWS WAF
|
|
* uses to identify matching web requests, and parameters that govern how AWS WAF
|
|
* handles them. </p>
|
|
*/
|
|
inline RuleGroup& WithRules(Aws::Vector<Rule>&& value) { SetRules(std::move(value)); return *this;}
|
|
|
|
/**
|
|
* <p>The <a>Rule</a> statements used to identify the web requests that you want to
|
|
* allow, block, or count. Each rule includes one top-level statement that AWS WAF
|
|
* uses to identify matching web requests, and parameters that govern how AWS WAF
|
|
* handles them. </p>
|
|
*/
|
|
inline RuleGroup& AddRules(const Rule& value) { m_rulesHasBeenSet = true; m_rules.push_back(value); return *this; }
|
|
|
|
/**
|
|
* <p>The <a>Rule</a> statements used to identify the web requests that you want to
|
|
* allow, block, or count. Each rule includes one top-level statement that AWS WAF
|
|
* uses to identify matching web requests, and parameters that govern how AWS WAF
|
|
* handles them. </p>
|
|
*/
|
|
inline RuleGroup& AddRules(Rule&& value) { m_rulesHasBeenSet = true; m_rules.push_back(std::move(value)); return *this; }
|
|
|
|
|
|
/**
|
|
* <p>Defines and enables Amazon CloudWatch metrics and web request sample
|
|
* collection. </p>
|
|
*/
|
|
inline const VisibilityConfig& GetVisibilityConfig() const{ return m_visibilityConfig; }
|
|
|
|
/**
|
|
* <p>Defines and enables Amazon CloudWatch metrics and web request sample
|
|
* collection. </p>
|
|
*/
|
|
inline bool VisibilityConfigHasBeenSet() const { return m_visibilityConfigHasBeenSet; }
|
|
|
|
/**
|
|
* <p>Defines and enables Amazon CloudWatch metrics and web request sample
|
|
* collection. </p>
|
|
*/
|
|
inline void SetVisibilityConfig(const VisibilityConfig& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = value; }
|
|
|
|
/**
|
|
* <p>Defines and enables Amazon CloudWatch metrics and web request sample
|
|
* collection. </p>
|
|
*/
|
|
inline void SetVisibilityConfig(VisibilityConfig&& value) { m_visibilityConfigHasBeenSet = true; m_visibilityConfig = std::move(value); }
|
|
|
|
/**
|
|
* <p>Defines and enables Amazon CloudWatch metrics and web request sample
|
|
* collection. </p>
|
|
*/
|
|
inline RuleGroup& WithVisibilityConfig(const VisibilityConfig& value) { SetVisibilityConfig(value); return *this;}
|
|
|
|
/**
|
|
* <p>Defines and enables Amazon CloudWatch metrics and web request sample
|
|
* collection. </p>
|
|
*/
|
|
inline RuleGroup& WithVisibilityConfig(VisibilityConfig&& value) { SetVisibilityConfig(std::move(value)); return *this;}
|
|
|
|
private:
|
|
|
|
Aws::String m_name;
|
|
bool m_nameHasBeenSet;
|
|
|
|
Aws::String m_id;
|
|
bool m_idHasBeenSet;
|
|
|
|
long long m_capacity;
|
|
bool m_capacityHasBeenSet;
|
|
|
|
Aws::String m_aRN;
|
|
bool m_aRNHasBeenSet;
|
|
|
|
Aws::String m_description;
|
|
bool m_descriptionHasBeenSet;
|
|
|
|
Aws::Vector<Rule> m_rules;
|
|
bool m_rulesHasBeenSet;
|
|
|
|
VisibilityConfig m_visibilityConfig;
|
|
bool m_visibilityConfigHasBeenSet;
|
|
};
|
|
|
|
} // namespace Model
|
|
} // namespace WAFV2
|
|
} // namespace Aws
|