Class CfnRule
This is AWS WAF Classic documentation.
Inherited Members
Namespace: Amazon.CDK.AWS.WAF
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class CfnRule : CfnResource, IInspectable, IRuleRef, IConstruct, IDependable, IEnvironmentAware
Syntax (vb)
Public Class CfnRule Inherits CfnResource Implements IInspectable, IRuleRef, IConstruct, IDependable, IEnvironmentAware
Remarks
For more information, see AWS WAF Classic in the developer guide.
<em>For the latest version of AWS WAF</em> , use the AWS WAF V2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a> . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
A combination of ByteMatchSet , IPSet , and/or SqlInjectionMatchSet objects that identify the web requests that you want to allow, block, or count. For example, you might create a Rule that includes the following predicates:
To match the settings in this Rule , a request must originate from 192.0.2.44 AND include a User-Agent header for which the value is BadBot .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
CloudformationResource: AWS::WAF::Rule
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAF;
var cfnRule = new CfnRule(this, "MyCfnRule", new CfnRuleProps {
MetricName = "metricName",
Name = "name",
// the properties below are optional
Predicates = new [] { new PredicateProperty {
DataId = "dataId",
Negated = false,
Type = "type"
} }
});
Synopsis
Constructors
| CfnRule(Construct, string, ICfnRuleProps) | Create a new |
Properties
| AttrId | This is AWS WAF Classic documentation. |
| CFN_RESOURCE_TYPE_NAME | The CloudFormation resource type name for this resource class. |
| CfnProperties | This is AWS WAF Classic documentation. |
| MetricName | The name of the metrics for this |
| Name | The friendly name or description for the |
| Predicates | The |
| RuleRef | A reference to a Rule resource. |
Methods
| Inspect(TreeInspector) | Examines the CloudFormation resource and discloses attributes. |
| RenderProperties(IDictionary<string, object>) | This is AWS WAF Classic documentation. |
Constructors
CfnRule(Construct, string, ICfnRuleProps)
Create a new AWS::WAF::Rule.
public CfnRule(Construct scope, string id, ICfnRuleProps props)
Parameters
- scope Construct
Scope in which this resource is defined.
- id string
Construct identifier for this resource (unique in its scope).
- props ICfnRuleProps
Resource properties.
Remarks
For more information, see AWS WAF Classic in the developer guide.
<em>For the latest version of AWS WAF</em> , use the AWS WAF V2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a> . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
A combination of ByteMatchSet , IPSet , and/or SqlInjectionMatchSet objects that identify the web requests that you want to allow, block, or count. For example, you might create a Rule that includes the following predicates:
To match the settings in this Rule , a request must originate from 192.0.2.44 AND include a User-Agent header for which the value is BadBot .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
CloudformationResource: AWS::WAF::Rule
ExampleMetadata: fixture=_generated
Properties
AttrId
This is AWS WAF Classic documentation.
public virtual string AttrId { get; }
Property Value
Remarks
CloudformationAttribute: Id
CFN_RESOURCE_TYPE_NAME
The CloudFormation resource type name for this resource class.
public static string CFN_RESOURCE_TYPE_NAME { get; }
Property Value
Remarks
For more information, see AWS WAF Classic in the developer guide.
<em>For the latest version of AWS WAF</em> , use the AWS WAF V2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a> . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
A combination of ByteMatchSet , IPSet , and/or SqlInjectionMatchSet objects that identify the web requests that you want to allow, block, or count. For example, you might create a Rule that includes the following predicates:
To match the settings in this Rule , a request must originate from 192.0.2.44 AND include a User-Agent header for which the value is BadBot .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
CloudformationResource: AWS::WAF::Rule
ExampleMetadata: fixture=_generated
CfnProperties
This is AWS WAF Classic documentation.
protected override IDictionary<string, object> CfnProperties { get; }
Property Value
Overrides
Remarks
For more information, see AWS WAF Classic in the developer guide.
<em>For the latest version of AWS WAF</em> , use the AWS WAF V2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a> . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
A combination of ByteMatchSet , IPSet , and/or SqlInjectionMatchSet objects that identify the web requests that you want to allow, block, or count. For example, you might create a Rule that includes the following predicates:
To match the settings in this Rule , a request must originate from 192.0.2.44 AND include a User-Agent header for which the value is BadBot .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
CloudformationResource: AWS::WAF::Rule
ExampleMetadata: fixture=_generated
MetricName
The name of the metrics for this Rule .
public virtual string MetricName { get; set; }
Property Value
Remarks
For more information, see AWS WAF Classic in the developer guide.
<em>For the latest version of AWS WAF</em> , use the AWS WAF V2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a> . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
A combination of ByteMatchSet , IPSet , and/or SqlInjectionMatchSet objects that identify the web requests that you want to allow, block, or count. For example, you might create a Rule that includes the following predicates:
To match the settings in this Rule , a request must originate from 192.0.2.44 AND include a User-Agent header for which the value is BadBot .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
CloudformationResource: AWS::WAF::Rule
ExampleMetadata: fixture=_generated
Name
The friendly name or description for the Rule .
public virtual string Name { get; set; }
Property Value
Remarks
For more information, see AWS WAF Classic in the developer guide.
<em>For the latest version of AWS WAF</em> , use the AWS WAF V2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a> . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
A combination of ByteMatchSet , IPSet , and/or SqlInjectionMatchSet objects that identify the web requests that you want to allow, block, or count. For example, you might create a Rule that includes the following predicates:
To match the settings in this Rule , a request must originate from 192.0.2.44 AND include a User-Agent header for which the value is BadBot .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
CloudformationResource: AWS::WAF::Rule
ExampleMetadata: fixture=_generated
Predicates
The Predicates object contains one Predicate element for each ByteMatchSet , IPSet , or SqlInjectionMatchSet object that you want to include in a Rule .
public virtual object? Predicates { get; set; }
Property Value
Remarks
Type union: either IResolvable or (either IResolvable or CfnRule.IPredicateProperty)[]
RuleRef
A reference to a Rule resource.
public virtual IRuleReference RuleRef { get; }
Property Value
Remarks
For more information, see AWS WAF Classic in the developer guide.
<em>For the latest version of AWS WAF</em> , use the AWS WAF V2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a> . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
A combination of ByteMatchSet , IPSet , and/or SqlInjectionMatchSet objects that identify the web requests that you want to allow, block, or count. For example, you might create a Rule that includes the following predicates:
To match the settings in this Rule , a request must originate from 192.0.2.44 AND include a User-Agent header for which the value is BadBot .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
CloudformationResource: AWS::WAF::Rule
ExampleMetadata: fixture=_generated
Methods
Inspect(TreeInspector)
Examines the CloudFormation resource and discloses attributes.
public virtual void Inspect(TreeInspector inspector)
Parameters
- inspector TreeInspector
tree inspector to collect and process attributes.
Remarks
For more information, see AWS WAF Classic in the developer guide.
<em>For the latest version of AWS WAF</em> , use the AWS WAF V2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a> . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
A combination of ByteMatchSet , IPSet , and/or SqlInjectionMatchSet objects that identify the web requests that you want to allow, block, or count. For example, you might create a Rule that includes the following predicates:
To match the settings in this Rule , a request must originate from 192.0.2.44 AND include a User-Agent header for which the value is BadBot .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
CloudformationResource: AWS::WAF::Rule
ExampleMetadata: fixture=_generated
RenderProperties(IDictionary<string, object>)
This is AWS WAF Classic documentation.
protected override IDictionary<string, object> RenderProperties(IDictionary<string, object> props)
Parameters
- props IDictionary<string, object>
Returns
Overrides
Remarks
For more information, see AWS WAF Classic in the developer guide.
<em>For the latest version of AWS WAF</em> , use the AWS WAF V2 API and see the <a href="https://docs.aws.amazon.com/waf/latest/developerguide/waf-chapter.html">AWS WAF Developer Guide</a> . With the latest version, AWS WAF has a single set of endpoints for regional and global use.
A combination of ByteMatchSet , IPSet , and/or SqlInjectionMatchSet objects that identify the web requests that you want to allow, block, or count. For example, you might create a Rule that includes the following predicates:
To match the settings in this Rule , a request must originate from 192.0.2.44 AND include a User-Agent header for which the value is BadBot .
See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-waf-rule.html
CloudformationResource: AWS::WAF::Rule
ExampleMetadata: fixture=_generated