{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--aws-wafv2-rulegroup.json",
  "title": "AWSWAFv2RuleGroupProperties",
  "description": "Contains the Rules that identify the requests that you want to allow, block, or count. In a RuleGroup, you also specify a default action (ALLOW or BLOCK), and the action for each Rule that you add to a RuleGroup, for example, block requests from specified IP addresses or block requests from specified referrers. You also associate the RuleGroup with a CloudFront distribution to identify the requests that you want AWS WAF to filter. If you add more than one Rule to a RuleGroup, a request needs to match only one of the specifications to be allowed, blocked, or counted.. Source:- <https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-wafv2.git>",
  "x-lintel": {
    "source": "https://raw.githubusercontent.com/lalcebo/json-schema/master/serverless/resources/cloudformation-modified/aws-wafv2-rulegroup.json",
    "sourceSha256": "bbfcbdb1b118bff74261408a1ffbab8e4ec9caaf4412796b7da42eefbd4982d6"
  },
  "type": "object",
  "properties": {
    "Capacity": {
      "type": "integer",
      "minimum": 0
    },
    "Description": {
      "$ref": "#/$defs/EntityDescription"
    },
    "Scope": {
      "$ref": "#/$defs/Scope"
    },
    "Rules": {
      "description": "Collection of Rules.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/Rule"
      }
    },
    "VisibilityConfig": {
      "$ref": "#/$defs/VisibilityConfig"
    },
    "Tags": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Tag"
      },
      "minItems": 1
    },
    "CustomResponseBodies": {
      "$ref": "#/$defs/CustomResponseBodies"
    },
    "AvailableLabels": {
      "description": "Collection of Available Labels.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/LabelSummary"
      }
    },
    "ConsumedLabels": {
      "description": "Collection of Consumed Labels.",
      "type": "array",
      "items": {
        "$ref": "#/$defs/LabelSummary"
      }
    }
  },
  "typeName": "AWS::WAFv2::RuleGroup",
  "$defs": {
    "AndStatement": {
      "type": "object",
      "properties": {
        "Statements": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Statement"
          }
        }
      },
      "required": [
        "Statements"
      ],
      "title": "AWSWAFv2RuleGroupAndStatementDefinition",
      "additionalProperties": false
    },
    "ByteMatchStatement": {
      "description": "Byte Match statement.",
      "type": "object",
      "properties": {
        "SearchString": {
          "$ref": "#/$defs/SearchString"
        },
        "SearchStringBase64": {
          "$ref": "#/$defs/SearchStringBase64"
        },
        "FieldToMatch": {
          "$ref": "#/$defs/FieldToMatch"
        },
        "TextTransformations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextTransformation"
          }
        },
        "PositionalConstraint": {
          "$ref": "#/$defs/PositionalConstraint"
        }
      },
      "required": [
        "FieldToMatch",
        "PositionalConstraint",
        "TextTransformations"
      ],
      "title": "AWSWAFv2RuleGroupByteMatchStatementDefinition",
      "additionalProperties": false
    },
    "EntityDescription": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[a-zA-Z0-9=:#@/\\-,.][a-zA-Z0-9+=:#@/\\-,.\\s]+[a-zA-Z0-9+=:#@/\\-,.]{1,256}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Description of the entity.",
      "title": "AWSWAFv2RuleGroupEntityDescriptionDefinition"
    },
    "EntityName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[0-9A-Za-z_-]{1,128}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Name of the RuleGroup.",
      "title": "AWSWAFv2RuleGroupEntityNameDefinition"
    },
    "FieldToMatch": {
      "description": "Field of the request to match.",
      "type": "object",
      "properties": {
        "SingleHeader": {
          "type": "object",
          "properties": {
            "Name": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                }
              ]
            }
          },
          "required": [
            "Name"
          ],
          "additionalProperties": false
        },
        "SingleQueryArgument": {
          "description": "One query argument in a web request, identified by name, for example UserName or SalesRegion. The name can be up to 30 characters long and isn't case sensitive.",
          "type": "object",
          "properties": {
            "Name": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
                }
              ]
            }
          },
          "required": [
            "Name"
          ],
          "additionalProperties": false
        },
        "AllQueryArguments": {
          "description": "All query arguments of a web request.",
          "type": "object"
        },
        "UriPath": {
          "description": "The path component of the URI of a web request. This is the part of a web request that identifies a resource, for example, /images/daily-ad.jpg.",
          "type": "object"
        },
        "QueryString": {
          "description": "The query string of a web request. This is the part of a URL that appears after a ? character, if any.",
          "type": "object"
        },
        "Body": {
          "$ref": "#/$defs/Body"
        },
        "Method": {
          "description": "The HTTP method of a web request. The method indicates the type of operation that the request is asking the origin to perform.",
          "type": "object"
        },
        "JsonBody": {
          "$ref": "#/$defs/JsonBody"
        },
        "Headers": {
          "$ref": "#/$defs/Headers"
        },
        "Cookies": {
          "$ref": "#/$defs/Cookies"
        }
      },
      "title": "AWSWAFv2RuleGroupFieldToMatchDefinition",
      "additionalProperties": false
    },
    "JsonBody": {
      "description": "Inspect the request body as JSON. The request body immediately follows the request headers.",
      "type": "object",
      "properties": {
        "MatchPattern": {
          "$ref": "#/$defs/JsonMatchPattern"
        },
        "MatchScope": {
          "$ref": "#/$defs/JsonMatchScope"
        },
        "InvalidFallbackBehavior": {
          "$ref": "#/$defs/BodyParsingFallbackBehavior"
        },
        "OversizeHandling": {
          "$ref": "#/$defs/OversizeHandling"
        }
      },
      "required": [
        "MatchPattern",
        "MatchScope"
      ],
      "title": "AWSWAFv2RuleGroupJsonBodyDefinition",
      "additionalProperties": false
    },
    "BodyParsingFallbackBehavior": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "MATCH",
            "NO_MATCH",
            "EVALUATE_AS_STRING"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The inspection behavior to fall back to if the JSON in the request body is invalid.",
      "title": "AWSWAFv2RuleGroupBodyParsingFallbackBehaviorDefinition"
    },
    "JsonMatchScope": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "ALL",
            "KEY",
            "VALUE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The parts of the JSON to match against using the MatchPattern.",
      "title": "AWSWAFv2RuleGroupJsonMatchScopeDefinition"
    },
    "JsonMatchPattern": {
      "description": "The pattern to look for in the JSON body.",
      "type": "object",
      "properties": {
        "All": {
          "description": "Inspect all parts of the web request's JSON body.",
          "type": "object"
        },
        "IncludedPaths": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/JsonPointerPath"
          }
        }
      },
      "title": "AWSWAFv2RuleGroupJsonMatchPatternDefinition",
      "additionalProperties": false
    },
    "JsonPointerPath": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[\\/]+([^~]*(~[01])*)*{1,512}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "JSON pointer path in the web request's JSON body",
      "title": "AWSWAFv2RuleGroupJsonPointerPathDefinition"
    },
    "GeoMatchStatement": {
      "type": "object",
      "properties": {
        "CountryCodes": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2
          }
        },
        "ForwardedIPConfig": {
          "$ref": "#/$defs/ForwardedIPConfiguration"
        }
      },
      "title": "AWSWAFv2RuleGroupGeoMatchStatementDefinition",
      "additionalProperties": false
    },
    "EntityId": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Id of the RuleGroup",
      "title": "AWSWAFv2RuleGroupEntityIdDefinition"
    },
    "IPSetReferenceStatement": {
      "type": "object",
      "properties": {
        "Arn": {
          "$ref": "#/$defs/ResourceArn"
        },
        "IPSetForwardedIPConfig": {
          "$ref": "#/$defs/IPSetForwardedIPConfiguration"
        }
      },
      "required": [
        "Arn"
      ],
      "title": "AWSWAFv2RuleGroupIPSetReferenceStatementDefinition",
      "additionalProperties": false
    },
    "NotStatement": {
      "type": "object",
      "properties": {
        "Statement": {
          "$ref": "#/$defs/Statement"
        }
      },
      "required": [
        "Statement"
      ],
      "title": "AWSWAFv2RuleGroupNotStatementDefinition",
      "additionalProperties": false
    },
    "OrStatement": {
      "type": "object",
      "properties": {
        "Statements": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Statement"
          }
        }
      },
      "required": [
        "Statements"
      ],
      "title": "AWSWAFv2RuleGroupOrStatementDefinition",
      "additionalProperties": false
    },
    "PositionalConstraint": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "EXACTLY",
            "STARTS_WITH",
            "ENDS_WITH",
            "CONTAINS",
            "CONTAINS_WORD"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Position of the evaluation in the FieldToMatch of request.",
      "title": "AWSWAFv2RuleGroupPositionalConstraintDefinition"
    },
    "RateBasedStatement": {
      "type": "object",
      "properties": {
        "Limit": {
          "$ref": "#/$defs/RateLimit"
        },
        "AggregateKeyType": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "IP",
                "FORWARDED_IP"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "ScopeDownStatement": {
          "$ref": "#/$defs/Statement"
        },
        "ForwardedIPConfig": {
          "$ref": "#/$defs/ForwardedIPConfiguration"
        }
      },
      "required": [
        "Limit",
        "AggregateKeyType"
      ],
      "title": "AWSWAFv2RuleGroupRateBasedStatementDefinition",
      "additionalProperties": false
    },
    "RateLimit": {
      "type": "integer",
      "minimum": 100,
      "maximum": 2000000000,
      "title": "AWSWAFv2RuleGroupRateLimitDefinition"
    },
    "RegexPatternSetReferenceStatement": {
      "type": "object",
      "properties": {
        "Arn": {
          "$ref": "#/$defs/ResourceArn"
        },
        "FieldToMatch": {
          "$ref": "#/$defs/FieldToMatch"
        },
        "TextTransformations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextTransformation"
          }
        }
      },
      "required": [
        "Arn",
        "FieldToMatch",
        "TextTransformations"
      ],
      "title": "AWSWAFv2RuleGroupRegexPatternSetReferenceStatementDefinition",
      "additionalProperties": false
    },
    "ResourceArn": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 20,
          "maxLength": 2048
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "ARN of the WAF entity.",
      "title": "AWSWAFv2RuleGroupResourceArnDefinition"
    },
    "ForwardedIPConfiguration": {
      "type": "object",
      "properties": {
        "HeaderName": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9-]+{1,255}$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "FallbackBehavior": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "MATCH",
                "NO_MATCH"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "HeaderName",
        "FallbackBehavior"
      ],
      "title": "AWSWAFv2RuleGroupForwardedIPConfigurationDefinition",
      "additionalProperties": false
    },
    "IPSetForwardedIPConfiguration": {
      "type": "object",
      "properties": {
        "HeaderName": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[a-zA-Z0-9-]+{1,255}$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "FallbackBehavior": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "MATCH",
                "NO_MATCH"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Position": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "FIRST",
                "LAST",
                "ANY"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "HeaderName",
        "FallbackBehavior",
        "Position"
      ],
      "title": "AWSWAFv2RuleGroupIPSetForwardedIPConfigurationDefinition",
      "additionalProperties": false
    },
    "Rule": {
      "description": "Rule of RuleGroup that contains condition and action.",
      "type": "object",
      "properties": {
        "Name": {
          "$ref": "#/$defs/EntityName"
        },
        "Priority": {
          "$ref": "#/$defs/RulePriority"
        },
        "Statement": {
          "$ref": "#/$defs/Statement"
        },
        "Action": {
          "$ref": "#/$defs/RuleAction"
        },
        "RuleLabels": {
          "description": "Collection of Rule Labels.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Label"
          }
        },
        "VisibilityConfig": {
          "$ref": "#/$defs/VisibilityConfig"
        },
        "CaptchaConfig": {
          "$ref": "#/$defs/CaptchaConfig"
        },
        "ChallengeConfig": {
          "$ref": "#/$defs/ChallengeConfig"
        }
      },
      "required": [
        "Name",
        "Priority",
        "Statement",
        "VisibilityConfig"
      ],
      "title": "AWSWAFv2RuleGroupRuleDefinition",
      "additionalProperties": false
    },
    "RuleAction": {
      "description": "Action taken when Rule matches its condition.",
      "type": "object",
      "properties": {
        "Allow": {
          "$ref": "#/$defs/AllowAction"
        },
        "Block": {
          "$ref": "#/$defs/BlockAction"
        },
        "Count": {
          "$ref": "#/$defs/CountAction"
        },
        "Captcha": {
          "$ref": "#/$defs/CaptchaAction"
        },
        "Challenge": {
          "$ref": "#/$defs/ChallengeAction"
        }
      },
      "title": "AWSWAFv2RuleGroupRuleActionDefinition",
      "additionalProperties": false
    },
    "AllowAction": {
      "description": "Allow traffic towards application.",
      "type": "object",
      "properties": {
        "CustomRequestHandling": {
          "$ref": "#/$defs/CustomRequestHandling"
        }
      },
      "title": "AWSWAFv2RuleGroupAllowActionDefinition",
      "additionalProperties": false
    },
    "BlockAction": {
      "description": "Block traffic towards application.",
      "type": "object",
      "properties": {
        "CustomResponse": {
          "$ref": "#/$defs/CustomResponse"
        }
      },
      "title": "AWSWAFv2RuleGroupBlockActionDefinition",
      "additionalProperties": false
    },
    "CountAction": {
      "description": "Count traffic towards application.",
      "type": "object",
      "properties": {
        "CustomRequestHandling": {
          "$ref": "#/$defs/CustomRequestHandling"
        }
      },
      "title": "AWSWAFv2RuleGroupCountActionDefinition",
      "additionalProperties": false
    },
    "CaptchaAction": {
      "description": "Checks valid token exists with request.",
      "type": "object",
      "properties": {
        "CustomRequestHandling": {
          "$ref": "#/$defs/CustomRequestHandling"
        }
      },
      "title": "AWSWAFv2RuleGroupCaptchaActionDefinition",
      "additionalProperties": false
    },
    "ChallengeAction": {
      "description": "Checks that the request has a valid token with an unexpired challenge timestamp and, if not, returns a browser challenge to the client.",
      "type": "object",
      "properties": {
        "CustomRequestHandling": {
          "$ref": "#/$defs/CustomRequestHandling"
        }
      },
      "title": "AWSWAFv2RuleGroupChallengeActionDefinition",
      "additionalProperties": false
    },
    "CustomHTTPHeaderName": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 64
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "HTTP header name.",
      "title": "AWSWAFv2RuleGroupCustomHTTPHeaderNameDefinition"
    },
    "CustomHTTPHeaderValue": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "HTTP header value.",
      "title": "AWSWAFv2RuleGroupCustomHTTPHeaderValueDefinition"
    },
    "CustomHTTPHeader": {
      "description": "HTTP header.",
      "type": "object",
      "properties": {
        "Name": {
          "$ref": "#/$defs/CustomHTTPHeaderName"
        },
        "Value": {
          "$ref": "#/$defs/CustomHTTPHeaderValue"
        }
      },
      "required": [
        "Name",
        "Value"
      ],
      "title": "AWSWAFv2RuleGroupCustomHTTPHeaderDefinition",
      "additionalProperties": false
    },
    "CustomRequestHandling": {
      "description": "Custom request handling.",
      "type": "object",
      "properties": {
        "InsertHeaders": {
          "description": "Collection of HTTP headers.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomHTTPHeader"
          },
          "minItems": 1
        }
      },
      "required": [
        "InsertHeaders"
      ],
      "title": "AWSWAFv2RuleGroupCustomRequestHandlingDefinition",
      "additionalProperties": false
    },
    "ResponseStatusCode": {
      "description": "Custom response code.",
      "type": "integer",
      "minimum": 200,
      "maximum": 599,
      "title": "AWSWAFv2RuleGroupResponseStatusCodeDefinition"
    },
    "ResponseContentType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "TEXT_PLAIN",
            "TEXT_HTML",
            "APPLICATION_JSON"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Valid values are TEXT_PLAIN, TEXT_HTML, and APPLICATION_JSON.",
      "title": "AWSWAFv2RuleGroupResponseContentTypeDefinition"
    },
    "ResponseContent": {
      "oneOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 10240
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Response content.",
      "title": "AWSWAFv2RuleGroupResponseContentDefinition"
    },
    "CustomResponseBody": {
      "description": "Custom response body.",
      "type": "object",
      "properties": {
        "ContentType": {
          "$ref": "#/$defs/ResponseContentType"
        },
        "Content": {
          "$ref": "#/$defs/ResponseContent"
        }
      },
      "required": [
        "ContentType",
        "Content"
      ],
      "title": "AWSWAFv2RuleGroupCustomResponseBodyDefinition",
      "additionalProperties": false
    },
    "CustomResponse": {
      "description": "Custom response.",
      "type": "object",
      "properties": {
        "ResponseCode": {
          "$ref": "#/$defs/ResponseStatusCode"
        },
        "CustomResponseBodyKey": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[\\w\\-]+$"
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ],
          "description": "Custom response body key."
        },
        "ResponseHeaders": {
          "description": "Collection of HTTP headers.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/CustomHTTPHeader"
          },
          "minItems": 1
        }
      },
      "required": [
        "ResponseCode"
      ],
      "title": "AWSWAFv2RuleGroupCustomResponseDefinition",
      "additionalProperties": false
    },
    "CustomResponseBodies": {
      "description": "Custom response key and body map.",
      "type": "object",
      "additionalProperties": false,
      "title": "AWSWAFv2RuleGroupCustomResponseBodiesDefinition",
      "minProperties": 1,
      "patternProperties": {
        "^[\\w\\-]+$": {
          "$ref": "#/$defs/CustomResponseBody"
        }
      }
    },
    "RuleGroup": {
      "type": "object",
      "properties": {
        "Name": {
          "$ref": "#/$defs/EntityName"
        },
        "Id": {
          "$ref": "#/$defs/EntityId"
        },
        "Arn": {
          "$ref": "#/$defs/ResourceArn"
        },
        "Description": {
          "$ref": "#/$defs/EntityDescription"
        },
        "Rules": {
          "description": "Collection of Rules.",
          "type": "array",
          "items": {
            "$ref": "#/$defs/Rule"
          }
        },
        "VisibilityConfig": {
          "$ref": "#/$defs/VisibilityConfig"
        },
        "Capacity": {
          "type": "integer",
          "minimum": 0
        }
      },
      "title": "AWSWAFv2RuleGroupRuleGroupDefinition",
      "additionalProperties": false
    },
    "RulePriority": {
      "description": "Priority of the Rule, Rules get evaluated from lower to higher priority.",
      "type": "integer",
      "minimum": 0,
      "title": "AWSWAFv2RuleGroupRulePriorityDefinition"
    },
    "Scope": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "CLOUDFRONT",
            "REGIONAL"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Use CLOUDFRONT for CloudFront RuleGroup, use REGIONAL for Application Load Balancer and API Gateway.",
      "title": "AWSWAFv2RuleGroupScopeDefinition"
    },
    "SearchString": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "String that is searched to find a match.",
      "title": "AWSWAFv2RuleGroupSearchStringDefinition"
    },
    "SearchStringBase64": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Base64 encoded string that is searched to find a match.",
      "title": "AWSWAFv2RuleGroupSearchStringBase64Definition"
    },
    "SizeConstraintStatement": {
      "description": "Size Constraint statement.",
      "type": "object",
      "properties": {
        "FieldToMatch": {
          "$ref": "#/$defs/FieldToMatch"
        },
        "ComparisonOperator": {
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "EQ",
                "NE",
                "LE",
                "LT",
                "GE",
                "GT"
              ]
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Size": {
          "type": "number",
          "minimum": 0,
          "maximum": 21474836480
        },
        "TextTransformations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextTransformation"
          }
        }
      },
      "required": [
        "FieldToMatch",
        "ComparisonOperator",
        "Size",
        "TextTransformations"
      ],
      "title": "AWSWAFv2RuleGroupSizeConstraintStatementDefinition",
      "additionalProperties": false
    },
    "SqliMatchStatement": {
      "description": "Sqli Match Statement.",
      "type": "object",
      "properties": {
        "FieldToMatch": {
          "$ref": "#/$defs/FieldToMatch"
        },
        "TextTransformations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextTransformation"
          }
        },
        "SensitivityLevel": {
          "$ref": "#/$defs/SensitivityLevel"
        }
      },
      "required": [
        "FieldToMatch",
        "TextTransformations"
      ],
      "title": "AWSWAFv2RuleGroupSqliMatchStatementDefinition",
      "additionalProperties": false
    },
    "Statement": {
      "description": "First level statement that contains conditions, such as ByteMatch, SizeConstraint, etc",
      "type": "object",
      "properties": {
        "ByteMatchStatement": {
          "$ref": "#/$defs/ByteMatchStatement"
        },
        "SqliMatchStatement": {
          "$ref": "#/$defs/SqliMatchStatement"
        },
        "XssMatchStatement": {
          "$ref": "#/$defs/XssMatchStatement"
        },
        "SizeConstraintStatement": {
          "$ref": "#/$defs/SizeConstraintStatement"
        },
        "GeoMatchStatement": {
          "$ref": "#/$defs/GeoMatchStatement"
        },
        "IPSetReferenceStatement": {
          "$ref": "#/$defs/IPSetReferenceStatement"
        },
        "RegexPatternSetReferenceStatement": {
          "$ref": "#/$defs/RegexPatternSetReferenceStatement"
        },
        "RateBasedStatement": {
          "$ref": "#/$defs/RateBasedStatement"
        },
        "AndStatement": {
          "$ref": "#/$defs/AndStatement"
        },
        "OrStatement": {
          "$ref": "#/$defs/OrStatement"
        },
        "NotStatement": {
          "$ref": "#/$defs/NotStatement"
        },
        "LabelMatchStatement": {
          "$ref": "#/$defs/LabelMatchStatement"
        },
        "RegexMatchStatement": {
          "$ref": "#/$defs/RegexMatchStatement"
        }
      },
      "title": "AWSWAFv2RuleGroupStatementDefinition",
      "additionalProperties": false
    },
    "Tag": {
      "type": "object",
      "properties": {
        "Key": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "Value": {
          "oneOf": [
            {
              "type": "string",
              "minLength": 0,
              "maxLength": 256
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "title": "AWSWAFv2RuleGroupTagDefinition",
      "additionalProperties": false
    },
    "TextTransformation": {
      "description": "Text Transformation on the Search String before match.",
      "type": "object",
      "properties": {
        "Priority": {
          "$ref": "#/$defs/TextTransformationPriority"
        },
        "Type": {
          "$ref": "#/$defs/TextTransformationType"
        }
      },
      "required": [
        "Priority",
        "Type"
      ],
      "title": "AWSWAFv2RuleGroupTextTransformationDefinition",
      "additionalProperties": false
    },
    "TextTransformationPriority": {
      "description": "Priority of Rule being evaluated.",
      "type": "integer",
      "minimum": 0,
      "title": "AWSWAFv2RuleGroupTextTransformationPriorityDefinition"
    },
    "TextTransformationType": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "NONE",
            "COMPRESS_WHITE_SPACE",
            "HTML_ENTITY_DECODE",
            "LOWERCASE",
            "CMD_LINE",
            "URL_DECODE",
            "BASE64_DECODE",
            "HEX_DECODE",
            "MD5",
            "REPLACE_COMMENTS",
            "ESCAPE_SEQ_DECODE",
            "SQL_HEX_DECODE",
            "CSS_DECODE",
            "JS_DECODE",
            "NORMALIZE_PATH",
            "NORMALIZE_PATH_WIN",
            "REMOVE_NULLS",
            "REPLACE_NULLS",
            "BASE64_DECODE_EXT",
            "URL_DECODE_UNI",
            "UTF8_TO_UNICODE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Type of text transformation.",
      "title": "AWSWAFv2RuleGroupTextTransformationTypeDefinition"
    },
    "VisibilityConfig": {
      "description": "Visibility Metric of the RuleGroup.",
      "type": "object",
      "properties": {
        "SampledRequestsEnabled": {
          "type": "boolean"
        },
        "CloudWatchMetricsEnabled": {
          "type": "boolean"
        },
        "MetricName": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 128,
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        }
      },
      "required": [
        "SampledRequestsEnabled",
        "CloudWatchMetricsEnabled",
        "MetricName"
      ],
      "title": "AWSWAFv2RuleGroupVisibilityConfigDefinition",
      "additionalProperties": false
    },
    "XssMatchStatement": {
      "description": "Xss Match Statement.",
      "type": "object",
      "properties": {
        "FieldToMatch": {
          "$ref": "#/$defs/FieldToMatch"
        },
        "TextTransformations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextTransformation"
          }
        }
      },
      "required": [
        "FieldToMatch",
        "TextTransformations"
      ],
      "title": "AWSWAFv2RuleGroupXssMatchStatementDefinition",
      "additionalProperties": false
    },
    "LabelName": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[0-9A-Za-z_:-]{1,1024}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Name of the Label.",
      "title": "AWSWAFv2RuleGroupLabelNameDefinition"
    },
    "LabelSummary": {
      "type": "object",
      "properties": {
        "Name": {
          "$ref": "#/$defs/LabelName"
        }
      },
      "title": "AWSWAFv2RuleGroupLabelSummaryDefinition",
      "additionalProperties": false
    },
    "Label": {
      "type": "object",
      "properties": {
        "Name": {
          "$ref": "#/$defs/LabelName"
        }
      },
      "required": [
        "Name"
      ],
      "title": "AWSWAFv2RuleGroupLabelDefinition",
      "additionalProperties": false
    },
    "LabelMatchKey": {
      "oneOf": [
        {
          "type": "string",
          "pattern": "^[0-9A-Za-z_:-]{1,1024}$"
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSWAFv2RuleGroupLabelMatchKeyDefinition"
    },
    "LabelMatchScope": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "LABEL",
            "NAMESPACE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "title": "AWSWAFv2RuleGroupLabelMatchScopeDefinition"
    },
    "LabelMatchStatement": {
      "type": "object",
      "properties": {
        "Scope": {
          "$ref": "#/$defs/LabelMatchScope"
        },
        "Key": {
          "$ref": "#/$defs/LabelMatchKey"
        }
      },
      "required": [
        "Scope",
        "Key"
      ],
      "title": "AWSWAFv2RuleGroupLabelMatchStatementDefinition",
      "additionalProperties": false
    },
    "RegexMatchStatement": {
      "type": "object",
      "properties": {
        "RegexString": {
          "oneOf": [
            {
              "type": "string",
              "maxLength": 512,
              "minLength": 1
            },
            {
              "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
            }
          ]
        },
        "FieldToMatch": {
          "$ref": "#/$defs/FieldToMatch"
        },
        "TextTransformations": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TextTransformation"
          }
        }
      },
      "required": [
        "RegexString",
        "FieldToMatch",
        "TextTransformations"
      ],
      "title": "AWSWAFv2RuleGroupRegexMatchStatementDefinition",
      "additionalProperties": false
    },
    "CaptchaConfig": {
      "type": "object",
      "properties": {
        "ImmunityTimeProperty": {
          "$ref": "#/$defs/ImmunityTimeProperty"
        }
      },
      "title": "AWSWAFv2RuleGroupCaptchaConfigDefinition",
      "additionalProperties": false
    },
    "ChallengeConfig": {
      "type": "object",
      "properties": {
        "ImmunityTimeProperty": {
          "$ref": "#/$defs/ImmunityTimeProperty"
        }
      },
      "title": "AWSWAFv2RuleGroupChallengeConfigDefinition",
      "additionalProperties": false
    },
    "ImmunityTimeProperty": {
      "type": "object",
      "properties": {
        "ImmunityTime": {
          "type": "integer",
          "minimum": 60,
          "maximum": 259200
        }
      },
      "required": [
        "ImmunityTime"
      ],
      "title": "AWSWAFv2RuleGroupImmunityTimePropertyDefinition",
      "additionalProperties": false
    },
    "Body": {
      "description": "The body of a web request. This immediately follows the request headers.",
      "type": "object",
      "properties": {
        "OversizeHandling": {
          "$ref": "#/$defs/OversizeHandling"
        }
      },
      "title": "AWSWAFv2RuleGroupBodyDefinition",
      "additionalProperties": false
    },
    "Headers": {
      "description": "Includes headers of a web request.",
      "type": "object",
      "properties": {
        "MatchPattern": {
          "$ref": "#/$defs/HeaderMatchPattern"
        },
        "MatchScope": {
          "$ref": "#/$defs/MapMatchScope"
        },
        "OversizeHandling": {
          "$ref": "#/$defs/OversizeHandling"
        }
      },
      "required": [
        "MatchPattern",
        "MatchScope",
        "OversizeHandling"
      ],
      "title": "AWSWAFv2RuleGroupHeadersDefinition",
      "additionalProperties": false
    },
    "Cookies": {
      "description": "Includes headers of a web request.",
      "type": "object",
      "properties": {
        "MatchPattern": {
          "$ref": "#/$defs/CookieMatchPattern"
        },
        "MatchScope": {
          "$ref": "#/$defs/MapMatchScope"
        },
        "OversizeHandling": {
          "$ref": "#/$defs/OversizeHandling"
        }
      },
      "required": [
        "MatchPattern",
        "MatchScope",
        "OversizeHandling"
      ],
      "title": "AWSWAFv2RuleGroupCookiesDefinition",
      "additionalProperties": false
    },
    "HeaderMatchPattern": {
      "description": "The pattern to look for in the request headers.",
      "type": "object",
      "properties": {
        "All": {
          "description": "Inspect all parts of the web request headers.",
          "type": "object"
        },
        "IncludedHeaders": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": ".*\\S.*",
            "minLength": 1,
            "maxLength": 64
          },
          "minItems": 1,
          "maxItems": 199
        },
        "ExcludedHeaders": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": ".*\\S.*",
            "minLength": 1,
            "maxLength": 64
          },
          "minItems": 1,
          "maxItems": 199
        }
      },
      "title": "AWSWAFv2RuleGroupHeaderMatchPatternDefinition",
      "additionalProperties": false
    },
    "CookieMatchPattern": {
      "description": "The pattern to look for in the request cookies.",
      "type": "object",
      "properties": {
        "All": {
          "description": "Inspect all parts of the web request cookies.",
          "type": "object"
        },
        "IncludedCookies": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": ".*\\S.*",
            "minLength": 1,
            "maxLength": 60
          },
          "minItems": 1,
          "maxItems": 199
        },
        "ExcludedCookies": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": ".*\\S.*",
            "minLength": 1,
            "maxLength": 60
          },
          "minItems": 1,
          "maxItems": 199
        }
      },
      "title": "AWSWAFv2RuleGroupCookieMatchPatternDefinition",
      "additionalProperties": false
    },
    "MapMatchScope": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "ALL",
            "KEY",
            "VALUE"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "The parts of the request to match against using the MatchPattern.",
      "title": "AWSWAFv2RuleGroupMapMatchScopeDefinition"
    },
    "OversizeHandling": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "CONTINUE",
            "MATCH",
            "NO_MATCH"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Handling of requests containing oversize fields",
      "title": "AWSWAFv2RuleGroupOversizeHandlingDefinition"
    },
    "SensitivityLevel": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "LOW",
            "HIGH"
          ]
        },
        {
          "$ref": "https://catalog.lintel.tools/schemas/schemastore/serverless-framework-configuration/_shared/latest--cf.functions.json#/Aws_CF_FunctionString"
        }
      ],
      "description": "Sensitivity Level current only used for sqli match statements.",
      "title": "AWSWAFv2RuleGroupSensitivityLevelDefinition"
    }
  },
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-wafv2.git",
  "additionalProperties": false,
  "readOnlyProperties": [
    "/properties/Arn",
    "/properties/Id",
    "/properties/LabelNamespace",
    "/properties/AvailableLabels/*/Name",
    "/properties/ConsumedLabels/*/Name"
  ],
  "required": [
    "Capacity",
    "Scope",
    "VisibilityConfig"
  ],
  "primaryIdentifier": [
    "/properties/Name",
    "/properties/Id",
    "/properties/Scope"
  ],
  "createOnlyProperties": [
    "/properties/Name",
    "/properties/Scope"
  ]
}
