AWS SDK for C++  1.9.132
AWS SDK for C++
Public Member Functions | List of all members
Aws::WAFV2::Model::Rule Class Reference

#include <Rule.h>

Public Member Functions

 Rule ()
 
 Rule (Aws::Utils::Json::JsonView jsonValue)
 
Ruleoperator= (Aws::Utils::Json::JsonView jsonValue)
 
Aws::Utils::Json::JsonValue Jsonize () const
 
const Aws::StringGetName () const
 
bool NameHasBeenSet () const
 
void SetName (const Aws::String &value)
 
void SetName (Aws::String &&value)
 
void SetName (const char *value)
 
RuleWithName (const Aws::String &value)
 
RuleWithName (Aws::String &&value)
 
RuleWithName (const char *value)
 
int GetPriority () const
 
bool PriorityHasBeenSet () const
 
void SetPriority (int value)
 
RuleWithPriority (int value)
 
const StatementGetStatement () const
 
bool StatementHasBeenSet () const
 
void SetStatement (const Statement &value)
 
void SetStatement (Statement &&value)
 
RuleWithStatement (const Statement &value)
 
RuleWithStatement (Statement &&value)
 
const RuleActionGetAction () const
 
bool ActionHasBeenSet () const
 
void SetAction (const RuleAction &value)
 
void SetAction (RuleAction &&value)
 
RuleWithAction (const RuleAction &value)
 
RuleWithAction (RuleAction &&value)
 
const OverrideActionGetOverrideAction () const
 
bool OverrideActionHasBeenSet () const
 
void SetOverrideAction (const OverrideAction &value)
 
void SetOverrideAction (OverrideAction &&value)
 
RuleWithOverrideAction (const OverrideAction &value)
 
RuleWithOverrideAction (OverrideAction &&value)
 
const Aws::Vector< Label > & GetRuleLabels () const
 
bool RuleLabelsHasBeenSet () const
 
void SetRuleLabels (const Aws::Vector< Label > &value)
 
void SetRuleLabels (Aws::Vector< Label > &&value)
 
RuleWithRuleLabels (const Aws::Vector< Label > &value)
 
RuleWithRuleLabels (Aws::Vector< Label > &&value)
 
RuleAddRuleLabels (const Label &value)
 
RuleAddRuleLabels (Label &&value)
 
const VisibilityConfigGetVisibilityConfig () const
 
bool VisibilityConfigHasBeenSet () const
 
void SetVisibilityConfig (const VisibilityConfig &value)
 
void SetVisibilityConfig (VisibilityConfig &&value)
 
RuleWithVisibilityConfig (const VisibilityConfig &value)
 
RuleWithVisibilityConfig (VisibilityConfig &&value)
 

Detailed Description

A single rule, which you can use in a WebACL or RuleGroup to identify 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

Definition at line 41 of file Rule.h.

Constructor & Destructor Documentation

◆ Rule() [1/2]

Aws::WAFV2::Model::Rule::Rule ( )

◆ Rule() [2/2]

Aws::WAFV2::Model::Rule::Rule ( Aws::Utils::Json::JsonView  jsonValue)

Member Function Documentation

◆ ActionHasBeenSet()

bool Aws::WAFV2::Model::Rule::ActionHasBeenSet ( ) const
inline

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.

This is used only for rules whose statements do not reference a rule group. Rule statements that reference a rule group include RuleGroupReferenceStatement and ManagedRuleGroupStatement.

You must specify either this Action setting or the rule OverrideAction setting, but not both:

  • If the rule statement does not reference a rule group, use this rule action setting and not the rule override action setting.

  • If the rule statement references a rule group, use the override action setting and not this action setting.

Definition at line 197 of file Rule.h.

◆ AddRuleLabels() [1/2]

