Show / Hide Table of Contents

Class CfnWebACLPropsMixin.GeoMatchStatementProperty

A rule statement that labels web requests by country and region and that matches against web requests based on country code.

Inheritance
object
CfnWebACLPropsMixin.GeoMatchStatementProperty
Implements
CfnWebACLPropsMixin.IGeoMatchStatementProperty
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Amazon.CDK.CfnPropertyMixins.AWS.WAFv2
Assembly: Amazon.CDK.CfnPropertyMixins.dll
Syntax (csharp)
public class CfnWebACLPropsMixin.GeoMatchStatementProperty : CfnWebACLPropsMixin.IGeoMatchStatementProperty
Syntax (vb)
Public Class CfnWebACLPropsMixin.GeoMatchStatementProperty Implements CfnWebACLPropsMixin.IGeoMatchStatementProperty
Remarks

A geo match rule labels every request that it inspects regardless of whether it finds a match.

    AWS WAF labels requests using the alpha-2 country and region codes from the International Organization for Standardization (ISO) 3166 standard. AWS WAF determines the codes using either the IP address in the web request origin or, if you specify it, the address in the geo match ForwardedIPConfig .

    If you use the web request origin, the label formats are awswaf:clientip:geo:region:<ISO country code>-<ISO region code> and awswaf:clientip:geo:country:<ISO country code> .

    If you use a forwarded IP address, the label formats are awswaf:forwardedip:geo:region:<ISO country code>-<ISO region code> and awswaf:forwardedip:geo:country:<ISO country code> .

    For additional details, see Geographic match rule statement in the AWS WAF Developer Guide .

    See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-geomatchstatement.html

    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.CfnPropertyMixins.AWS.WAFv2;
    
                 var geoMatchStatementProperty = new GeoMatchStatementProperty {
                     CountryCodes = new [] { "countryCodes" },
                     ForwardedIpConfig = new ForwardedIPConfigurationProperty {
                         FallbackBehavior = "fallbackBehavior",
                         HeaderName = "headerName"
                     }
                 };

    Synopsis

    Constructors

    GeoMatchStatementProperty()

    A rule statement that labels web requests by country and region and that matches against web requests based on country code.

    Properties

    CountryCodes

    An array of two-character country codes that you want to match against, for example, [ "US", "CN" ] , from the alpha-2 country ISO codes of the ISO 3166 international standard.

    ForwardedIpConfig

    The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.

    Constructors

    GeoMatchStatementProperty()

    A rule statement that labels web requests by country and region and that matches against web requests based on country code.

    public GeoMatchStatementProperty()
    Remarks

    A geo match rule labels every request that it inspects regardless of whether it finds a match.

      AWS WAF labels requests using the alpha-2 country and region codes from the International Organization for Standardization (ISO) 3166 standard. AWS WAF determines the codes using either the IP address in the web request origin or, if you specify it, the address in the geo match ForwardedIPConfig .

      If you use the web request origin, the label formats are awswaf:clientip:geo:region:<ISO country code>-<ISO region code> and awswaf:clientip:geo:country:<ISO country code> .

      If you use a forwarded IP address, the label formats are awswaf:forwardedip:geo:region:<ISO country code>-<ISO region code> and awswaf:forwardedip:geo:country:<ISO country code> .

      For additional details, see Geographic match rule statement in the AWS WAF Developer Guide .

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-geomatchstatement.html

      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.CfnPropertyMixins.AWS.WAFv2;
      
                   var geoMatchStatementProperty = new GeoMatchStatementProperty {
                       CountryCodes = new [] { "countryCodes" },
                       ForwardedIpConfig = new ForwardedIPConfigurationProperty {
                           FallbackBehavior = "fallbackBehavior",
                           HeaderName = "headerName"
                       }
                   };

      Properties

      CountryCodes

      An array of two-character country codes that you want to match against, for example, [ "US", "CN" ] , from the alpha-2 country ISO codes of the ISO 3166 international standard.

      public string[]? CountryCodes { get; set; }
      Property Value

      string[]

      Remarks

      When you use a geo match statement just for the region and country labels that it adds to requests, you still have to supply a country code for the rule to evaluate. In this case, you configure the rule to only count matching requests, but it will still generate logging and count metrics for any matches. You can reduce the logging and metrics that the rule produces by specifying a country that's unlikely to be a source of traffic to your site.

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-geomatchstatement.html#cfn-wafv2-webacl-geomatchstatement-countrycodes

      ForwardedIpConfig

      The configuration for inspecting IP addresses in an HTTP header that you specify, instead of using the IP address that's reported by the web request origin.

      public object? ForwardedIpConfig { get; set; }
      Property Value

      object

      Remarks

      Commonly, this is the X-Forwarded-For (XFF) header, but you can specify any header name.

      If the specified header isn't present in the request, AWS WAF doesn't apply the rule to the web request at all.
      

      See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-wafv2-webacl-geomatchstatement.html#cfn-wafv2-webacl-geomatchstatement-forwardedipconfig

      Type union: either IResolvable or CfnWebACLPropsMixin.IForwardedIPConfigurationProperty

      Implements

      CfnWebACLPropsMixin.IGeoMatchStatementProperty
      Back to top Generated by DocFX