Show / Hide Table of Contents

Class CfnRule

This is AWS WAF Classic documentation.

Inheritance
object
CfnElement
CfnRefElement
CfnResource
CfnRule
Implements
IInspectable
IRuleRef
IConstruct
IDependable
IEnvironmentAware
Inherited Members
CfnResource.IsCfnResource(object)
CfnResource.AddDeletionOverride(string)
CfnResource.AddDependency(CfnResource)
CfnResource.AddDependsOn(CfnResource)
CfnResource.AddMetadata(string, object)
CfnResource.AddOverride(string, object)
CfnResource.AddPropertyDeletionOverride(string)
CfnResource.AddPropertyOverride(string, object)
CfnResource.ApplyRemovalPolicy(RemovalPolicy?, IRemovalPolicyOptions)
CfnResource.GetAtt(string, ResolutionTypeHint?)
CfnResource.GetMetadata(string)
CfnResource.ObtainDependencies()
CfnResource.ObtainResourceDependencies()
CfnResource.RemoveDependency(CfnResource)
CfnResource.ReplaceDependency(CfnResource, CfnResource)
CfnResource.ShouldSynthesize()
CfnResource.ToString()
CfnResource.ValidateProperties(object)
CfnResource.CfnOptions
CfnResource.CfnResourceType
CfnResource.Env
CfnResource.UpdatedProperites
CfnResource.UpdatedProperties
CfnRefElement.Ref
CfnElement.IsCfnElement(object)
CfnElement.OverrideLogicalId(string)
CfnElement.CreationStack
CfnElement.LogicalId
CfnElement.Stack
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 AWS::WAF::Rule.

    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 Rule .

    Name

    The friendly name or description for the Rule .

    Predicates

    The Predicates object contains one Predicate element for each ByteMatchSet , IPSet , or SqlInjectionMatchSet object that you want to include in a Rule .

    RuleRef

    A reference to a Rule resource.

    Methods

    ArnForRule(IRuleRef)

    This is AWS WAF Classic documentation.

    Inspect(TreeInspector)

    Examines the CloudFormation resource and discloses attributes.

    IsCfnRule(object)

    Checks whether the given object is a CfnRule.

    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

      string

      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

      string

      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

        IDictionary<string, object>

        Overrides
        CfnResource.CfnProperties
        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

          string

          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

            string

            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

              object

              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

              IRuleReference

              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

                ArnForRule(IRuleRef)

                This is AWS WAF Classic documentation.

                public static string ArnForRule(IRuleRef resource)
                Parameters
                resource IRuleRef
                Returns

                string

                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"
                                   } }
                               });

                  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

                    IsCfnRule(object)

                    Checks whether the given object is a CfnRule.

                    public static bool IsCfnRule(object x)
                    Parameters
                    x object
                    Returns

                    bool

                    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

                      IDictionary<string, object>

                      Overrides
                      CfnResource.RenderProperties(IDictionary<string, object>)
                      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

                        Implements

                        IInspectable
                        IRuleRef
                        Constructs.IConstruct
                        Constructs.IDependable
                        IEnvironmentAware
                        Back to top Generated by DocFX