Rule& Aws::WAFV2::Model::Rule::AddRuleLabels ( const Label value)
inline

Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement.

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

  • Separate each component of the label with a colon.

  • Each namespace or name can have up to 128 characters.

  • You can specify up to 5 namespaces in a label.

  • Don't use the following reserved words in your label specification: aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.

Definition at line 488 of file Rule.h.

◆ AddRuleLabels() [2/2]

Rule& Aws::WAFV2::Model::Rule::AddRuleLabels ( Label &&  value)
inline

Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement.

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

  • Separate each component of the label with a colon.

  • Each namespace or name can have up to 128 characters.

  • You can specify up to 5 namespaces in a label.

  • Don't use the following reserved words in your label specification: aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.

Definition at line 507 of file Rule.h.

◆ GetAction()

const RuleAction& Aws::WAFV2::Model::Rule::GetAction ( ) const
inline

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.

This is used only for rules whose statements do not reference a rule group. Rule statements that reference a rule group include RuleGroupReferenceStatement and ManagedRuleGroupStatement.

You must specify either this Action setting or the rule OverrideAction setting, but not both:

  • If the rule statement does not reference a rule group, use this rule action setting and not the rule override action setting.

  • If the rule statement references a rule group, use the override action setting and not this action setting.

Definition at line 182 of file Rule.h.

◆ GetName()

const Aws::String& Aws::WAFV2::Model::Rule::GetName ( ) const
inline

The name of the rule. You can't change the name of a Rule after you create it.

Definition at line 54 of file Rule.h.

◆ GetOverrideAction()

const OverrideAction& Aws::WAFV2::Model::Rule::GetOverrideAction ( ) const
inline

The override action to apply to the rules in a rule group. Used only for rule statements that reference a rule group, like RuleGroupReferenceStatement and ManagedRuleGroupStatement.

Set the override action to none to leave the rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.

In a Rule, you must specify either this OverrideAction setting or the rule Action setting, but not both:

  • If the rule statement references a rule group, use this override action setting and not the action setting.

  • If the rule statement does not reference a rule group, use the rule action setting and not this rule override action setting.

Definition at line 274 of file Rule.h.

◆ GetPriority()

int Aws::WAFV2::Model::Rule::GetPriority ( ) const
inline

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.

Definition at line 105 of file Rule.h.

◆ GetRuleLabels()

const Aws::Vector<Label>& Aws::WAFV2::Model::Rule::GetRuleLabels ( ) const
inline

Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement.

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

  • Separate each component of the label with a colon.

  • Each namespace or name can have up to 128 characters.

  • You can specify up to 5 namespaces in a label.

  • Don't use the following reserved words in your label specification: aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.

Definition at line 374 of file Rule.h.

◆ GetStatement()

const Statement& Aws::WAFV2::Model::Rule::GetStatement ( ) const
inline

The WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement.

Definition at line 136 of file Rule.h.

◆ GetVisibilityConfig()

const VisibilityConfig& Aws::WAFV2::Model::Rule::GetVisibilityConfig ( ) const
inline

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Definition at line 514 of file Rule.h.

◆ Jsonize()

Aws::Utils::Json::JsonValue Aws::WAFV2::Model::Rule::Jsonize ( ) const

◆ NameHasBeenSet()

bool Aws::WAFV2::Model::Rule::NameHasBeenSet ( ) const
inline

The name of the rule. You can't change the name of a Rule after you create it.

Definition at line 60 of file Rule.h.

◆ operator=()

Rule& Aws::WAFV2::Model::Rule::operator= ( Aws::Utils::Json::JsonView  jsonValue)

◆ OverrideActionHasBeenSet()

bool Aws::WAFV2::Model::Rule::OverrideActionHasBeenSet ( ) const
inline

The override action to apply to the rules in a rule group. Used only for rule statements that reference a rule group, like RuleGroupReferenceStatement and ManagedRuleGroupStatement.

Set the override action to none to leave the rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.

