Table Of Contents

Feedback

User Guide

First time using the AWS CLI? See the User Guide for help getting started.

Note: You are viewing the documentation for an older major version of the AWS CLI (version 1).

AWS CLI version 2, the latest major version of AWS CLI, is now stable and recommended for general use. To view this page for the AWS CLI version 2, click here. For more information see the AWS CLI version 2 installation instructions and migration guide.

[ aws . wafv2 ]

check-capacity

Description

Note

This is the latest version of AWS WAF , named AWS WAFV2, released in November, 2019. For information, including how to migrate your AWS WAF resources from the prior release, see the AWS WAF Developer Guide .

Returns the web ACL capacity unit (WCU) requirements for a specified scope and set of rules. You can use this to check the capacity requirements for the rules you want to use in a RuleGroup or WebACL .

AWS WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. AWS WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  check-capacity
--scope <value>
--rules <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--scope (string)

Specifies whether this is for an AWS CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB) or an API Gateway stage.

To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:

  • CLI - Specify the Region when you use the CloudFront scope: --scope=CLOUDFRONT --region=us-east-1 .
  • API and SDKs - For all calls, use the Region endpoint us-east-1.

Possible values:

  • CLOUDFRONT
  • REGIONAL

--rules (list)

An array of Rule that you're configuring to use in a rule group or web ACL.

JSON Syntax:

[
  {
    "Name": "string",
    "Priority": integer,
    "Statement": {
      "ByteMatchStatement": {
        "SearchString": blob,
        "FieldToMatch": {
          "SingleHeader": {
            "Name": "string"
          },
          "SingleQueryArgument": {
            "Name": "string"
          },
          "AllQueryArguments": {

          },
          "UriPath": {

          },
          "QueryString": {

          },
          "Body": {

          },
          "Method": {

          }
        },
        "TextTransformations": [
          {
            "Priority": integer,
            "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
          }
          ...
        ],
        "PositionalConstraint": "EXACTLY"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CONTAINS_WORD"
      },
      "SqliMatchStatement": {
        "FieldToMatch": {
          "SingleHeader": {
            "Name": "string"
          },
          "SingleQueryArgument": {
            "Name": "string"
          },
          "AllQueryArguments": {

          },
          "UriPath": {

          },
          "QueryString": {

          },
          "Body": {

          },
          "Method": {

          }
        },
        "TextTransformations": [
          {
            "Priority": integer,
            "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
          }
          ...
        ]
      },
      "XssMatchStatement": {
        "FieldToMatch": {
          "SingleHeader": {
            "Name": "string"
          },
          "SingleQueryArgument": {
            "Name": "string"
          },
          "AllQueryArguments": {

          },
          "UriPath": {

          },
          "QueryString": {

          },
          "Body": {

          },
          "Method": {

          }
        },
        "TextTransformations": [
          {
            "Priority": integer,
            "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
          }
          ...
        ]
      },
      "SizeConstraintStatement": {
        "FieldToMatch": {
          "SingleHeader": {
            "Name": "string"
          },
          "SingleQueryArgument": {
            "Name": "string"
          },
          "AllQueryArguments": {

          },
          "UriPath": {

          },
          "QueryString": {

          },
          "Body": {

          },
          "Method": {

          }
        },
        "ComparisonOperator": "EQ"|"NE"|"LE"|"LT"|"GE"|"GT",
        "Size": long,
        "TextTransformations": [
          {
            "Priority": integer,
            "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
          }
          ...
        ]
      },
      "GeoMatchStatement": {
        "CountryCodes": ["AF"|"AX"|"AL"|"DZ"|"AS"|"AD"|"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"ES"|"LK"|"SD"|"SR"|"SJ"|"SZ"|"SE"|"CH"|"SY"|"TW"|"TJ"|"TZ"|"TH"|"TL"|"TG"|"TK"|"TO"|"TT"|"TN"|"TR"|"TM"|"TC"|"TV"|"UG"|"UA"|"AE"|"GB"|"US"|"UM"|"UY"|"UZ"|"VU"|"VE"|"VN"|"VG"|"VI"|"WF"|"EH"|"YE"|"ZM"|"ZW", ...],
        "ForwardedIPConfig": {
          "HeaderName": "string",
          "FallbackBehavior": "MATCH"|"NO_MATCH"
        }
      },
      "RuleGroupReferenceStatement": {
        "ARN": "string",
        "ExcludedRules": [
          {
            "Name": "string"
          }
          ...
        ]
      },
      "IPSetReferenceStatement": {
        "ARN": "string",
        "IPSetForwardedIPConfig": {
          "HeaderName": "string",
          "FallbackBehavior": "MATCH"|"NO_MATCH",
          "Position": "FIRST"|"LAST"|"ANY"
        }
      },
      "RegexPatternSetReferenceStatement": {
        "ARN": "string",
        "FieldToMatch": {
          "SingleHeader": {
            "Name": "string"
          },
          "SingleQueryArgument": {
            "Name": "string"
          },
          "AllQueryArguments": {

          },
          "UriPath": {

          },
          "QueryString": {

          },
          "Body": {

          },
          "Method": {

          }
        },
        "TextTransformations": [
          {
            "Priority": integer,
            "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
          }
          ...
        ]
      },
      "RateBasedStatement": {
        "Limit": long,
        "AggregateKeyType": "IP"|"FORWARDED_IP",
        "ScopeDownStatement": {
          "ByteMatchStatement": {
            "SearchString": blob,
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ],
            "PositionalConstraint": "EXACTLY"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CONTAINS_WORD"
          },
          "SqliMatchStatement": {
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ]
          },
          "XssMatchStatement": {
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ]
          },
          "SizeConstraintStatement": {
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "ComparisonOperator": "EQ"|"NE"|"LE"|"LT"|"GE"|"GT",
            "Size": long,
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ]
          },
          "GeoMatchStatement": {
            "CountryCodes": ["AF"|"AX"|"AL"|"DZ"|"AS"|"AD"|"AO"|"AI"|"AQ"|"AG"|"AR"|"AM"|"AW"|"AU"|"AT"|"AZ"|"BS"|"BH"|"BD"|"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"|"TL"|"TG"|"TK"|"TO"|"TT"|"TN"|"TR"|"TM"|"TC"|"TV"|"UG"|"UA"|"AE"|"GB"|"US"|"UM"|"UY"|"UZ"|"VU"|"VE"|"VN"|"VG"|"VI"|"WF"|"EH"|"YE"|"ZM"|"ZW", ...],
            "ForwardedIPConfig": {
              "HeaderName": "string",
              "FallbackBehavior": "MATCH"|"NO_MATCH"
            }
          },
          "RuleGroupReferenceStatement": {
            "ARN": "string",
            "ExcludedRules": [
              {
                "Name": "string"
              }
              ...
            ]
          },
          "IPSetReferenceStatement": {
            "ARN": "string",
            "IPSetForwardedIPConfig": {
              "HeaderName": "string",
              "FallbackBehavior": "MATCH"|"NO_MATCH",
              "Position": "FIRST"|"LAST"|"ANY"
            }
          },
          "RegexPatternSetReferenceStatement": {
            "ARN": "string",
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ]
          },
          "RateBasedStatement": {
            "Limit": long,
            "AggregateKeyType": "IP"|"FORWARDED_IP",
            "ScopeDownStatement": { ... recursive ... },
            "ForwardedIPConfig": {
              "HeaderName": "string",
              "FallbackBehavior": "MATCH"|"NO_MATCH"
            }
          },
          "AndStatement": {
            "Statements": [
              { ... recursive ... }
              ...
            ]
          },
          "OrStatement": {
            "Statements": [
              { ... recursive ... }
              ...
            ]
          },
          "NotStatement": {
            "Statement": { ... recursive ... }
          },
          "ManagedRuleGroupStatement": {
            "VendorName": "string",
            "Name": "string",
            "ExcludedRules": [
              {
                "Name": "string"
              }
              ...
            ]
          }
        },
        "ForwardedIPConfig": {
          "HeaderName": "string",
          "FallbackBehavior": "MATCH"|"NO_MATCH"
        }
      },
      "AndStatement": {
        "Statements": [
          {
            "ByteMatchStatement": {
              "SearchString": blob,
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ],
              "PositionalConstraint": "EXACTLY"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CONTAINS_WORD"
            },
            "SqliMatchStatement": {
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ]
            },
            "XssMatchStatement": {
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ]
            },
            "SizeConstraintStatement": {
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "ComparisonOperator": "EQ"|"NE"|"LE"|"LT"|"GE"|"GT",
              "Size": long,
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ]
            },
            "GeoMatchStatement": {
              "CountryCodes": ["AF"|"AX"|"AL"|"DZ"|"AS"|"AD"|"AO"|"AI"|"AQ"|"AG"|"AR"|"AM"|"AW"|"AU"|"AT"|"AZ"|"BS"|"BH"|"BD"|"BB"|"BY"|"BE"|"BZ"|"BJ"|"BM"|"BT"|"BO"|"BQ"|"BA"|"BW"|"BV"|"BR"|"IO"|"BN"|"BG"|"BF"|"BI"|"KH"|"CM"|"CA"|"CV"|"KY"|"CF"|"TD"|"CL"|"CN"|"CX"|"CC"|"CO"|"KM"|"CG"|"CD"|"CK"|"CR"|"CI"|"HR"|"CU"|"CW"|"CY"|"CZ"|"DK"|"DJ"|"DM"|"DO"|"EC"|"EG"|"SV"|"GQ"|"ER"|"EE"|"ET"|"FK"|"FO"|"FJ"|"FI"|"FR"|"GF"|"PF"|"TF"|"GA"|"GM"|"GE"|"DE"|"GH"|"GI"|"GR"|"GL"|"GD"|"GP"|"GU"|"GT"|"GG"|"GN"|"GW"|"GY"|"HT"|"HM"|"VA"|"HN"|"HK"|"HU"|"IS"|"IN"|"ID"|"IR"|"IQ"|"IE"|"IM"|"IL"|"IT"|"JM"|"JP"|"JE"|"JO"|"KZ"|"KE"|"KI"|"KP"|"KR"|"KW"|"KG"|"LA"|"LV"|"LB"|"LS"|"LR"|"LY"|"LI"|"LT"|"LU"|"MO"|"MK"|"MG"|"MW"|"MY"|"MV"|"ML"|"MT"|"MH"|"MQ"|"MR"|"MU"|"YT"|"MX"|"FM"|"MD"|"MC"|"MN"|"ME"|"MS"|"MA"|"MZ"|"MM"|"NA"|"NR"|"NP"|"NL"|"NC"|"NZ"|"NI"|"NE"|"NG"|"NU"|"NF"|"MP"|"NO"|"OM"|"PK"|"PW"|"PS"|"PA"|"PG"|"PY"|"PE"|"PH"|"PN"|"PL"|"PT"|"PR"|"QA"|"RE"|"RO"|"RU"|"RW"|"BL"|"SH"|"KN"|"LC"|"MF"|"PM"|"VC"|"WS"|"SM"|"ST"|"SA"|"SN"|"RS"|"SC"|"SL"|"SG"|"SX"|"SK"|"SI"|"SB"|"SO"|"ZA"|"GS"|"SS"|"ES"|"LK"|"SD"|"SR"|"SJ"|"SZ"|"SE"|"CH"|"SY"|"TW"|"TJ"|"TZ"|"TH"|"TL"|"TG"|"TK"|"TO"|"TT"|"TN"|"TR"|"TM"|"TC"|"TV"|"UG"|"UA"|"AE"|"GB"|"US"|"UM"|"UY"|"UZ"|"VU"|"VE"|"VN"|"VG"|"VI"|"WF"|"EH"|"YE"|"ZM"|"ZW", ...],
              "ForwardedIPConfig": {
                "HeaderName": "string",
                "FallbackBehavior": "MATCH"|"NO_MATCH"
              }
            },
            "RuleGroupReferenceStatement": {
              "ARN": "string",
              "ExcludedRules": [
                {
                  "Name": "string"
                }
                ...
              ]
            },
            "IPSetReferenceStatement": {
              "ARN": "string",
              "IPSetForwardedIPConfig": {
                "HeaderName": "string",
                "FallbackBehavior": "MATCH"|"NO_MATCH",
                "Position": "FIRST"|"LAST"|"ANY"
              }
            },
            "RegexPatternSetReferenceStatement": {
              "ARN": "string",
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ]
            },
            "RateBasedStatement": {
              "Limit": long,
              "AggregateKeyType": "IP"|"FORWARDED_IP",
              "ScopeDownStatement": { ... recursive ... },
              "ForwardedIPConfig": {
                "HeaderName": "string",
                "FallbackBehavior": "MATCH"|"NO_MATCH"
              }
            },
            "AndStatement": {
              "Statements": [
                { ... recursive ... }
                ...
              ]
            },
            "OrStatement": {
              "Statements": [
                { ... recursive ... }
                ...
              ]
            },
            "NotStatement": {
              "Statement": { ... recursive ... }
            },
            "ManagedRuleGroupStatement": {
              "VendorName": "string",
              "Name": "string",
              "ExcludedRules": [
                {
                  "Name": "string"
                }
                ...
              ]
            }
          }
          ...
        ]
      },
      "OrStatement": {
        "Statements": [
          {
            "ByteMatchStatement": {
              "SearchString": blob,
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ],
              "PositionalConstraint": "EXACTLY"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CONTAINS_WORD"
            },
            "SqliMatchStatement": {
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ]
            },
            "XssMatchStatement": {
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ]
            },
            "SizeConstraintStatement": {
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "ComparisonOperator": "EQ"|"NE"|"LE"|"LT"|"GE"|"GT",
              "Size": long,
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ]
            },
            "GeoMatchStatement": {
              "CountryCodes": ["AF"|"AX"|"AL"|"DZ"|"AS"|"AD"|"AO"|"AI"|"AQ"|"AG"|"AR"|"AM"|"AW"|"AU"|"AT"|"AZ"|"BS"|"BH"|"BD"|"BB"|"BY"|"BE"|"BZ"|"BJ"|"BM"|"BT"|"BO"|"BQ"|"BA"|"BW"|"BV"|"BR"|"IO"|"BN"|"BG"|"BF"|"BI"|"KH"|"CM"|"CA"|"CV"|"KY"|"CF"|"TD"|"CL"|"CN"|"CX"|"CC"|"CO"|"KM"|"CG"|"CD"|"CK"|"CR"|"CI"|"HR"|"CU"|"CW"|"CY"|"CZ"|"DK"|"DJ"|"DM"|"DO"|"EC"|"EG"|"SV"|"GQ"|"ER"|"EE"|"ET"|"FK"|"FO"|"FJ"|"FI"|"FR"|"GF"|"PF"|"TF"|"GA"|"GM"|"GE"|"DE"|"GH"|"GI"|"GR"|"GL"|"GD"|"GP"|"GU"|"GT"|"GG"|"GN"|"GW"|"GY"|"HT"|"HM"|"VA"|"HN"|"HK"|"HU"|"IS"|"IN"|"ID"|"IR"|"IQ"|"IE"|"IM"|"IL"|"IT"|"JM"|"JP"|"JE"|"JO"|"KZ"|"KE"|"KI"|"KP"|"KR"|"KW"|"KG"|"LA"|"LV"|"LB"|"LS"|"LR"|"LY"|"LI"|"LT"|"LU"|"MO"|"MK"|"MG"|"MW"|"MY"|"MV"|"ML"|"MT"|"MH"|"MQ"|"MR"|"MU"|"YT"|"MX"|"FM"|"MD"|"MC"|"MN"|"ME"|"MS"|"MA"|"MZ"|"MM"|"NA"|"NR"|"NP"|"NL"|"NC"|"NZ"|"NI"|"NE"|"NG"|"NU"|"NF"|"MP"|"NO"|"OM"|"PK"|"PW"|"PS"|"PA"|"PG"|"PY"|"PE"|"PH"|"PN"|"PL"|"PT"|"PR"|"QA"|"RE"|"RO"|"RU"|"RW"|"BL"|"SH"|"KN"|"LC"|"MF"|"PM"|"VC"|"WS"|"SM"|"ST"|"SA"|"SN"|"RS"|"SC"|"SL"|"SG"|"SX"|"SK"|"SI"|"SB"|"SO"|"ZA"|"GS"|"SS"|"ES"|"LK"|"SD"|"SR"|"SJ"|"SZ"|"SE"|"CH"|"SY"|"TW"|"TJ"|"TZ"|"TH"|"TL"|"TG"|"TK"|"TO"|"TT"|"TN"|"TR"|"TM"|"TC"|"TV"|"UG"|"UA"|"AE"|"GB"|"US"|"UM"|"UY"|"UZ"|"VU"|"VE"|"VN"|"VG"|"VI"|"WF"|"EH"|"YE"|"ZM"|"ZW", ...],
              "ForwardedIPConfig": {
                "HeaderName": "string",
                "FallbackBehavior": "MATCH"|"NO_MATCH"
              }
            },
            "RuleGroupReferenceStatement": {
              "ARN": "string",
              "ExcludedRules": [
                {
                  "Name": "string"
                }
                ...
              ]
            },
            "IPSetReferenceStatement": {
              "ARN": "string",
              "IPSetForwardedIPConfig": {
                "HeaderName": "string",
                "FallbackBehavior": "MATCH"|"NO_MATCH",
                "Position": "FIRST"|"LAST"|"ANY"
              }
            },
            "RegexPatternSetReferenceStatement": {
              "ARN": "string",
              "FieldToMatch": {
                "SingleHeader": {
                  "Name": "string"
                },
                "SingleQueryArgument": {
                  "Name": "string"
                },
                "AllQueryArguments": {

                },
                "UriPath": {

                },
                "QueryString": {

                },
                "Body": {

                },
                "Method": {

                }
              },
              "TextTransformations": [
                {
                  "Priority": integer,
                  "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
                }
                ...
              ]
            },
            "RateBasedStatement": {
              "Limit": long,
              "AggregateKeyType": "IP"|"FORWARDED_IP",
              "ScopeDownStatement": { ... recursive ... },
              "ForwardedIPConfig": {
                "HeaderName": "string",
                "FallbackBehavior": "MATCH"|"NO_MATCH"
              }
            },
            "AndStatement": {
              "Statements": [
                { ... recursive ... }
                ...
              ]
            },
            "OrStatement": {
              "Statements": [
                { ... recursive ... }
                ...
              ]
            },
            "NotStatement": {
              "Statement": { ... recursive ... }
            },
            "ManagedRuleGroupStatement": {
              "VendorName": "string",
              "Name": "string",
              "ExcludedRules": [
                {
                  "Name": "string"
                }
                ...
              ]
            }
          }
          ...
        ]
      },
      "NotStatement": {
        "Statement": {
          "ByteMatchStatement": {
            "SearchString": blob,
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ],
            "PositionalConstraint": "EXACTLY"|"STARTS_WITH"|"ENDS_WITH"|"CONTAINS"|"CONTAINS_WORD"
          },
          "SqliMatchStatement": {
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ]
          },
          "XssMatchStatement": {
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ]
          },
          "SizeConstraintStatement": {
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "ComparisonOperator": "EQ"|"NE"|"LE"|"LT"|"GE"|"GT",
            "Size": long,
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ]
          },
          "GeoMatchStatement": {
            "CountryCodes": ["AF"|"AX"|"AL"|"DZ"|"AS"|"AD"|"AO"|"AI"|"AQ"|"AG"|"AR"|"AM"|"AW"|"AU"|"AT"|"AZ"|"BS"|"BH"|"BD"|"BB"|"BY"|"BE"|"BZ"|"BJ"|"BM"|"BT"|"BO"|"BQ"|"BA"|"BW"|"BV"|"BR"|"IO"|"BN"|"BG"|"BF"|"BI"|"KH"|"CM"|"CA"|"CV"|"KY"|"CF"|"TD"|"CL"|"CN"|"CX"|"CC"|"CO"|"KM"|"CG"|"CD"|"CK"|"CR"|"CI"|"HR"|"CU"|"CW"|"CY"|"CZ"|"DK"|"DJ"|"DM"|"DO"|"EC"|"EG"|"SV"|"GQ"|"ER"|"EE"|"ET"|"FK"|"FO"|"FJ"|"FI"|"FR"|"GF"|"PF"|"TF"|"GA"|"GM"|"GE"|"DE"|"GH"|"GI"|"GR"|"GL"|"GD"|"GP"|"GU"|"GT"|"GG"|"GN"|"GW"|"GY"|"HT"|"HM"|"VA"|"HN"|"HK"|"HU"|"IS"|"IN"|"ID"|"IR"|"IQ"|"IE"|"IM"|"IL"|"IT"|"JM"|"JP"|"JE"|"JO"|"KZ"|"KE"|"KI"|"KP"|"KR"|"KW"|"KG"|"LA"|"LV"|"LB"|"LS"|"LR"|"LY"|"LI"|"LT"|"LU"|"MO"|"MK"|"MG"|"MW"|"MY"|"MV"|"ML"|"MT"|"MH"|"MQ"|"MR"|"MU"|"YT"|"MX"|"FM"|"MD"|"MC"|"MN"|"ME"|"MS"|"MA"|"MZ"|"MM"|"NA"|"NR"|"NP"|"NL"|"NC"|"NZ"|"NI"|"NE"|"NG"|"NU"|"NF"|"MP"|"NO"|"OM"|"PK"|"PW"|"PS"|"PA"|"PG"|"PY"|"PE"|"PH"|"PN"|"PL"|"PT"|"PR"|"QA"|"RE"|"RO"|"RU"|"RW"|"BL"|"SH"|"KN"|"LC"|"MF"|"PM"|"VC"|"WS"|"SM"|"ST"|"SA"|"SN"|"RS"|"SC"|"SL"|"SG"|"SX"|"SK"|"SI"|"SB"|"SO"|"ZA"|"GS"|"SS"|"ES"|"LK"|"SD"|"SR"|"SJ"|"SZ"|"SE"|"CH"|"SY"|"TW"|"TJ"|"TZ"|"TH"|"TL"|"TG"|"TK"|"TO"|"TT"|"TN"|"TR"|"TM"|"TC"|"TV"|"UG"|"UA"|"AE"|"GB"|"US"|"UM"|"UY"|"UZ"|"VU"|"VE"|"VN"|"VG"|"VI"|"WF"|"EH"|"YE"|"ZM"|"ZW", ...],
            "ForwardedIPConfig": {
              "HeaderName": "string",
              "FallbackBehavior": "MATCH"|"NO_MATCH"
            }
          },
          "RuleGroupReferenceStatement": {
            "ARN": "string",
            "ExcludedRules": [
              {
                "Name": "string"
              }
              ...
            ]
          },
          "IPSetReferenceStatement": {
            "ARN": "string",
            "IPSetForwardedIPConfig": {
              "HeaderName": "string",
              "FallbackBehavior": "MATCH"|"NO_MATCH",
              "Position": "FIRST"|"LAST"|"ANY"
            }
          },
          "RegexPatternSetReferenceStatement": {
            "ARN": "string",
            "FieldToMatch": {
              "SingleHeader": {
                "Name": "string"
              },
              "SingleQueryArgument": {
                "Name": "string"
              },
              "AllQueryArguments": {

              },
              "UriPath": {

              },
              "QueryString": {

              },
              "Body": {

              },
              "Method": {

              }
            },
            "TextTransformations": [
              {
                "Priority": integer,
                "Type": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
              }
              ...
            ]
          },
          "RateBasedStatement": {
            "Limit": long,
            "AggregateKeyType": "IP"|"FORWARDED_IP",
            "ScopeDownStatement": { ... recursive ... },
            "ForwardedIPConfig": {
              "HeaderName": "string",
              "FallbackBehavior": "MATCH"|"NO_MATCH"
            }
          },
          "AndStatement": {
            "Statements": [
              { ... recursive ... }
              ...
            ]
          },
          "OrStatement": {
            "Statements": [
              { ... recursive ... }
              ...
            ]
          },
          "NotStatement": {
            "Statement": { ... recursive ... }
          },
          "ManagedRuleGroupStatement": {
            "VendorName": "string",
            "Name": "string",
            "ExcludedRules": [
              {
                "Name": "string"
              }
              ...
            ]
          }
        }
      },
      "ManagedRuleGroupStatement": {
        "VendorName": "string",
        "Name": "string",
        "ExcludedRules": [
          {
            "Name": "string"
          }
          ...
        ]
      }
    },
    "Action": {
      "Block": {

      },
      "Allow": {

      },
      "Count": {

      }
    },
    "OverrideAction": {
      "Count": {

      },
      "None": {

      }
    },
    "VisibilityConfig": {
      "SampledRequestsEnabled": true|false,
      "CloudWatchMetricsEnabled": true|false,
      "MetricName": "string"
    }
  }
  ...
]

