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 ]

update-web-acl

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 .

Updates the specified WebACL .

A Web ACL defines a collection of rules to use to inspect and control web requests. Each rule has an action defined (allow, block, or count) for requests that match the statement of the rule. In the Web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a Web ACL can be a combination of the types Rule , RuleGroup , and managed rule group. You can associate a Web ACL with one or more AWS resources to protect. The resources can be Amazon CloudFront, an Amazon API Gateway API, or an Application Load Balancer.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  update-web-acl
--name <value>
--scope <value>
--id <value>
--default-action <value>
[--description <value>]
[--rules <value>]
--visibility-config <value>
--lock-token <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--name (string)

The name of the Web ACL. You cannot change the name of a Web ACL after you create it.

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

--id (string)

The unique identifier for the Web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.

--default-action (structure)

The action to perform if none of the Rules contained in the WebACL match.

Shorthand Syntax:

Block={},Allow={}

JSON Syntax:

{
  "Block": {

  },
  "Allow": {

  }
}

--description (string)

A description of the Web ACL that helps with identification. You cannot change the description of a Web ACL after you create it.

--rules (list)

The Rule statements used to identify the web requests that you want to allow, block, or count. Each rule includes one top-level statement that AWS WAF uses to identify matching web requests, and parameters that govern how AWS WAF handles them.

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"|"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": {
          "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"
              }
              ...
            ]
          }
        },
        "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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uleGroupReferenceStatement": {
              "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"|"B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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"
    }
  }
  ...
]

--visibility-config (structure)

Defines and enables Amazon CloudWatch metrics and web request sample collection.

Shorthand Syntax:

SampledRequestsEnabled=boolean,CloudWatchMetricsEnabled=boolean,MetricName=string

JSON Syntax:

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

--lock-token (string)

A token used for optimistic locking. AWS WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. AWS WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException . If this happens, perform another get, and use the new token returned by that operation.

--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 update a web ACL

The following update-web-acl changes the high-level configuration for an existing web ACL, and leaves the rule statements unchanged. This call requires an ID, which you can obtain from the call, list-web-acls, and a lock token which you can obtain from the calls, list-web-acls and get-web-acl. This call also returns a lock token that you can use for a subsequent update.

aws wafv2 update-web-acl \
    --name TestWebAcl \
    --scope REGIONAL \
    --id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 \
    --lock-token 2294b3a1-0000-0000-0000-a3ae04329de9 \
    --default-action Block={} \
    --visibility-config SampledRequestsEnabled=false,CloudWatchMetricsEnabled=false,MetricName=NewMetricTestWebAcl \
    --region us-west-2

Output:

{
    "NextLockToken": "714a0cfb-0000-0000-0000-2959c8b9a684"
}

For more information, see Managing and Using a Web Access Control List (Web ACL) in the AWS WAF, AWS Firewall Manager, and AWS Shield Advanced Developer Guide.

Output

NextLockToken -> (string)

A token used for optimistic locking. AWS WAF returns this token to your update requests. You use NextLockToken in the same manner as you use LockToken .