In a Rule, you must specify either this OverrideAction setting or the rule Action setting, but not both:

  • If the rule statement references a rule group, use this override action setting and not the action setting.

  • If the rule statement does not reference a rule group, use the rule action setting and not this rule override action setting.

Definition at line 290 of file Rule.h.

◆ PriorityHasBeenSet()

bool Aws::WAFV2::Model::Rule::PriorityHasBeenSet ( ) const
inline

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.

Definition at line 113 of file Rule.h.

◆ RuleLabelsHasBeenSet()

bool Aws::WAFV2::Model::Rule::RuleLabelsHasBeenSet ( ) const
inline

Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement.

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

  • Separate each component of the label with a colon.

  • Each namespace or name can have up to 128 characters.

  • You can specify up to 5 namespaces in a label.

  • Don't use the following reserved words in your label specification: aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.

Definition at line 393 of file Rule.h.

◆ SetAction() [1/2]

void Aws::WAFV2::Model::Rule::SetAction ( const RuleAction value)
inline

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.

This is used only for rules whose statements do not reference a rule group. Rule statements that reference a rule group include RuleGroupReferenceStatement and ManagedRuleGroupStatement.

You must specify either this Action setting or the rule OverrideAction setting, but not both:

  • If the rule statement does not reference a rule group, use this rule action setting and not the rule override action setting.

  • If the rule statement references a rule group, use the override action setting and not this action setting.

Definition at line 212 of file Rule.h.

◆ SetAction() [2/2]

void Aws::WAFV2::Model::Rule::SetAction ( RuleAction &&  value)
inline

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.

This is used only for rules whose statements do not reference a rule group. Rule statements that reference a rule group include RuleGroupReferenceStatement and ManagedRuleGroupStatement.

You must specify either this Action setting or the rule OverrideAction setting, but not both:

  • If the rule statement does not reference a rule group, use this rule action setting and not the rule override action setting.

  • If the rule statement references a rule group, use the override action setting and not this action setting.

Definition at line 227 of file Rule.h.

◆ SetName() [1/3]

void Aws::WAFV2::Model::Rule::SetName ( Aws::String &&  value)
inline

The name of the rule. You can't change the name of a Rule after you create it.

Definition at line 72 of file Rule.h.

◆ SetName() [2/3]

void Aws::WAFV2::Model::Rule::SetName ( const Aws::String value)
inline

The name of the rule. You can't change the name of a Rule after you create it.

Definition at line 66 of file Rule.h.

◆ SetName() [3/3]

void Aws::WAFV2::Model::Rule::SetName ( const char *  value)
inline

The name of the rule. You can't change the name of a Rule after you create it.

Definition at line 78 of file Rule.h.

◆ SetOverrideAction() [1/2]

void Aws::WAFV2::Model::Rule::SetOverrideAction ( const OverrideAction value)
inline

The override action to apply to the rules in a rule group. Used only for rule statements that reference a rule group, like RuleGroupReferenceStatement and ManagedRuleGroupStatement.

Set the override action to none to leave the rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.

In a Rule, you must specify either this OverrideAction setting or the rule Action setting, but not both:

  • If the rule statement references a rule group, use this override action setting and not the action setting.

  • If the rule statement does not reference a rule group, use the rule action setting and not this rule override action setting.

Definition at line 306 of file Rule.h.

◆ SetOverrideAction() [2/2]

void Aws::WAFV2::Model::Rule::SetOverrideAction ( OverrideAction &&  value)
inline

The override action to apply to the rules in a rule group. Used only for rule statements that reference a rule group, like RuleGroupReferenceStatement and ManagedRuleGroupStatement.

Set the override action to none to leave the rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.

In a Rule, you must specify either this OverrideAction setting or the rule Action setting, but not both:

  • If the rule statement references a rule group, use this override action setting and not the action setting.

  • If the rule statement does not reference a rule group, use the rule action setting and not this rule override action setting.

Definition at line 322 of file Rule.h.

◆ SetPriority()

void Aws::WAFV2::Model::Rule::SetPriority ( int  value)
inline

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.

Definition at line 121 of file Rule.h.

◆ SetRuleLabels() [1/2]

void Aws::WAFV2::Model::Rule::SetRuleLabels ( Aws::Vector< Label > &&  value)
inline

Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement.

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

  • Separate each component of the label with a colon.

  • Each namespace or name can have up to 128 characters.

  • You can specify up to 5 namespaces in a label.

  • Don't use the following reserved words in your label specification: aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.

Definition at line 431 of file Rule.h.

◆ SetRuleLabels() [2/2]

void Aws::WAFV2::Model::Rule::SetRuleLabels ( const Aws::Vector< Label > &  value)
inline

Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement.

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

  • Separate each component of the label with a colon.

  • Each namespace or name can have up to 128 characters.

  • You can specify up to 5 namespaces in a label.

  • Don't use the following reserved words in your label specification: aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.

Definition at line 412 of file Rule.h.

◆ SetStatement() [1/2]

void Aws::WAFV2::Model::Rule::SetStatement ( const Statement value)
inline

The WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement.

Definition at line 148 of file Rule.h.

◆ SetStatement() [2/2]

void Aws::WAFV2::Model::Rule::SetStatement ( Statement &&  value)
inline

The WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement.

Definition at line 154 of file Rule.h.

◆ SetVisibilityConfig() [1/2]

void Aws::WAFV2::Model::Rule::SetVisibilityConfig ( const VisibilityConfig value)
inline

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Definition at line 526 of file Rule.h.

◆ SetVisibilityConfig() [2/2]

void Aws::WAFV2::Model::Rule::SetVisibilityConfig ( VisibilityConfig &&  value)
inline

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Definition at line 532 of file Rule.h.

◆ StatementHasBeenSet()

bool Aws::WAFV2::Model::Rule::StatementHasBeenSet ( ) const
inline

The WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement.

Definition at line 142 of file Rule.h.

◆ VisibilityConfigHasBeenSet()

bool Aws::WAFV2::Model::Rule::VisibilityConfigHasBeenSet ( ) const
inline

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Definition at line 520 of file Rule.h.

◆ WithAction() [1/2]

Rule& Aws::WAFV2::Model::Rule::WithAction ( const RuleAction value)
inline

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.

This is used only for rules whose statements do not reference a rule group. Rule statements that reference a rule group include RuleGroupReferenceStatement and ManagedRuleGroupStatement.

You must specify either this Action setting or the rule OverrideAction setting, but not both:

  • If the rule statement does not reference a rule group, use this rule action setting and not the rule override action setting.

  • If the rule statement references a rule group, use the override action setting and not this action setting.

Definition at line 242 of file Rule.h.

◆ WithAction() [2/2]

Rule& Aws::WAFV2::Model::Rule::WithAction ( RuleAction &&  value)
inline

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.

This is used only for rules whose statements do not reference a rule group. Rule statements that reference a rule group include RuleGroupReferenceStatement and ManagedRuleGroupStatement.

You must specify either this Action setting or the rule OverrideAction setting, but not both:

  • If the rule statement does not reference a rule group, use this rule action setting and not the rule override action setting.

  • If the rule statement references a rule group, use the override action setting and not this action setting.

Definition at line 257 of file Rule.h.

◆ WithName() [1/3]

Rule& Aws::WAFV2::Model::Rule::WithName ( Aws::String &&  value)
inline

The name of the rule. You can't change the name of a Rule after you create it.

Definition at line 90 of file Rule.h.

◆ WithName() [2/3]

Rule& Aws::WAFV2::Model::Rule::WithName ( const Aws::String value)
inline

The name of the rule. You can't change the name of a Rule after you create it.

Definition at line 84 of file Rule.h.

◆ WithName() [3/3]

Rule& Aws::WAFV2::Model::Rule::WithName ( const char *  value)
inline

The name of the rule. You can't change the name of a Rule after you create it.

