Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet . For each SqlInjectionMatchTuple object, you specify the following values:
You use SqlInjectionMatchSet objects to specify which CloudFront requests that you want to allow, block, or count. For example, if you're receiving requests that contain snippets of SQL code in the query string and you want to block the requests, you can create a SqlInjectionMatchSet with the applicable settings, and then configure AWS WAF to block the requests.
To create and configure a SqlInjectionMatchSet , perform the following steps:
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
See 'aws help' for descriptions of global parameters.
update-sql-injection-match-set
--sql-injection-match-set-id <value>
--change-token <value>
--updates <value>
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
--sql-injection-match-set-id (string)
The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to update. SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets .
--change-token (string)
The value returned by the most recent call to GetChangeToken .
--updates (list)
An array of SqlInjectionMatchSetUpdate objects that you want to insert into or delete from a SqlInjectionMatchSet . For more information, see the applicable data types:
- SqlInjectionMatchSetUpdate : Contains Action and SqlInjectionMatchTuple
- SqlInjectionMatchTuple : Contains FieldToMatch and TextTransformation
- FieldToMatch : Contains Data and Type
Shorthand Syntax:
Action=string,SqlInjectionMatchTuple={FieldToMatch={Type=string,Data=string},TextTransformation=string} ...
JSON Syntax:
[
{
"Action": "INSERT"|"DELETE",
"SqlInjectionMatchTuple": {
"FieldToMatch": {
"Type": "URI"|"QUERY_STRING"|"HEADER"|"METHOD"|"BODY"|"SINGLE_QUERY_ARG"|"ALL_QUERY_ARGS",
"Data": "string"
},
"TextTransformation": "NONE"|"COMPRESS_WHITE_SPACE"|"HTML_ENTITY_DECODE"|"LOWERCASE"|"CMD_LINE"|"URL_DECODE"
}
}
...
]
--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.
To update a SQL Injection Match Set
The following update-sql-injection-match-set command deletes a SqlInjectionMatchTuple object (filters) in a SQL injection match set:
aws waf update-sql-injection-match-set --sql-injection-match-set-id a123fae4-b567-8e90-1234-5ab67ac8ca90 --change-token 12cs345-67cd-890b-1cd2-c3a4567d89f1 --updates Action="DELETE",SqlInjectionMatchTuple={FieldToMatch={Type="QUERY_STRING"},TextTransformation="URL_DECODE"}
For more information, see Working with SQL Injection Match Conditions in the AWS WAF developer guide.
ChangeToken -> (string)
The ChangeToken that you used to submit the UpdateSqlInjectionMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus .