Table Of Contents

Feedback

User Guide

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

[ aws . waf ]

create-regex-pattern-set

Description

Creates a RegexPatternSet . You then use update-regex-pattern-set to specify the regular expression (regex) pattern that you want AWS WAF to search for, such as B[a@]dB[o0]t . You can then configure AWS WAF to reject those requests.

To create and configure a RegexPatternSet , perform the following steps:

  • Use get-change-token to get the change token that you provide in the change-token parameter of a create-regex-pattern-set request.
  • Submit a create-regex-pattern-set request.
  • Use get-change-token to get the change token that you provide in the change-token parameter of an update-regex-pattern-set request.
  • Submit an update-regex-pattern-set request to specify the string that you want AWS WAF to watch for.

For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide .

See also: AWS API Documentation

Synopsis

  create-regex-pattern-set
--name <value>
--change-token <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]

Options

--name (string)

A friendly name or description of the RegexPatternSet . You can't change Name after you create a RegexPatternSet .

--change-token (string)

The value returned by the most recent call to get-change-token .

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

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

Output

RegexPatternSet -> (structure)

A RegexPatternSet that contains no objects.

RegexPatternSetId -> (string)

The identifier for the RegexPatternSet . You use RegexPatternSetId to get information about a RegexPatternSet , update a RegexPatternSet , remove a RegexPatternSet from a RegexMatchSet , and delete a RegexPatternSet from AWS WAF.

RegexMatchSetId is returned by create-regex-pattern-set and by list-regex-pattern-sets .

Name -> (string)

A friendly name or description of the RegexPatternSet . You can't change Name after you create a RegexPatternSet .

RegexPatternStrings -> (list)

Specifies the regular expression (regex) patterns that you want AWS WAF to search for, such as B[a@]dB[o0]t .

(string)

ChangeToken -> (string)

The change-token that you used to submit the create-regex-pattern-set request. You can also use this value to query the status of the request. For more information, see get-change-token-status .