Definition at line 96 of file Rule.h.

◆ WithOverrideAction() [1/2]

Rule& Aws::WAFV2::Model::Rule::WithOverrideAction ( const OverrideAction value)
inline

The override action to apply to the rules in a rule group. Used only for rule statements that reference a rule group, like RuleGroupReferenceStatement and ManagedRuleGroupStatement.

Set the override action to none to leave the rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.

In a Rule, you must specify either this OverrideAction setting or the rule Action setting, but not both:

  • If the rule statement references a rule group, use this override action setting and not the action setting.

  • If the rule statement does not reference a rule group, use the rule action setting and not this rule override action setting.

Definition at line 338 of file Rule.h.

◆ WithOverrideAction() [2/2]

Rule& Aws::WAFV2::Model::Rule::WithOverrideAction ( OverrideAction &&  value)
inline

The override action to apply to the rules in a rule group. Used only for rule statements that reference a rule group, like RuleGroupReferenceStatement and ManagedRuleGroupStatement.

Set the override action to none to leave the rule actions in effect. Set it to count to only count matches, regardless of the rule action settings.

In a Rule, you must specify either this OverrideAction setting or the rule Action setting, but not both:

  • If the rule statement references a rule group, use this override action setting and not the action setting.

  • If the rule statement does not reference a rule group, use the rule action setting and not this rule override action setting.

Definition at line 354 of file Rule.h.

◆ WithPriority()

Rule& Aws::WAFV2::Model::Rule::WithPriority ( int  value)
inline

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.

Definition at line 129 of file Rule.h.

◆ WithRuleLabels() [1/2]

Rule& Aws::WAFV2::Model::Rule::WithRuleLabels ( Aws::Vector< Label > &&  value)
inline

Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement.

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

  • Separate each component of the label with a colon.

  • Each namespace or name can have up to 128 characters.

  • You can specify up to 5 namespaces in a label.

  • Don't use the following reserved words in your label specification: aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.

Definition at line 469 of file Rule.h.

◆ WithRuleLabels() [2/2]

Rule& Aws::WAFV2::Model::Rule::WithRuleLabels ( const Aws::Vector< Label > &  value)
inline

Labels to apply to web requests that match the rule match statement. WAF applies fully qualified labels to matching web requests. A fully qualified label is the concatenation of a label namespace and a rule label. The rule's rule group or web ACL defines the label namespace.

Rules that run after this rule in the web ACL can match against these labels using a LabelMatchStatement.

For each label, provide a case-sensitive string containing optional namespaces and a label name, according to the following guidelines:

  • Separate each component of the label with a colon.

  • Each namespace or name can have up to 128 characters.

  • You can specify up to 5 namespaces in a label.

  • Don't use the following reserved words in your label specification: aws, waf, managed, rulegroup, webacl, regexpatternset, or ipset.

For example, myLabelName or nameSpace1:nameSpace2:myLabelName.

Definition at line 450 of file Rule.h.

◆ WithStatement() [1/2]

Rule& Aws::WAFV2::Model::Rule::WithStatement ( const Statement value)
inline

The WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement.

Definition at line 160 of file Rule.h.

◆ WithStatement() [2/2]

Rule& Aws::WAFV2::Model::Rule::WithStatement ( Statement &&  value)
inline

The WAF processing statement for the rule, for example ByteMatchStatement or SizeConstraintStatement.

Definition at line 166 of file Rule.h.

◆ WithVisibilityConfig() [1/2]

Rule& Aws::WAFV2::Model::Rule::WithVisibilityConfig ( const VisibilityConfig value)
inline

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Definition at line 538 of file Rule.h.

◆ WithVisibilityConfig() [2/2]

Rule& Aws::WAFV2::Model::Rule::WithVisibilityConfig ( VisibilityConfig &&  value)
inline

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Definition at line 544 of file Rule.h.


The documentation for this class was generated from the following file: