/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the securityhub-2018-10-26.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.SecurityHub.Model
{
///
/// Details for a rule in an WAF web ACL.
///
public partial class AwsWafWebAclRule
{
private WafAction _action;
private List _excludedRules = new List();
private WafOverrideAction _overrideAction;
private int? _priority;
private string _ruleId;
private string _type;
///
/// Gets and sets the property Action.
///
/// Specifies the action that CloudFront or WAF takes when a web request matches the conditions
/// in the rule.
///
///
public WafAction Action
{
get { return this._action; }
set { this._action = value; }
}
// Check to see if Action property is set
internal bool IsSetAction()
{
return this._action != null;
}
///
/// Gets and sets the property ExcludedRules.
///
/// Rules to exclude from a rule group.
///
///
public List ExcludedRules
{
get { return this._excludedRules; }
set { this._excludedRules = value; }
}
// Check to see if ExcludedRules property is set
internal bool IsSetExcludedRules()
{
return this._excludedRules != null && this._excludedRules.Count > 0;
}
///
/// Gets and sets the property OverrideAction.
///
/// Use the OverrideAction
to test your RuleGroup
.
///
///
///
/// Any rule in a RuleGroup
can potentially block a request. If you set the
/// OverrideAction
to None
, the RuleGroup
blocks
/// a request if any individual rule in the RuleGroup
matches the request
/// and is configured to block that request.
///
///
///
/// However, if you first want to test the RuleGroup
, set the OverrideAction
/// to Count
. The RuleGroup
then overrides any block action
/// specified by individual rules contained within the group. Instead of blocking matching
/// requests, those requests are counted.
///
///
///
/// ActivatedRule
|OverrideAction
applies only when updating
/// or adding a RuleGroup
to a web ACL. In this case you do not use ActivatedRule
/// Action
. For all other update requests, ActivatedRule
Action
/// is used instead of ActivatedRule
OverrideAction
.
///
///
public WafOverrideAction OverrideAction
{
get { return this._overrideAction; }
set { this._overrideAction = value; }
}
// Check to see if OverrideAction property is set
internal bool IsSetOverrideAction()
{
return this._overrideAction != null;
}
///
/// Gets and sets the property Priority.
///
/// Specifies the order in which the rules in a web ACL are evaluated. Rules with a lower
/// value for Priority
are evaluated before rules with a higher value. The
/// value must be a unique integer. If you add multiple rules to a web ACL, the values
/// do not need to be consecutive.
///
///
public int Priority
{
get { return this._priority.GetValueOrDefault(); }
set { this._priority = value; }
}
// Check to see if Priority property is set
internal bool IsSetPriority()
{
return this._priority.HasValue;
}
///
/// Gets and sets the property RuleId.
///
/// The identifier for a rule.
///
///
public string RuleId
{
get { return this._ruleId; }
set { this._ruleId = value; }
}
// Check to see if RuleId property is set
internal bool IsSetRuleId()
{
return this._ruleId != null;
}
///
/// Gets and sets the property Type.
///
/// The rule type.
///
///
///
/// Valid values: REGULAR
| RATE_BASED
| GROUP
///
///
///
///
/// The default is REGULAR
.
///
///
public string Type
{
get { return this._type; }
set { this._type = value; }
}
// Check to see if Type property is set
internal bool IsSetType()
{
return this._type != null;
}
}
}