--cli-input-json (string) Performs service operation based on the JSON string provided. The JSON string follows the format provided by --generate-cli-skeleton. If other arguments are provided on the command line, the CLI values will override the JSON-provided values. It is not possible to pass arbitrary binary values using a JSON-provided value as the string will be taken literally.

--generate-cli-skeleton (string) Prints a JSON skeleton to standard output without sending an API request. If provided with no value or the value input, prints a sample input JSON that can be used as an argument for --cli-input-json. If provided with the value output, it validates the command inputs and returns a sample output JSON for that command.

See 'aws help' for descriptions of global parameters.

Examples

To obtain the capacity used by a set of rules

The following check-capacity retrieves the capacity requirements for a rule set that contains a rate-based rule statement, and an AND rule statement that contains nested rules.

aws wafv2 check-capacity \
    --scope REGIONAL \
    --rules file://waf-rule-list.json \
    --region us-west-2

Contents of file://waf-rule-list.json:

[
    {
        "Name":"basic-rule",
        "Priority":0,
        "Statement":{
            "AndStatement":{
                "Statements":[
                    {
                        "ByteMatchStatement":{
                            "SearchString":"example.com",
                            "FieldToMatch":{
                                "SingleHeader":{
                                    "Name":"host"
                                }
                            },
                            "TextTransformations":[
                                {
                                    "Priority":0,
                                    "Type":"LOWERCASE"
                                }
                            ],
                            "PositionalConstraint":"EXACTLY"
                        }
                    },
                    {
                        "GeoMatchStatement":{
                            "CountryCodes":[
                                "US",
                                "IN"
                            ]
                        }
                    }
                ]
            }
        },
        "Action":{
            "Allow":{

            }
        },
        "VisibilityConfig":{
            "SampledRequestsEnabled":true,
            "CloudWatchMetricsEnabled":true,
            "MetricName":"basic-rule"
        }
    },
    {
        "Name":"rate-rule",
        "Priority":1,
        "Statement":{
            "RateBasedStatement":{
                "Limit":1000,
                "AggregateKeyType":"IP"
            }
        },
        "Action":{
            "Block":{

            }
        },
        "VisibilityConfig":{
            "SampledRequestsEnabled":true,
            "CloudWatchMetricsEnabled":true,
            "MetricName":"rate-rule"
        }
    }
]

Output:

{
    "Capacity":15
}

For more information, see AWS WAF Web ACL Capacity Units (WCU) in the AWS WAF, AWS Firewall Manager, and AWS Shield Advanced Developer Guide.

Output

Capacity -> (long)

The capacity required by the rules and scope.