Table Of Contents

Feedback

User Guide

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

[ aws . wafv2 ]

update-rule-group

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

A rule group defines a collection of rules to inspect and control web requests that you can use in a WebACL . When you create a rule group, you define an immutable capacity limit. If you update a rule group, you must stay within the capacity. This allows others to reuse the rule group with confidence in its capacity requirements.

See also: AWS API Documentation

See 'aws help' for descriptions of global parameters.

Synopsis

  update-rule-group
--name <value>
--scope <value>
--id <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 rule group. You cannot change the name of a rule group 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)

A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.

--description (string)

A description of the rule group that helps with identification. You cannot change the description of a rule group 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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Z"|"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", ...]
      },
      "RuleGroupReferenceStatement": {
        "ARN": "string",
        "ExcludedRules": [
          {
            "Name": "string"
          }
          ...
        ]
      },
      "IPSetReferenceStatement": {
        "ARN": "string"
      },
      "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",
        "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"|"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ludedRules": [
              {
                "Name": "string"
              }
              ...
            ]
          },
          "IPSetReferenceStatement": {
            "ARN": "string"
          },
          "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",
            "ScopeDownStatement": { ... recursive ... }
          },
          "AndStatement": {
            "Statements": [
              { ... recursive ... }
              ...
            ]
          },
          "OrStatement": {
            "Statements": [
              { ... recursive ... }
              ...
            ]
          },
          "NotStatement": {
            "Statement": { ... recursive ... }
          },
          "ManagedRuleGroupStatement": {
            "VendorName": "string",
            "Name": "string",
            "ExcludedRules": [
              {
                "Name": "string"
              }
              ...
            ]
          }
        }
      },
      "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"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{
              "ARN": "string",
              "ExcludedRules": [
                {
                  "Name": "string"
                }
                ...
              ]
            },
            "IPSetReferenceStatement": {
              "ARN": "string"
            },
            "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",
              "ScopeDownStatement": { ... recursive ... }
            },
            "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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M"|"ZW", ...]
            },
            "RuleGroupReferenceStatement": {
              "ARN": "string",
              "ExcludedRules": [
                {
                  "Name": "string"
                }
                ...
              ]
            },
            "IPSetReferenceStatement": {
              "ARN": "string"
            },
            "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",
              "ScopeDownStatement": { ... recursive ... }
            },
            "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"|"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EH"|"YE"|"ZM"|"ZW", ...]
          },
          "RuleGroupReferenceStatement": {
            "ARN": "string",
            "ExcludedRules": [
              {
                "Name": "string"
              }
              ...
            ]
          },
          "IPSetReferenceStatement": {
            "ARN": "string"
          },
          "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",
            "ScopeDownStatement": { ... recursive ... }
          },
          "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 custom rule group

The following update-rule-group changes the visibility configuration for an existing custom rule group. This call requires an ID, which you can obtain from the call, list-rule-groups, and a lock token which you can obtain from the calls, list-rule-groups and get-rule-group. This call also returns a lock token that you can use for a subsequent update.

aws wafv2 update-rule-group \
    --name TestRuleGroup \
    --scope REGIONAL \
    --id a1b2c3d4-5678-90ab-cdef-EXAMPLE11111 \
    --lock-token 7b3bcec2-0000-0000-0000-563bf47249f0 \
    --visibility-config SampledRequestsEnabled=false,CloudWatchMetricsEnabled=false,MetricName=TestMetricsForRuleGroup \
    --region us-west-2

Output:

{
    "NextLockToken": "1eb5ec48-0000-0000-0000-ee9b906c541e"
}

For more information, see Managing Your Own Rule Groups 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 .