id
stringlengths
8
78
source
stringclasses
743 values
chunk_id
int64
1
5.05k
text
stringlengths
593
49.7k
waf-apiref-158
waf-apiref.pdf
158
operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 UpdateRateBasedRule 813 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference UpdateRateBasedRule 814 AWS WAFV2 UpdateRegexMatchSet Service: AWS WAF Classic Note API Reference AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes RegexMatchTuple objects (filters) in a RegexMatchSet. For each RegexMatchSetUpdate object, you specify the following values: • Whether to insert or delete the object from the array. If you want to change a RegexMatchSetUpdate object, you delete the existing object and add a new one. • The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header. • The identifier of the pattern (a regular expression) that you want AWS WAF to look for. For more information, see RegexPatternSet. • Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string. For example, you can create a RegexPatternSet that matches any requests with User-Agent headers that contain the string B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests. To create and configure a RegexMatchSet, perform the following steps: 1. Create a RegexMatchSet. For more information, see CreateRegexMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRegexMatchSet request. 3. Submit an UpdateRegexMatchSet request to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI path) and the identifier of the UpdateRegexMatchSet 815 AWS WAFV2 API Reference RegexPatternSet that contain the regular expression patterns 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. Request Syntax { "ChangeToken": "string", "RegexMatchSetId": "string", "Updates": [ { "Action": "string", "RegexMatchTuple": { "FieldToMatch": { "Data": "string", "Type": "string" }, "RegexPatternSetId": "string", "TextTransformation": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* UpdateRegexMatchSet 816 AWS WAFV2 Required: Yes RegexMatchSetId API Reference The RegexMatchSetId of the RegexMatchSet that you want to update. RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of RegexMatchSetUpdate objects that you want to insert into or delete from a RegexMatchSet. For more information, see RegexMatchTuple. Type: Array of RegexMatchSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateRegexMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. UpdateRegexMatchSet 817 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified
waf-apiref-159
waf-apiref.pdf
159
invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. UpdateRegexMatchSet 818 AWS WAFV2 HTTP Status Code: 400 WAFLimitsExceededException API Reference The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface UpdateRegexMatchSet 819 API Reference AWS WAFV2 • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateRegexMatchSet 820 AWS WAFV2 API Reference UpdateRegexPatternSet Service: AWS WAF Classic Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes RegexPatternString objects in a RegexPatternSet. For each RegexPatternString object, you specify the following values: • Whether to insert or delete the RegexPatternString. • The regular expression pattern that you want to insert or delete. For more information, see RegexPatternSet. For example, you can create a RegexPatternString such as B[a@]dB[o0]t. AWS WAF will match this RegexPatternString to: • BadBot • BadB0t • B@dBot • B@dB0t To create and configure a RegexPatternSet, perform the following steps: 1. Create a RegexPatternSet. For more information, see CreateRegexPatternSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRegexPatternSet request. 3. Submit an UpdateRegexPatternSet request to specify the regular expression pattern that you want AWS WAF to watch for. UpdateRegexPatternSet 821 AWS WAFV2 API Reference For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "RegexPatternSetId": "string", "Updates": [ { "Action": "string", "RegexPatternString": "string" } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RegexPatternSetId The RegexPatternSetId of the RegexPatternSet that you want to update. RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. UpdateRegexPatternSet 822 AWS WAFV2 Pattern: .*\S.* Required: Yes Updates API Reference An array of RegexPatternSetUpdate objects that you want to insert into or delete from a RegexPatternSet. Type: Array of RegexPatternSetUpdate objects Array Members: Minimum number of 1 item.
waf-apiref-160
waf-apiref.pdf
160
in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RegexPatternSetId The RegexPatternSetId of the RegexPatternSet that you want to update. RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. UpdateRegexPatternSet 822 AWS WAFV2 Pattern: .*\S.* Required: Yes Updates API Reference An array of RegexPatternSetUpdate objects that you want to insert into or delete from a RegexPatternSet. Type: Array of RegexPatternSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateRegexPatternSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. UpdateRegexPatternSet 823 AWS WAFV2 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidRegexPatternException The regular expression (regex) you specified in RegexPatternString is invalid. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 UpdateRegexPatternSet 824 AWS WAFV2 API Reference WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin UpdateRegexPatternSet 825 AWS WAFV2 • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference UpdateRegexPatternSet 826 AWS WAFV2 UpdateRule Service: AWS WAF Classic Note API Reference AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests that you want to allow, block, or count. If you add more than one predicate to a Rule, a request must match all of the specifications to be allowed, blocked, or counted. For example, suppose that you add the following to a Rule: • A ByteMatchSet that matches the value BadBot in the User-Agent header • An IPSet
waf-apiref-161
waf-apiref.pdf
161
the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests that you want to allow, block, or count. If you add more than one predicate to a Rule, a request must match all of the specifications to be allowed, blocked, or counted. For example, suppose that you add the following to a Rule: • A ByteMatchSet that matches the value BadBot in the User-Agent header • An IPSet that matches the IP address 192.0.2.44 You then add the Rule to a WebACL and specify that you want to block requests that satisfy the Rule. For a request to be blocked, the User-Agent header in the request must contain the value BadBot and the request must originate from the IP address 192.0.2.44. To create and configure a Rule, perform the following steps: 1. Create and update the predicates that you want to include in the Rule. 2. Create the Rule. See CreateRule. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRule request. 4. Submit an UpdateRule request to add predicates to the Rule. 5. Create and update a WebACL that contains the Rule. See CreateWebACL. If you want to replace one ByteMatchSet or IPSet with another, you delete the existing one and add the new one. UpdateRule 827 AWS WAFV2 API Reference For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "RuleId": "string", "Updates": [ { "Action": "string", "Predicate": { "DataId": "string", "Negated": boolean, "Type": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RuleId The RuleId of the Rule that you want to update. RuleId is returned by CreateRule and by ListRules. UpdateRule 828 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of RuleUpdate objects that you want to insert into or delete from a Rule. For more information, see the applicable data types: • RuleUpdate: Contains Action and Predicate • Predicate: Contains DataId, Negated, and Type • FieldToMatch: Contains Data and Type Type: Array of RuleUpdate objects Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. UpdateRule 829 AWS WAFV2 Pattern: .*\S.* Errors API Reference For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. UpdateRule 830 AWS WAFV2 API Reference • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You
waf-apiref-162
waf-apiref.pdf
162
AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. UpdateRule 830 AWS WAFV2 API Reference • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. UpdateRule 831 AWS WAFV2 HTTP Status Code: 400 WAFReferencedItemException API Reference The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateRule 832 AWS WAFV2 UpdateRuleGroup Service: AWS WAF Classic Note API Reference AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes ActivatedRule objects in a RuleGroup. You can only insert REGULAR rules into a rule group. You can have a maximum of ten rules per rule group. To create and configure a RuleGroup, perform the following steps: 1. Create and update the Rules that you want to include in the RuleGroup. See CreateRule. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRuleGroup request. 3. Submit an UpdateRuleGroup request to add Rules to the RuleGroup. 4. Create and update a WebACL that contains the RuleGroup. See CreateWebACL. If you want to replace one Rule with another, you delete the existing one and add the new one. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "RuleGroupId": "string", "Updates": [ UpdateRuleGroup 833 API Reference AWS WAFV2 { "Action": "string", "ActivatedRule": { "Action": { "Type": "string" }, "ExcludedRules": [ { "RuleId": "string" } ], "OverrideAction": { "Type": "string" }, "Priority": number, "RuleId": "string", "Type": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RuleGroupId The RuleGroupId of the RuleGroup that you want to update.
waf-apiref-163
waf-apiref.pdf
163
833 API Reference AWS WAFV2 { "Action": "string", "ActivatedRule": { "Action": { "Type": "string" }, "ExcludedRules": [ { "RuleId": "string" } ], "OverrideAction": { "Type": "string" }, "Priority": number, "RuleId": "string", "Type": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RuleGroupId The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups. UpdateRuleGroup 834 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of RuleGroupUpdate objects that you want to insert into or delete from a RuleGroup. You can only insert REGULAR rules into a rule group. ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup to a WebACL. In this case you do not use ActivatedRule|Action. For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. Type: Array of RuleGroupUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateRuleGroup request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String UpdateRuleGroup 835 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. UpdateRuleGroup 836 AWS WAFV2 API Reference • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. UpdateRuleGroup 837 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific
waf-apiref-164
waf-apiref.pdf
164
add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. UpdateRuleGroup 837 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateRuleGroup 838 AWS WAFV2 API Reference UpdateSizeConstraintSet Service: AWS WAF Classic Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. For each SizeConstraint object, you specify the following values: • Whether to insert or delete the object from the array. If you want to change a SizeConstraintSetUpdate object, you delete the existing object and add a new one. • The part of a web request that you want AWS WAF to evaluate, such as the length of a query string or the length of the User-Agent header. • Whether to perform any transformations on the request, such as converting it to lowercase, before checking its length. Note that transformations of the request body are not supported because the AWS resource forwards only the first 8192 bytes of your request to AWS WAF. You can only specify a single type of TextTransformation. • A ComparisonOperator used for evaluating the selected part of the request against the specified Size, such as equals, greater than, less than, and so on. • The length, in bytes, that you want AWS WAF to watch for in selected part of the request. The length is computed after applying the transformation. For example, you can add a SizeConstraintSetUpdate object that matches web requests in which the length of the User-Agent header is greater than 100 bytes. You can then configure AWS WAF to block those requests. To create and configure a SizeConstraintSet, perform the following steps: 1. Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet. UpdateSizeConstraintSet 839 AWS WAFV2 API Reference 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateSizeConstraintSet request. 3. Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI path) and the value 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. Request Syntax { "ChangeToken": "string", "SizeConstraintSetId": "string", "Updates": [ { "Action": "string", "SizeConstraint": { "ComparisonOperator": "string", "FieldToMatch": { "Data": "string", "Type": "string" }, "Size": number, "TextTransformation": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String UpdateSizeConstraintSet 840 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes SizeConstraintSetId The SizeConstraintSetId of the SizeConstraintSet that you want to update. SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of SizeConstraintSetUpdate objects that you want to insert into or delete from a SizeConstraintSet. For more information, see the applicable data types: • SizeConstraintSetUpdate: Contains Action and SizeConstraint • SizeConstraint: Contains FieldToMatch, TextTransformation, ComparisonOperator, and Size • FieldToMatch: Contains Data and Type Type: Array of SizeConstraintSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. UpdateSizeConstraintSet 841 AWS WAFV2 API Reference The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateSizeConstraintSet request. You can also use this value to query the
waf-apiref-165
waf-apiref.pdf
165
For more information, see the applicable data types: • SizeConstraintSetUpdate: Contains Action and SizeConstraint • SizeConstraint: Contains FieldToMatch, TextTransformation, ComparisonOperator, and Size • FieldToMatch: Contains Data and Type Type: Array of SizeConstraintSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. UpdateSizeConstraintSet 841 AWS WAFV2 API Reference The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateSizeConstraintSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. UpdateSizeConstraintSet 842 AWS WAFV2 API Reference • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. UpdateSizeConstraintSet 843 AWS WAFV2 API Reference • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 UpdateSizeConstraintSet 844 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference UpdateSizeConstraintSet 845 AWS WAFV2 API Reference UpdateSqlInjectionMatchSet Service: AWS WAF Classic Note AWS WAF Classic support will end on September
waf-apiref-166
waf-apiref.pdf
166
See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 UpdateSizeConstraintSet 844 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference UpdateSizeConstraintSet 845 AWS WAFV2 API Reference UpdateSqlInjectionMatchSet Service: AWS WAF Classic Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. For each SqlInjectionMatchTuple object, you specify the following values: • Action: Whether to insert the object into or delete the object from the array. To change a SqlInjectionMatchTuple, you delete the existing object and add a new one. • FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, the name of the header or parameter. • TextTransformation: Which text transformation, if any, to perform on the web request before inspecting the request for snippets of malicious SQL code. You can only specify a single type of TextTransformation. You use SqlInjectionMatchSet objects to specify which Amazon 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: 1. Submit a CreateSqlInjectionMatchSet request. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateIPSet request. UpdateSqlInjectionMatchSet 846 AWS WAFV2 API Reference 3. Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests that you want AWS WAF to inspect for snippets of SQL code. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "SqlInjectionMatchSetId": "string", "Updates": [ { "Action": "string", "SqlInjectionMatchTuple": { "FieldToMatch": { "Data": "string", "Type": "string" }, "TextTransformation": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes UpdateSqlInjectionMatchSet 847 AWS WAFV2 SqlInjectionMatchSetId API Reference The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to update. SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates 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 Type: Array of SqlInjectionMatchSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. UpdateSqlInjectionMatchSet 848 AWS WAFV2 ChangeToken API Reference 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. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in
waf-apiref-167
waf-apiref.pdf
167
the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. UpdateSqlInjectionMatchSet 849 AWS WAFV2 HTTP Status Code: 400 WAFInvalidParameterException API Reference The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. UpdateSqlInjectionMatchSet 850 AWS WAFV2 API Reference • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateSqlInjectionMatchSet 851 AWS WAFV2 UpdateWebACL Service: AWS WAF Classic Note API Reference AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies web requests that you want to allow, block, or count. When you update a WebACL, you specify the following values: • A default action for the WebACL, either ALLOW or BLOCK. AWS WAF performs the default action if a request doesn't match the criteria in any of the Rules in a WebACL. • The Rules that you want to add or delete. If you want to replace one Rule with another, you delete the existing Rule and add the new one. • For each Rule, whether you want AWS WAF to allow requests, block requests, or count requests that match the conditions in the Rule. • The order in which you want AWS WAF to evaluate the Rules in a WebACL. If you add more than one Rule to a WebACL, AWS WAF evaluates each request against the
waf-apiref-168
waf-apiref.pdf
168
a request doesn't match the criteria in any of the Rules in a WebACL. • The Rules that you want to add or delete. If you want to replace one Rule with another, you delete the existing Rule and add the new one. • For each Rule, whether you want AWS WAF to allow requests, block requests, or count requests that match the conditions in the Rule. • The order in which you want AWS WAF to evaluate the Rules in a WebACL. If you add more than one Rule to a WebACL, AWS WAF evaluates each request against the Rules in order based on the value of Priority. (The Rule that has the lowest value for Priority is evaluated first.) When a web request matches all the predicates (such as ByteMatchSets and IPSets) in a Rule, AWS WAF immediately takes the corresponding action, allow or block, and doesn't evaluate the request against the remaining Rules in the WebACL, if any. To create and configure a WebACL, perform the following steps: 1. Create and update the predicates that you want to include in Rules. For more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet. 2. Create and update the Rules that you want to include in the WebACL. For more information, see CreateRule and UpdateRule. UpdateWebACL 852 AWS WAFV2 API Reference 3. Create a WebACL. See CreateWebACL. 4. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateWebACL request. 5. Submit an UpdateWebACL request to specify the Rules that you want to include in the WebACL, to specify the default action, and to associate the WebACL with an Amazon CloudFront distribution. The ActivatedRule can be a rule group. If you specify a rule group as your ActivatedRule, you can exclude specific rules from that rule group. If you already have a rule group associated with a web ACL and want to submit an UpdateWebACL request to exclude certain rules from that rule group, you must first remove the rule group from the web ACL, the re-insert it again, specifying the excluded rules. For details, see ActivatedRule:ExcludedRules. Be aware that if you try to add a RATE_BASED rule to a web ACL without setting the rule type when first creating the rule, the UpdateWebACL request will fail because the request tries to add a REGULAR rule (the default rule type) with the specified ID, which does not exist. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "DefaultAction": { "Type": "string" }, "Updates": [ { "Action": "string", "ActivatedRule": { "Action": { "Type": "string" }, "ExcludedRules": [ { "RuleId": "string" } UpdateWebACL 853 API Reference AWS WAFV2 ], "OverrideAction": { "Type": "string" }, "Priority": number, "RuleId": "string", "Type": "string" } } ], "WebACLId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes DefaultAction Type: WafAction object Required: No Updates An array of updates to make to the WebACL. An array of WebACLUpdate objects that you want to insert into or delete from a WebACL. For more information, see the applicable data types: • WebACLUpdate: Contains Action and ActivatedRule UpdateWebACL 854 AWS WAFV2 API Reference • ActivatedRule: Contains Action, OverrideAction, Priority, RuleId, and Type. ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup to a WebACL. In this case, you do not use ActivatedRule|Action. For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. • WafAction: Contains Type Type: Array of WebACLUpdate objects Required: No WebACLId The WebACLId of the WebACL that you want to update. WebACLId is returned by CreateWebACL and by ListWebACLs. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateWebACL request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String UpdateWebACL 855 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete
waf-apiref-169
waf-apiref.pdf
169
the service. ChangeToken The ChangeToken that you used to submit the UpdateWebACL request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String UpdateWebACL 855 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. UpdateWebACL 856 AWS WAFV2 API Reference • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. UpdateWebACL 857 AWS WAFV2 HTTP Status Code: 400 WAFReferencedItemException API Reference The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFSubscriptionNotFoundException The specified subscription does not exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateWebACL 858 AWS WAFV2 UpdateXssMatchSet Service: AWS WAF Classic Note API Reference AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For each
waf-apiref-170
waf-apiref.pdf
170
PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateWebACL 858 AWS WAFV2 UpdateXssMatchSet Service: AWS WAF Classic Note API Reference AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For each XssMatchTuple object, you specify the following values: • Action: Whether to insert the object into or delete the object from the array. To change an XssMatchTuple, you delete the existing object and add a new one. • FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, the name of the header or parameter. • TextTransformation: Which text transformation, if any, to perform on the web request before inspecting the request for cross-site scripting attacks. You can only specify a single type of TextTransformation. You use XssMatchSet objects to specify which Amazon CloudFront requests that you want to allow, block, or count. For example, if you're receiving requests that contain cross-site scripting attacks in the request body and you want to block the requests, you can create an XssMatchSet with the applicable settings, and then configure AWS WAF to block the requests. To create and configure an XssMatchSet, perform the following steps: 1. Submit a CreateXssMatchSet request. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateIPSet request. 3. Submit an UpdateXssMatchSet request to specify the parts of web requests that you want AWS WAF to inspect for cross-site scripting attacks. UpdateXssMatchSet 859 AWS WAFV2 API Reference For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "Updates": [ { "Action": "string", "XssMatchTuple": { "FieldToMatch": { "Data": "string", "Type": "string" }, "TextTransformation": "string" } } ], "XssMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of XssMatchSetUpdate objects that you want to insert into or delete from an XssMatchSet. For more information, see the applicable data types: UpdateXssMatchSet 860 AWS WAFV2 API Reference • XssMatchSetUpdate: Contains Action and XssMatchTuple • XssMatchTuple: Contains FieldToMatch and TextTransformation • FieldToMatch: Contains Data and Type Type: Array of XssMatchSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes XssMatchSetId The XssMatchSetId of the XssMatchSet that you want to update. XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateXssMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String UpdateXssMatchSet 861 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. UpdateXssMatchSet 862 AWS
waf-apiref-171
waf-apiref.pdf
171
IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. UpdateXssMatchSet 862 AWS WAFV2 API Reference • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. UpdateXssMatchSet 863 AWS WAFV2 HTTP Status Code: 400 WAFStaleDataException API Reference The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 AWS WAF Classic Regional The following actions are supported by AWS WAF Classic Regional: • AssociateWebACL • CreateByteMatchSet • CreateGeoMatchSet • CreateIPSet • CreateRateBasedRule • CreateRegexMatchSet AWS WAF Classic Regional 864 API Reference AWS WAFV2 • CreateRegexPatternSet • CreateRule • CreateRuleGroup • CreateSizeConstraintSet • CreateSqlInjectionMatchSet • CreateWebACL • CreateWebACLMigrationStack • CreateXssMatchSet • DeleteByteMatchSet • DeleteGeoMatchSet • DeleteIPSet • DeleteLoggingConfiguration • DeletePermissionPolicy • DeleteRateBasedRule • DeleteRegexMatchSet • DeleteRegexPatternSet • DeleteRule • DeleteRuleGroup • DeleteSizeConstraintSet • DeleteSqlInjectionMatchSet • DeleteWebACL • DeleteXssMatchSet • DisassociateWebACL • GetByteMatchSet • GetChangeToken • GetChangeTokenStatus • GetGeoMatchSet • GetIPSet • GetLoggingConfiguration • GetPermissionPolicy AWS WAF Classic Regional 865 API Reference AWS WAFV2 • GetRateBasedRule • GetRateBasedRuleManagedKeys • GetRegexMatchSet • GetRegexPatternSet • GetRule • GetRuleGroup • GetSampledRequests • GetSizeConstraintSet • GetSqlInjectionMatchSet • GetWebACL • GetWebACLForResource • GetXssMatchSet • ListActivatedRulesInRuleGroup • ListByteMatchSets • ListGeoMatchSets • ListIPSets • ListLoggingConfigurations • ListRateBasedRules • ListRegexMatchSets • ListRegexPatternSets • ListResourcesForWebACL • ListRuleGroups • ListRules • ListSizeConstraintSets • ListSqlInjectionMatchSets • ListSubscribedRuleGroups • ListTagsForResource • ListWebACLs • ListXssMatchSets • PutLoggingConfiguration AWS WAF Classic Regional 866 API Reference AWS WAFV2 • PutPermissionPolicy • TagResource • UntagResource • UpdateByteMatchSet • UpdateGeoMatchSet • UpdateIPSet • UpdateRateBasedRule • UpdateRegexMatchSet • UpdateRegexPatternSet • UpdateRule • UpdateRuleGroup • UpdateSizeConstraintSet • UpdateSqlInjectionMatchSet • UpdateWebACL • UpdateXssMatchSet AWS WAF Classic Regional 867 AWS WAFV2 API Reference AssociateWebACL Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Associates a web ACL with a resource, either an application load balancer or
waf-apiref-172
waf-apiref.pdf
172
UpdateSizeConstraintSet • UpdateSqlInjectionMatchSet • UpdateWebACL • UpdateXssMatchSet AWS WAF Classic Regional 867 AWS WAFV2 API Reference AssociateWebACL Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Associates a web ACL with a resource, either an application load balancer or Amazon API Gateway stage. Request Syntax { "ResourceArn": "string", "WebACLId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The ARN (Amazon Resource Name) of the resource to be protected, either an application load balancer or Amazon API Gateway stage. The ARN should be in one of the following formats: • For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account- id:loadbalancer/app/load-balancer-name/load-balancer-id • For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/ stages/stage-name AssociateWebACL 868 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes WebACLId A unique identifier (ID) for the web ACL. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: AssociateWebACL 869 AWS WAFV2 API Reference • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFUnavailableEntityException The operation failed because the entity referenced is temporarily unavailable. Retry your request. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 AssociateWebACL 870 AWS WAFV2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference AssociateWebACL 871 AWS WAFV2 API Reference CreateByteMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a ByteMatchSet. You then use UpdateByteMatchSet to identify the part of a web request that you want AWS WAF to inspect, such as the values of the User-Agent header or the query string. For example, you can create a ByteMatchSet that matches any requests with User-Agent headers that contain the string BadBot. You can then configure AWS WAF to reject those requests. To create and configure a ByteMatchSet, perform the following steps: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateByteMatchSet request. 2. Submit a CreateByteMatchSet request. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateByteMatchSet request. 4. Submit an UpdateByteMatchSet request to specify the part of the request that you want AWS
waf-apiref-173
waf-apiref.pdf
173
query string. For example, you can create a ByteMatchSet that matches any requests with User-Agent headers that contain the string BadBot. You can then configure AWS WAF to reject those requests. To create and configure a ByteMatchSet, perform the following steps: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateByteMatchSet request. 2. Submit a CreateByteMatchSet request. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateByteMatchSet request. 4. Submit an UpdateByteMatchSet request to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI path) and the value 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. Request Syntax { "ChangeToken": "string", "Name": "string" CreateByteMatchSet 872 AWS WAFV2 } Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description of the ByteMatchSet. You can't change Name after you create a ByteMatchSet. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ByteMatchSet": { "ByteMatchSetId": "string", "ByteMatchTuples": [ { "FieldToMatch": { "Data": "string", CreateByteMatchSet 873 AWS WAFV2 API Reference "Type": "string" }, "PositionalConstraint": "string", "TargetString": blob, "TextTransformation": "string" } ], "Name": "string" }, "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ByteMatchSet A ByteMatchSet that contains no ByteMatchTuple objects. Type: ByteMatchSet object ChangeToken The ChangeToken that you used to submit the CreateByteMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. CreateByteMatchSet 874 AWS WAFV2 HTTP Status Code: 400 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. CreateByteMatchSet 875 AWS WAFV2 HTTP Status Code: 400 WAFStaleDataException API Reference The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateByteMatchSet 876 AWS WAFV2 API Reference CreateGeoMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API
waf-apiref-174
waf-apiref.pdf
174
for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateByteMatchSet 876 AWS WAFV2 API Reference CreateGeoMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates an GeoMatchSet, which you use to specify which web requests you want to allow or block based on the country that the requests originate from. For example, if you're receiving a lot of requests from one or more countries and you want to block the requests, you can create an GeoMatchSet that contains those countries and then configure AWS WAF to block the requests. To create and configure a GeoMatchSet, perform the following steps: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateGeoMatchSet request. 2. Submit a CreateGeoMatchSet request. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateGeoMatchSet request. 4. Submit an UpdateGeoMatchSetSet request to specify the countries 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. Request Syntax { "ChangeToken": "string", "Name": "string" } CreateGeoMatchSet 877 AWS WAFV2 Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description of the GeoMatchSet. You can't change Name after you create the GeoMatchSet. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string", "GeoMatchSet": { "GeoMatchConstraints": [ { "Type": "string", "Value": "string" } ], "GeoMatchSetId": "string", CreateGeoMatchSet 878 AWS WAFV2 "Name": "string" } } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateGeoMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* GeoMatchSet The GeoMatchSet returned in the CreateGeoMatchSet response. The GeoMatchSet contains no GeoMatchConstraints. Type: GeoMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 CreateGeoMatchSet 879 AWS WAFV2 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. CreateGeoMatchSet 880 AWS WAFV2
waf-apiref-175
waf-apiref.pdf
175
but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. CreateGeoMatchSet 880 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateGeoMatchSet 881 AWS WAFV2 API Reference CreateIPSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates an IPSet, which you use to specify which web requests that you want to allow or block based on the IP addresses that the requests originate from. For example, if you're receiving a lot of requests from one or more individual IP addresses or one or more ranges of IP addresses and you want to block the requests, you can create an IPSet that contains those IP addresses and then configure AWS WAF to block the requests. To create and configure an IPSet, perform the following steps: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateIPSet request. 2. Submit a CreateIPSet request. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateIPSet request. 4. Submit an UpdateIPSet request to specify the IP addresses 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. Request Syntax { "ChangeToken": "string", "Name": "string" CreateIPSet 882 AWS WAFV2 } Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description of the IPSet. You can't change Name after you create the IPSet. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string", "IPSet": { "IPSetDescriptors": [ { "Type": "string", "Value": "string" } ], CreateIPSet 883 AWS WAFV2 API Reference "IPSetId": "string", "Name": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateIPSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* IPSet The IPSet returned in the CreateIPSet response. Type: IPSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 CreateIPSet 884 AWS WAFV2 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a
waf-apiref-176
waf-apiref.pdf
176
or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. CreateIPSet 885 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateIPSet 886 AWS WAFV2 API Reference CreateRateBasedRule Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a RateBasedRule. The RateBasedRule contains a RateLimit, which specifies the maximum number of requests that AWS WAF allows from a specified IP address in a five-minute period. The RateBasedRule also contains the IPSet objects, ByteMatchSet objects, and other predicates that identify the requests that you want to count or block if these requests exceed the RateLimit. If you add more than one predicate to a RateBasedRule, a request not only must exceed the RateLimit, but it also must match all the conditions to be counted or blocked. For example, suppose you add the following to a RateBasedRule: • An IPSet that matches the IP address 192.0.2.44/32 • A ByteMatchSet that matches BadBot in the User-Agent header Further, you specify a RateLimit of 1,000. You then add the RateBasedRule to a WebACL and specify that you want to block requests that meet the conditions in the rule. For a request to be blocked, it must come from the IP address 192.0.2.44 and the User-Agent header in the request must contain the value BadBot. Further, requests that match these two conditions must be received at a rate of more than 1,000 requests every five minutes. If both conditions are met and the rate is exceeded, AWS WAF blocks the requests. If the rate drops below 1,000 for a five-minute period, AWS WAF no longer blocks the requests. As a second example, suppose you want to limit requests to a particular page on your site. To do this, you could add the following to a RateBasedRule: CreateRateBasedRule 887 AWS WAFV2 API Reference • A ByteMatchSet with FieldToMatch of URI • A PositionalConstraint of STARTS_WITH • A TargetString of login Further, you specify a RateLimit of 1,000. By adding this RateBasedRule to a WebACL, you could limit requests to your login page without affecting the rest of your site. To create and configure a RateBasedRule, perform the following steps: 1. Create and update the predicates that you want to include in the rule. For more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateRule request. 3. Submit a CreateRateBasedRule request. 4. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRule request. 5. Submit an UpdateRateBasedRule request to specify the predicates that you want to include in the rule. 6. Create and
waf-apiref-177
waf-apiref.pdf
177
the rest of your site. To create and configure a RateBasedRule, perform the following steps: 1. Create and update the predicates that you want to include in the rule. For more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateRule request. 3. Submit a CreateRateBasedRule request. 4. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRule request. 5. Submit an UpdateRateBasedRule request to specify the predicates that you want to include in the rule. 6. Create and update a WebACL that contains the RateBasedRule. For more information, see CreateWebACL. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "MetricName": "string", "Name": "string", "RateKey": "string", "RateLimit": number, "Tags": [ { CreateRateBasedRule 888 AWS WAFV2 "Key": "string", "Value": "string" } ] } Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The ChangeToken that you used to submit the CreateRateBasedRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes MetricName A friendly name or description for the metrics for this RateBasedRule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after you create the RateBasedRule. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes CreateRateBasedRule 889 AWS WAFV2 Name API Reference A friendly name or description of the RateBasedRule. You can't change the name of a RateBasedRule after you create it. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RateKey The field that AWS WAF uses to determine if requests are likely arriving from a single source and thus subject to rate monitoring. The only valid value for RateKey is IP. IP indicates that requests that arrive from the same IP address are subject to the RateLimit that is specified in the RateBasedRule. Type: String Valid Values: IP Required: Yes RateLimit The maximum number of requests, which have an identical value in the field that is specified by RateKey, allowed in a five-minute period. If the number of requests exceeds the RateLimit and the other predicates specified in the rule are also met, AWS WAF triggers the action that is specified for this rule. Type: Long Valid Range: Minimum value of 100. Maximum value of 2000000000. Required: Yes Tags Type: Array of Tag objects Array Members: Minimum number of 1 item. CreateRateBasedRule 890 API Reference AWS WAFV2 Required: No Response Syntax { "ChangeToken": "string", "Rule": { "MatchPredicates": [ { "DataId": "string", "Negated": boolean, "Type": "string" } ], "MetricName": "string", "Name": "string", "RateKey": "string", "RateLimit": number, "RuleId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateRateBasedRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Rule The RateBasedRule that is returned in the CreateRateBasedRule response. CreateRateBasedRule 891 AWS WAFV2 Type: RateBasedRule object Errors API Reference For information about the errors that are common to all actions, see Common Errors. WAFBadRequestException HTTP Status Code: 400 WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but
waf-apiref-178
waf-apiref.pdf
178
• You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. CreateRateBasedRule 892 AWS WAFV2 API Reference • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin CreateRateBasedRule 893 AWS WAFV2 • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference CreateRateBasedRule 894 AWS WAFV2 API Reference CreateRegexMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a RegexMatchSet. You then use UpdateRegexMatchSet to identify the part of a web request that you want AWS WAF to inspect, such as the values of the User-Agent header or the query string. For example, you can create a RegexMatchSet that contains a RegexMatchTuple that looks for any requests with User-Agent headers that match a RegexPatternSet with pattern B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests. To create and configure a RegexMatchSet, perform the following steps: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateRegexMatchSet request. 2. Submit a CreateRegexMatchSet request. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRegexMatchSet request. 4. Submit an UpdateRegexMatchSet request to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI path) and the value, using a RegexPatternSet, 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. Request Syntax { "ChangeToken": "string", CreateRegexMatchSet 895 AWS WAFV2 "Name": "string" } Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description of the RegexMatchSet. You can't change Name after you create a RegexMatchSet. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string", "RegexMatchSet": { "Name": "string", "RegexMatchSetId": "string", "RegexMatchTuples": [ CreateRegexMatchSet 896 API Reference AWS WAFV2 { "FieldToMatch": { "Data": "string", "Type": "string" }, "RegexPatternSetId": "string", "TextTransformation": "string" } ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateRegexMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* RegexMatchSet A RegexMatchSet that contains no RegexMatchTuple objects. Type: RegexMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. CreateRegexMatchSet 897 AWS WAFV2 HTTP
waf-apiref-179
waf-apiref.pdf
179
successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateRegexMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* RegexMatchSet A RegexMatchSet that contains no RegexMatchTuple objects. Type: RegexMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. CreateRegexMatchSet 897 AWS WAFV2 HTTP Status Code: 400 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateRegexMatchSet 898 AWS WAFV2 API Reference CreateRegexMatchSet 899 AWS WAFV2 API Reference CreateRegexPatternSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a RegexPatternSet. You then use UpdateRegexPatternSet 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: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateRegexPatternSet request. 2. Submit a CreateRegexPatternSet request. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRegexPatternSet request. 4. Submit an UpdateRegexPatternSet 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. Request Syntax { "ChangeToken": "string", "Name": "string" } CreateRegexPatternSet 900 AWS WAFV2 Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description of the RegexPatternSet. You can't change Name after you create a RegexPatternSet. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string", "RegexPatternSet": { "Name": "string", "RegexPatternSetId": "string", "RegexPatternStrings": [ "string" ] } } CreateRegexPatternSet 901 AWS WAFV2 Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateRegexPatternSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* RegexPatternSet A RegexPatternSet that contains no objects. Type: RegexPatternSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 CreateRegexPatternSet 902 AWS WAFV2 WAFLimitsExceededException API Reference The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been
waf-apiref-180
waf-apiref.pdf
180
name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 CreateRegexPatternSet 902 AWS WAFV2 WAFLimitsExceededException API Reference The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateRegexPatternSet 903 AWS WAFV2 API Reference CreateRule Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a Rule, which contains the IPSet objects, ByteMatchSet objects, and other predicates that identify the requests that you want to block. If you add more than one predicate to a Rule, a request must match all of the specifications to be allowed or blocked. For example, suppose that you add the following to a Rule: • An IPSet that matches the IP address 192.0.2.44/32 • A ByteMatchSet that matches BadBot in the User-Agent header You then add the Rule to a WebACL and specify that you want to blocks requests that satisfy the Rule. For a request to be blocked, it must come from the IP address 192.0.2.44 and the User- Agent header in the request must contain the value BadBot. To create and configure a Rule, perform the following steps: 1. Create and update the predicates that you want to include in the Rule. For more information, see CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateRule request. 3. Submit a CreateRule request. 4. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRule request. 5. Submit an UpdateRule request to specify the predicates that you want to include in the Rule. 6. Create and update a WebACL that contains the Rule. For more information, see CreateWebACL. CreateRule 904 AWS WAFV2 API Reference For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "MetricName": "string", "Name": "string", "Tags": [ { "Key": "string", "Value": "string" } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes MetricName A friendly name or description for the metrics for this Rule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after you create the Rule. Type: String CreateRule 905 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description of the Rule. You can't change the name of a Rule after you create it. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Tags Type: Array of Tag objects Array Members: Minimum number of 1 item. Required: No Response Syntax { "ChangeToken": "string", "Rule": { "MetricName": "string", "Name": "string", "Predicates": [ { "DataId": "string", "Negated": boolean, "Type": "string" } ], "RuleId": "string" } CreateRule 906 AWS WAFV2 } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateRule request. You can also use this value to query the status of the request. For
waf-apiref-181
waf-apiref.pdf
181
Required: Yes Tags Type: Array of Tag objects Array Members: Minimum number of 1 item. Required: No Response Syntax { "ChangeToken": "string", "Rule": { "MetricName": "string", "Name": "string", "Predicates": [ { "DataId": "string", "Negated": boolean, "Type": "string" } ], "RuleId": "string" } CreateRule 906 AWS WAFV2 } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Rule The Rule returned in the CreateRule response. Type: Rule object Errors For information about the errors that are common to all actions, see Common Errors. WAFBadRequestException HTTP Status Code: 400 WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. CreateRule 907 AWS WAFV2 HTTP Status Code: 500 WAFInvalidParameterException API Reference The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 CreateRule 908 AWS WAFV2 API Reference WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateRule 909 AWS WAFV2 API Reference CreateRuleGroup Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a RuleGroup. A rule group is a collection of predefined rules that you add to a web ACL. You use UpdateRuleGroup to add rules to the rule group. Rule groups are subject to the following limits: • Three rule groups per account. You can request an increase to this limit by contacting customer support. • One rule group per web ACL. • Ten rules per rule group. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "MetricName": "string", "Name": "string", "Tags": [ { "Key": "string", "Value": "string" } ] CreateRuleGroup 910 AWS WAFV2 } Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes MetricName A friendly name or description for the metrics for this RuleGroup. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name
waf-apiref-182
waf-apiref.pdf
182
For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes MetricName A friendly name or description for the metrics for this RuleGroup. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after you create the RuleGroup. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description of the RuleGroup. You can't change Name after you create a RuleGroup. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. CreateRuleGroup 911 API Reference AWS WAFV2 Pattern: .*\S.* Required: Yes Tags Type: Array of Tag objects Array Members: Minimum number of 1 item. Required: No Response Syntax { "ChangeToken": "string", "RuleGroup": { "MetricName": "string", "Name": "string", "RuleGroupId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateRuleGroup request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* RuleGroup An empty RuleGroup. CreateRuleGroup 912 AWS WAFV2 Type: RuleGroup object Errors API Reference For information about the errors that are common to all actions, see Common Errors. WAFBadRequestException HTTP Status Code: 400 WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException CreateRuleGroup 913 AWS WAFV2 HTTP Status Code: 500 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateRuleGroup 914 AWS WAFV2 API Reference CreateSizeConstraintSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify the part of a web request that you want AWS WAF to check for length, such as the length of the User-Agent header or the length of the query string. For example, you can create a SizeConstraintSet that matches any requests that have a query string that is longer than 100 bytes. You can then configure AWS WAF to reject those requests. To create and configure a SizeConstraintSet, perform the following steps: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateSizeConstraintSet request. 2. Submit a CreateSizeConstraintSet request. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateSizeConstraintSet request. 4. Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI path) and the value 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. Request Syntax { "ChangeToken": "string", CreateSizeConstraintSet 915 AWS WAFV2 "Name": "string" } Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type:
waf-apiref-183
waf-apiref.pdf
183
that you want AWS WAF to inspect (for example, the header or the URI path) and the value 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. Request Syntax { "ChangeToken": "string", CreateSizeConstraintSet 915 AWS WAFV2 "Name": "string" } Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description of the SizeConstraintSet. You can't change Name after you create a SizeConstraintSet. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string", "SizeConstraintSet": { "Name": "string", "SizeConstraints": [ { "ComparisonOperator": "string", CreateSizeConstraintSet 916 AWS WAFV2 API Reference "FieldToMatch": { "Data": "string", "Type": "string" }, "Size": number, "TextTransformation": "string" } ], "SizeConstraintSetId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateSizeConstraintSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* SizeConstraintSet A SizeConstraintSet that contains no SizeConstraint objects. Type: SizeConstraintSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. CreateSizeConstraintSet 917 AWS WAFV2 HTTP Status Code: 400 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. CreateSizeConstraintSet 918 AWS WAFV2 HTTP Status Code: 400 WAFStaleDataException API Reference The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateSizeConstraintSet 919 AWS WAFV2 API Reference CreateSqlInjectionMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests that contain snippets of SQL code in a specified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings. To create and configure a SqlInjectionMatchSet, perform the following steps: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateSqlInjectionMatchSet request. 2. Submit a CreateSqlInjectionMatchSet request.
waf-apiref-184
waf-apiref.pdf
184
the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests that contain snippets of SQL code in a specified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings. To create and configure a SqlInjectionMatchSet, perform the following steps: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateSqlInjectionMatchSet request. 2. Submit a CreateSqlInjectionMatchSet request. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateSqlInjectionMatchSet request. 4. Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests in which you want to allow, block, or count malicious SQL code. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "Name": "string" } CreateSqlInjectionMatchSet 920 AWS WAFV2 Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description for the SqlInjectionMatchSet that you're creating. You can't change Name after you create the SqlInjectionMatchSet. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string", "SqlInjectionMatchSet": { "Name": "string", "SqlInjectionMatchSetId": "string", "SqlInjectionMatchTuples": [ { "FieldToMatch": { "Data": "string", "Type": "string" }, CreateSqlInjectionMatchSet 921 AWS WAFV2 API Reference "TextTransformation": "string" } ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateSqlInjectionMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* SqlInjectionMatchSet A SqlInjectionMatchSet. Type: SqlInjectionMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. CreateSqlInjectionMatchSet 922 AWS WAFV2 HTTP Status Code: 500 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. CreateSqlInjectionMatchSet 923 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateSqlInjectionMatchSet 924 AWS WAFV2 API Reference CreateWebACL Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the
waf-apiref-185
waf-apiref.pdf
185
the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateSqlInjectionMatchSet 924 AWS WAFV2 API Reference CreateWebACL Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates a WebACL, which contains the Rules that identify the Amazon CloudFront web requests that you want to allow, block, or count. AWS WAF evaluates Rules in order based on the value of Priority for each Rule. You also specify a default action, either ALLOW or BLOCK. If a web request doesn't match any of the Rules in a WebACL, AWS WAF responds to the request with the default action. To create and configure a WebACL, perform the following steps: 1. Create and update the ByteMatchSet objects and other predicates that you want to include in Rules. For more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet. 2. Create and update the Rules that you want to include in the WebACL. For more information, see CreateRule and UpdateRule. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateWebACL request. 4. Submit a CreateWebACL request. 5. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateWebACL request. 6. Submit an UpdateWebACL request to specify the Rules that you want to include in the WebACL, to specify the default action, and to associate the WebACL with an Amazon CloudFront distribution. CreateWebACL 925 AWS WAFV2 API Reference For more information about how to use the AWS WAF API, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "DefaultAction": { "Type": "string" }, "MetricName": "string", "Name": "string", "Tags": [ { "Key": "string", "Value": "string" } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes DefaultAction The action that you want AWS WAF to take when a request doesn't match the criteria specified in any of the Rule objects that are associated with the WebACL. Type: WafAction object CreateWebACL 926 AWS WAFV2 Required: Yes MetricName API Reference A friendly name or description for the metrics for this WebACL.The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the WebACL. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description of the WebACL. You can't change Name after you create the WebACL. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Tags Type: Array of Tag objects Array Members: Minimum number of 1 item. Required: No Response Syntax { "ChangeToken": "string", "WebACL": { "DefaultAction": { CreateWebACL 927 AWS WAFV2 API Reference "Type": "string" }, "MetricName": "string", "Name": "string", "Rules": [ { "Action": { "Type": "string" }, "ExcludedRules": [ { "RuleId": "string" } ], "OverrideAction": { "Type": "string" }, "Priority": number, "RuleId": "string", "Type": "string" } ], "WebACLArn": "string", "WebACLId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateWebACL request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* CreateWebACL 928 AWS WAFV2 WebACL The WebACL returned in the CreateWebACL response. API Reference Type: WebACL object Errors For information about the errors that are common to all actions, see Common Errors. WAFBadRequestException HTTP Status Code: 400 WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because
waf-apiref-186
waf-apiref.pdf
186
to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* CreateWebACL 928 AWS WAFV2 WebACL The WebACL returned in the CreateWebACL response. API Reference Type: WebACL object Errors For information about the errors that are common to all actions, see Common Errors. WAFBadRequestException HTTP Status Code: 400 WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. CreateWebACL 929 AWS WAFV2 API Reference • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: CreateWebACL 930 API Reference AWS WAFV2 • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateWebACL 931 AWS WAFV2 API Reference CreateWebACLMigrationStack Service: AWS WAF Classic Regional Creates an AWS CloudFormation AWS WAFV2 template for the specified web ACL in the specified Amazon S3 bucket. Then, in CloudFormation, you create a stack from the template, to create the web ACL and its resources in AWS WAFV2. Use this to migrate your AWS WAF Classic web ACL to the latest version of AWS WAF. Note AWS WAF Classic support will end on September 30, 2025. This is part of a larger migration procedure for web ACLs from AWS WAF Classic to the latest version of AWS WAF. For the full procedure, including caveats and manual steps to complete the migration and switch over to the new web ACL, see Migrating your AWS WAF Classic resources to AWS WAF in the AWS WAF Developer Guide. Request Syntax { "IgnoreUnsupportedType": boolean, "S3BucketName": "string", "WebACLId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. IgnoreUnsupportedType Indicates whether to exclude entities that can't be migrated or to stop the migration. Set this to true to ignore unsupported entities in the web ACL during the migration. Otherwise, if AWS WAF encounters unsupported entities, it stops the process and throws an exception. Type: Boolean CreateWebACLMigrationStack 932 AWS WAFV2 Required: Yes S3BucketName API Reference The name of the Amazon S3 bucket to store the AWS CloudFormation template in. The S3 bucket must be configured as follows for the migration: • If the bucket is encrypted, the encryption must use Amazon S3 (SSE-S3) keys. The migration doesn't support encryption with AWS Key Management Service (SSE-KMS) keys. • The bucket name must start with aws-waf-migration-. For example, aws-waf- migration-my-web-acl. • The bucket must be in the Region where you are deploying the template. For example, for a web ACL in us-west-2, you must use an Amazon S3 bucket in us-west-2 and you must deploy the template stack to us-west-2. • The bucket policies must permit the migration process to write data. For listings of the bucket policies, see the Examples section. Type: String Length
waf-apiref-187
waf-apiref.pdf
187
bucket is encrypted, the encryption must use Amazon S3 (SSE-S3) keys. The migration doesn't support encryption with AWS Key Management Service (SSE-KMS) keys. • The bucket name must start with aws-waf-migration-. For example, aws-waf- migration-my-web-acl. • The bucket must be in the Region where you are deploying the template. For example, for a web ACL in us-west-2, you must use an Amazon S3 bucket in us-west-2 and you must deploy the template stack to us-west-2. • The bucket policies must permit the migration process to write data. For listings of the bucket policies, see the Examples section. Type: String Length Constraints: Minimum length of 3. Maximum length of 63. Pattern: ^aws-waf-migration-[0-9A-Za-z\.\-_]* Required: Yes WebACLId The UUID of the WAF Classic web ACL that you want to migrate to WAF v2. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "S3ObjectUrl": "string" CreateWebACLMigrationStack 933 API Reference AWS WAFV2 } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. S3ObjectUrl The URL of the template created in Amazon S3. Type: String Length Constraints: Minimum length of 1. Errors For information about the errors that are common to all actions, see Common Errors. WAFEntityMigrationException The operation failed due to a problem with the migration. The failure cause is provided in the exception, in the MigrationErrorType: • ENTITY_NOT_SUPPORTED - The web ACL has an unsupported entity but the IgnoreUnsupportedType is not set to true. • ENTITY_NOT_FOUND - The web ACL doesn't exist. • S3_BUCKET_NO_PERMISSION - You don't have permission to perform the PutObject action to the specified Amazon S3 bucket. • S3_BUCKET_NOT_ACCESSIBLE - The bucket policy doesn't allow AWS WAF to perform the PutObject action in the bucket. • S3_BUCKET_NOT_FOUND - The S3 bucket doesn't exist. • S3_BUCKET_INVALID_REGION - The S3 bucket is not in the same Region as the web ACL. • S3_INTERNAL_ERROR - AWS WAF failed to create the template in the S3 bucket for another reason. In addition, the exception includes specific details about the failure in the MigrationErrorReason. CreateWebACLMigrationStack 934 AWS WAFV2 HTTP Status Code: 400 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. CreateWebACLMigrationStack 935 AWS WAFV2 API Reference • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 Examples Amazon S3 bucket policy for global Amazon CloudFront applications This example illustrates one usage of CreateWebACLMigrationStack. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": "apiv2migration.waf.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::<BUCKET_NAME>/AWSWAF/<CUSTOMER_ACCOUNT_ID>/*" } ] } Amazon S3 bucket policy for Amazon API Gateway API or Application Load Balancer applications This example illustrates one usage of CreateWebACLMigrationStack. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { CreateWebACLMigrationStack 936 AWS WAFV2 API Reference "Service": "apiv2migration.waf-regional.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::<BUCKET_NAME>/AWSWAF/<CUSTOMER_ACCOUNT_ID>/*" } ] } See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2
waf-apiref-188
waf-apiref.pdf
188
"Allow", "Principal": { "Service": "apiv2migration.waf.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::<BUCKET_NAME>/AWSWAF/<CUSTOMER_ACCOUNT_ID>/*" } ] } Amazon S3 bucket policy for Amazon API Gateway API or Application Load Balancer applications This example illustrates one usage of CreateWebACLMigrationStack. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { CreateWebACLMigrationStack 936 AWS WAFV2 API Reference "Service": "apiv2migration.waf-regional.amazonaws.com" }, "Action": "s3:PutObject", "Resource": "arn:aws:s3:::<BUCKET_NAME>/AWSWAF/<CUSTOMER_ACCOUNT_ID>/*" } ] } See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateWebACLMigrationStack 937 AWS WAFV2 API Reference CreateXssMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Creates an XssMatchSet, which you use to allow, block, or count requests that contain cross-site scripting attacks in the specified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings. To create and configure an XssMatchSet, perform the following steps: 1. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a CreateXssMatchSet request. 2. Submit a CreateXssMatchSet request. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateXssMatchSet request. 4. Submit an UpdateXssMatchSet request to specify the parts of web requests in which you want to allow, block, or count cross-site scripting attacks. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "Name": "string" } CreateXssMatchSet 938 AWS WAFV2 Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Name A friendly name or description for the XssMatchSet that you're creating. You can't change Name after you create the XssMatchSet. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string", "XssMatchSet": { "Name": "string", "XssMatchSetId": "string", "XssMatchTuples": [ { "FieldToMatch": { "Data": "string", "Type": "string" CreateXssMatchSet 939 AWS WAFV2 API Reference }, "TextTransformation": "string" } ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the CreateXssMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* XssMatchSet An XssMatchSet. Type: XssMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. CreateXssMatchSet 940 AWS WAFV2 HTTP Status Code: 500 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a
waf-apiref-189
waf-apiref.pdf
189
or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. CreateXssMatchSet 941 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 CreateXssMatchSet 942 AWS WAFV2 API Reference DeleteByteMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's still used in any Rules or if it still includes any ByteMatchTuple objects (any filters). If you just want to remove a ByteMatchSet from a Rule, use UpdateRule. To permanently delete a ByteMatchSet, perform the following steps: 1. Update the ByteMatchSet to remove filters, if any. For more information, see UpdateByteMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteByteMatchSet request. 3. Submit a DeleteByteMatchSet request. Request Syntax { "ByteMatchSetId": "string", "ChangeToken": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteByteMatchSet 943 AWS WAFV2 ByteMatchSetId API Reference The ByteMatchSetId of the ByteMatchSet that you want to delete. ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteByteMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. DeleteByteMatchSet 944 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: DeleteByteMatchSet 945 AWS WAFV2 API Reference • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code:
waf-apiref-190
waf-apiref.pdf
190
You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: DeleteByteMatchSet 945 AWS WAFV2 API Reference • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteByteMatchSet 946 AWS WAFV2 API Reference DeleteGeoMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a GeoMatchSet. You can't delete a GeoMatchSet if it's still used in any Rules or if it still includes any countries. If you just want to remove a GeoMatchSet from a Rule, use UpdateRule. To permanently delete a GeoMatchSet from AWS WAF, perform the following steps: 1. Update the GeoMatchSet to remove any countries. For more information, see UpdateGeoMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteGeoMatchSet request. 3. Submit a DeleteGeoMatchSet request. Request Syntax { "ChangeToken": "string", "GeoMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteGeoMatchSet 947 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GeoMatchSetId The GeoMatchSetID of the GeoMatchSet that you want to delete. GeoMatchSetId is returned by CreateGeoMatchSet and by ListGeoMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteGeoMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String DeleteGeoMatchSet 948 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. DeleteGeoMatchSet 949 AWS WAFV2 API Reference • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the
waf-apiref-191
waf-apiref.pdf
191
Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. DeleteGeoMatchSet 949 AWS WAFV2 API Reference • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteGeoMatchSet 950 AWS WAFV2 API Reference DeleteIPSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes an IPSet. You can't delete an IPSet if it's still used in any Rules or if it still includes any IP addresses. If you just want to remove an IPSet from a Rule, use UpdateRule. To permanently delete an IPSet from AWS WAF, perform the following steps: 1. Update the IPSet to remove IP address ranges, if any. For more information, see UpdateIPSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteIPSet request. 3. Submit a DeleteIPSet request. Request Syntax { "ChangeToken": "string", "IPSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteIPSet 951 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes IPSetId The IPSetId of the IPSet that you want to delete. IPSetId is returned by CreateIPSet and by ListIPSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteIPSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String DeleteIPSet 952 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. DeleteIPSet 953 AWS WAFV2 API Reference • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript
waf-apiref-192
waf-apiref.pdf
192
WAFV2 API Reference • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteIPSet 954 AWS WAFV2 API Reference DeleteLoggingConfiguration Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes the LoggingConfiguration from the specified web ACL. Request Syntax { "ResourceArn": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The Amazon Resource Name (ARN) of the web ACL from which you want to delete the LoggingConfiguration. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes DeleteLoggingConfiguration 955 AWS WAFV2 Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin DeleteLoggingConfiguration 956 AWS WAFV2 • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference DeleteLoggingConfiguration 957 AWS WAFV2 API Reference DeletePermissionPolicy Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes an IAM policy from the specified RuleGroup. The user making the request must be the owner of the RuleGroup. Request Syntax { "ResourceArn": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The Amazon Resource Name (ARN) of the RuleGroup from which you want to delete the policy. The user making the request must be the owner of the RuleGroup. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* DeletePermissionPolicy 958 AWS WAFV2 Required: Yes Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 DeletePermissionPolicy 959 AWS WAFV2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin •
waf-apiref-193
waf-apiref.pdf
193
because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 DeletePermissionPolicy 959 AWS WAFV2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference DeletePermissionPolicy 960 AWS WAFV2 API Reference DeleteRateBasedRule Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a RateBasedRule. You can't delete a rule if it's still used in any WebACL objects or if it still includes any predicates, such as ByteMatchSet objects. If you just want to remove a rule from a WebACL, use UpdateWebACL. To permanently delete a RateBasedRule from AWS WAF, perform the following steps: 1. Update the RateBasedRule to remove predicates, if any. For more information, see UpdateRateBasedRule. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteRateBasedRule request. 3. Submit a DeleteRateBasedRule request. Request Syntax { "ChangeToken": "string", "RuleId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteRateBasedRule 961 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RuleId The RuleId of the RateBasedRule that you want to delete. RuleId is returned by CreateRateBasedRule and by ListRateBasedRules. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteRateBasedRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. DeleteRateBasedRule 962 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: DeleteRateBasedRule 963 AWS WAFV2 API Reference • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteRateBasedRule 964 AWS WAFV2 API Reference DeleteRegexMatchSet Service:
waf-apiref-194
waf-apiref.pdf
194
has already been used. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteRateBasedRule 964 AWS WAFV2 API Reference DeleteRegexMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a RegexMatchSet. You can't delete a RegexMatchSet if it's still used in any Rules or if it still includes any RegexMatchTuples objects (any filters). If you just want to remove a RegexMatchSet from a Rule, use UpdateRule. To permanently delete a RegexMatchSet, perform the following steps: 1. Update the RegexMatchSet to remove filters, if any. For more information, see UpdateRegexMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteRegexMatchSet request. 3. Submit a DeleteRegexMatchSet request. Request Syntax { "ChangeToken": "string", "RegexMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteRegexMatchSet 965 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RegexMatchSetId The RegexMatchSetId of the RegexMatchSet that you want to delete. RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteRegexMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. DeleteRegexMatchSet 966 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: DeleteRegexMatchSet 967 AWS WAFV2 API Reference • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteRegexMatchSet 968 AWS WAFV2 API Reference DeleteRegexPatternSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use
waf-apiref-195
waf-apiref.pdf
195
Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteRegexMatchSet 968 AWS WAFV2 API Reference DeleteRegexPatternSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a RegexPatternSet. You can't delete a RegexPatternSet if it's still used in any RegexMatchSet or if the RegexPatternSet is not empty. Request Syntax { "ChangeToken": "string", "RegexPatternSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes DeleteRegexPatternSet 969 AWS WAFV2 RegexPatternSetId API Reference The RegexPatternSetId of the RegexPatternSet that you want to delete. RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteRegexPatternSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. DeleteRegexPatternSet 970 AWS WAFV2 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. DeleteRegexPatternSet 971 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteRegexPatternSet 972 AWS WAFV2 API Reference DeleteRule Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a Rule. You can't delete a Rule if it's still used in any WebACL objects or if it still includes any predicates, such as ByteMatchSet objects. If you just want to remove a Rule from a WebACL, use UpdateWebACL. To permanently delete a Rule from AWS WAF, perform the following steps: 1. Update the Rule to remove predicates, if any. For more information, see UpdateRule. 2. Use GetChangeToken to get the change token that
waf-apiref-196
waf-apiref.pdf
196
and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a Rule. You can't delete a Rule if it's still used in any WebACL objects or if it still includes any predicates, such as ByteMatchSet objects. If you just want to remove a Rule from a WebACL, use UpdateWebACL. To permanently delete a Rule from AWS WAF, perform the following steps: 1. Update the Rule to remove predicates, if any. For more information, see UpdateRule. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteRule request. 3. Submit a DeleteRule request. Request Syntax { "ChangeToken": "string", "RuleId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteRule 973 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RuleId The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule and by ListRules. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String DeleteRule 974 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. DeleteRule 975 AWS WAFV2 API Reference • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteRule 976 AWS WAFV2 API Reference DeleteRuleGroup Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a RuleGroup. You can't delete a RuleGroup if it's still used in any WebACL objects or if it still includes any rules. If you just want to remove a RuleGroup from a WebACL, use UpdateWebACL. To permanently delete a RuleGroup from AWS WAF, perform the following steps: 1. Update the RuleGroup to remove rules, if any. For more information, see UpdateRuleGroup. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteRuleGroup request. 3. Submit a DeleteRuleGroup request. Request Syntax { "ChangeToken": "string", "RuleGroupId": "string" } Request Parameters For information about the parameters
waf-apiref-197
waf-apiref.pdf
197
a RuleGroup. You can't delete a RuleGroup if it's still used in any WebACL objects or if it still includes any rules. If you just want to remove a RuleGroup from a WebACL, use UpdateWebACL. To permanently delete a RuleGroup from AWS WAF, perform the following steps: 1. Update the RuleGroup to remove rules, if any. For more information, see UpdateRuleGroup. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteRuleGroup request. 3. Submit a DeleteRuleGroup request. Request Syntax { "ChangeToken": "string", "RuleGroupId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteRuleGroup 977 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RuleGroupId The RuleGroupId of the RuleGroup that you want to delete. RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteRuleGroup request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String DeleteRuleGroup 978 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 DeleteRuleGroup 979 AWS WAFV2 WAFNonexistentItemException API Reference The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 DeleteRuleGroup 980 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference DeleteRuleGroup 981 AWS WAFV2 API Reference DeleteSizeConstraintSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet if it's still used in any Rules or if it still includes any SizeConstraint objects (any filters). If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule. To
waf-apiref-198
waf-apiref.pdf
198
will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet if it's still used in any Rules or if it still includes any SizeConstraint objects (any filters). If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule. To permanently delete a SizeConstraintSet, perform the following steps: 1. Update the SizeConstraintSet to remove filters, if any. For more information, see UpdateSizeConstraintSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteSizeConstraintSet request. 3. Submit a DeleteSizeConstraintSet request. Request Syntax { "ChangeToken": "string", "SizeConstraintSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteSizeConstraintSet 982 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes SizeConstraintSetId The SizeConstraintSetId of the SizeConstraintSet that you want to delete. SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteSizeConstraintSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. DeleteSizeConstraintSet 983 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: DeleteSizeConstraintSet 984 AWS WAFV2 API Reference • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteSizeConstraintSet 985 AWS WAFV2 API Reference DeleteSqlInjectionMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet if it's still used in any Rules or if it still contains any SqlInjectionMatchTuple objects. If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule. To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following steps: 1. Update the SqlInjectionMatchSet to remove filters, if any. For more information, see UpdateSqlInjectionMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteSqlInjectionMatchSet
waf-apiref-199
waf-apiref.pdf
199
Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet if it's still used in any Rules or if it still contains any SqlInjectionMatchTuple objects. If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule. To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following steps: 1. Update the SqlInjectionMatchSet to remove filters, if any. For more information, see UpdateSqlInjectionMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteSqlInjectionMatchSet request. 3. Submit a DeleteSqlInjectionMatchSet request. Request Syntax { "ChangeToken": "string", "SqlInjectionMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteSqlInjectionMatchSet 986 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes SqlInjectionMatchSetId The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to delete. SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteSqlInjectionMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. DeleteSqlInjectionMatchSet 987 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: DeleteSqlInjectionMatchSet 988 AWS WAFV2 API Reference • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteSqlInjectionMatchSet 989 AWS WAFV2 API Reference DeleteWebACL Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes a WebACL. You can't delete a WebACL if it still contains any Rules. To delete a WebACL, perform the following steps: 1. Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteWebACL request. 3. Submit a DeleteWebACL request. Request Syntax { "ChangeToken": "string", "WebACLId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. DeleteWebACL 990 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length
waf-apiref-200
waf-apiref.pdf
200
following steps: 1. Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteWebACL request. 3. Submit a DeleteWebACL request. Request Syntax { "ChangeToken": "string", "WebACLId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. DeleteWebACL 990 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes WebACLId The WebACLId of the WebACL that you want to delete. WebACLId is returned by CreateWebACL and by ListWebACLs. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteWebACL request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* DeleteWebACL 991 AWS WAFV2 Errors API Reference For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 DeleteWebACL 992 AWS WAFV2 WAFStaleDataException API Reference The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteWebACL 993 AWS WAFV2 API Reference DeleteXssMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's still used in any Rules or if it still contains any XssMatchTuple objects. If you just want to remove an XssMatchSet from a Rule, use UpdateRule. To permanently delete an XssMatchSet from AWS WAF, perform the following steps: 1. Update the XssMatchSet to remove filters, if any. For more information, see UpdateXssMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a DeleteXssMatchSet request. 3. Submit a DeleteXssMatchSet request. Request Syntax { "ChangeToken": "string", "XssMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteXssMatchSet 994 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes XssMatchSetId The XssMatchSetId of the XssMatchSet that you want to delete. XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets. Type: String Length Constraints: Minimum
waf-apiref-201
waf-apiref.pdf
201
parameter of a DeleteXssMatchSet request. 3. Submit a DeleteXssMatchSet request. Request Syntax { "ChangeToken": "string", "XssMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. DeleteXssMatchSet 994 AWS WAFV2 ChangeToken API Reference The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes XssMatchSetId The XssMatchSetId of the XssMatchSet that you want to delete. XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the DeleteXssMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String DeleteXssMatchSet 995 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonEmptyEntityException The operation failed because you tried to delete an object that isn't empty. For example: • You tried to delete a WebACL that still contains one or more Rule objects. • You tried to delete a Rule that still contains one or more ByteMatchSet objects or other predicates. • You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects. • You tried to delete an IPSet that references one or more IP addresses. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. DeleteXssMatchSet 996 AWS WAFV2 API Reference • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DeleteXssMatchSet 997 AWS WAFV2 API Reference DisassociateWebACL Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Removes a web ACL from the specified resource, either an application load balancer or Amazon API Gateway stage. Request Syntax { "ResourceArn": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The ARN (Amazon Resource Name) of the resource from which the web ACL is being removed, either an application load balancer or Amazon API Gateway stage. The ARN should be in one of the following formats: • For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account- id:loadbalancer/app/load-balancer-name/load-balancer-id • For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/ stages/stage-name DisassociateWebACL 998 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter
waf-apiref-202
waf-apiref.pdf
202
Maximum length of 1224. Pattern: .*\S.* Required: Yes Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. DisassociateWebACL 999 AWS WAFV2 API Reference • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 DisassociateWebACL 1000 AWS WAFV2 API Reference GetByteMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the ByteMatchSet specified by ByteMatchSetId. Request Syntax { "ByteMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ByteMatchSetId The ByteMatchSetId of the ByteMatchSet that you want to get. ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetByteMatchSet 1001 API Reference AWS WAFV2 Response Syntax { "ByteMatchSet": { "ByteMatchSetId": "string", "ByteMatchTuples": [ { "FieldToMatch": { "Data": "string", "Type": "string" }, "PositionalConstraint": "string", "TargetString": blob, "TextTransformation": "string" } ], "Name": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ByteMatchSet Information about the ByteMatchSet that you specified in the GetByteMatchSet request. For more information, see the following topics: • ByteMatchSet: Contains ByteMatchSetId, ByteMatchTuples, and Name • ByteMatchTuples: Contains an array of ByteMatchTuple objects. Each ByteMatchTuple object contains FieldToMatch, PositionalConstraint, TargetString, and TextTransformation • FieldToMatch: Contains Data and Type Type: ByteMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. GetByteMatchSet 1002 AWS WAFV2 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetByteMatchSet 1003 AWS WAFV2 API Reference GetChangeToken Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For
waf-apiref-203
waf-apiref.pdf
203
SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetByteMatchSet 1003 AWS WAFV2 API Reference GetChangeToken Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. When you want to create, update, or delete AWS WAF objects, get a change token and include the change token in the create, update, or delete request. Change tokens ensure that your application doesn't submit conflicting requests to AWS WAF. Each create, update, or delete request must use a unique change token. If your application submits a GetChangeToken request and then submits a second GetChangeToken request before submitting a create, update, or delete request, the second GetChangeToken request returns the same value as the first GetChangeToken request. When you use a change token in a create, update, or delete request, the status of the change token changes to PENDING, which indicates that AWS WAF is propagating the change to all AWS WAF servers. Use GetChangeTokenStatus to determine the status of your change token. Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. GetChangeToken 1004 AWS WAFV2 ChangeToken API Reference The ChangeToken that you used in the request. Use this value in a GetChangeTokenStatus request to get the current status of the request. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetChangeToken 1005 AWS WAFV2 API Reference GetChangeToken 1006 AWS WAFV2 API Reference GetChangeTokenStatus Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the status of a ChangeToken that you got by calling GetChangeToken. ChangeTokenStatus is one of the following values: • PROVISIONED: You requested the change token by calling GetChangeToken, but you haven't used it yet in a call to create, update, or delete an AWS WAF object. • PENDING: AWS WAF is propagating the create, update, or delete request to all AWS WAF servers. • INSYNC: Propagation is complete. Request Syntax { "ChangeToken": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The change token for which you want to get the status. This change token was previously returned in the GetChangeToken response. GetChangeTokenStatus 1007 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeTokenStatus": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeTokenStatus The status of the change token. Type: String Valid Values: PROVISIONED | PENDING | INSYNC Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. GetChangeTokenStatus 1008 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of
waf-apiref-204
waf-apiref.pdf
204
an HTTP 200 response. The following data is returned in JSON format by the service. ChangeTokenStatus The status of the change token. Type: String Valid Values: PROVISIONED | PENDING | INSYNC Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. GetChangeTokenStatus 1008 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetChangeTokenStatus 1009 AWS WAFV2 API Reference GetGeoMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the GeoMatchSet that is specified by GeoMatchSetId. Request Syntax { "GeoMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. GeoMatchSetId The GeoMatchSetId of the GeoMatchSet that you want to get. GeoMatchSetId is returned by CreateGeoMatchSet and by ListGeoMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetGeoMatchSet 1010 API Reference AWS WAFV2 Response Syntax { "GeoMatchSet": { "GeoMatchConstraints": [ { "Type": "string", "Value": "string" } ], "GeoMatchSetId": "string", "Name": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. GeoMatchSet Information about the GeoMatchSet that you specified in the GetGeoMatchSet request. This includes the Type, which for a GeoMatchConstraint is always Country, as well as the Value, which is the identifier for a specific country. Type: GeoMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 GetGeoMatchSet 1011 AWS WAFV2 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetGeoMatchSet 1012 AWS WAFV2 API Reference GetIPSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the IPSet that is specified by IPSetId. Request Syntax { "IPSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. IPSetId The IPSetId of the IPSet that you want to get. IPSetId is returned by CreateIPSet and by ListIPSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetIPSet 1013 API Reference AWS WAFV2 Response Syntax { "IPSet": { "IPSetDescriptors": [ { "Type": "string", "Value": "string" } ], "IPSetId": "string", "Name": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. IPSet Information about the IPSet that you specified in the GetIPSet request. For more information, see the following topics: • IPSet: Contains IPSetDescriptors, IPSetId, and Name • IPSetDescriptors: Contains an array of IPSetDescriptor objects. Each IPSetDescriptor object contains
waf-apiref-205
waf-apiref.pdf
205
of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetIPSet 1013 API Reference AWS WAFV2 Response Syntax { "IPSet": { "IPSetDescriptors": [ { "Type": "string", "Value": "string" } ], "IPSetId": "string", "Name": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. IPSet Information about the IPSet that you specified in the GetIPSet request. For more information, see the following topics: • IPSet: Contains IPSetDescriptors, IPSetId, and Name • IPSetDescriptors: Contains an array of IPSetDescriptor objects. Each IPSetDescriptor object contains Type and Value Type: IPSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 GetIPSet 1014 AWS WAFV2 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetIPSet 1015 AWS WAFV2 API Reference GetLoggingConfiguration Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the LoggingConfiguration for the specified web ACL. Request Syntax { "ResourceArn": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes GetLoggingConfiguration 1016 API Reference AWS WAFV2 Response Syntax { "LoggingConfiguration": { "LogDestinationConfigs": [ "string" ], "RedactedFields": [ { "Data": "string", "Type": "string" } ], "ResourceArn": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. LoggingConfiguration The LoggingConfiguration for the specified web ACL. Type: LoggingConfiguration object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 GetLoggingConfiguration 1017 AWS WAFV2 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetLoggingConfiguration 1018 AWS WAFV2 API Reference GetPermissionPolicy Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the IAM policy attached to the RuleGroup. Request Syntax { "ResourceArn": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The Amazon Resource Name (ARN) of the RuleGroup for which you want to get the policy. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes GetPermissionPolicy 1019 AWS WAFV2 Response Syntax { "Policy": "string" } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. Policy The IAM policy attached to
waf-apiref-206
waf-apiref.pdf
206
For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The Amazon Resource Name (ARN) of the RuleGroup for which you want to get the policy. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes GetPermissionPolicy 1019 AWS WAFV2 Response Syntax { "Policy": "string" } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. Policy The IAM policy attached to the specified RuleGroup. Type: String Length Constraints: Minimum length of 1. Maximum length of 395000. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: GetPermissionPolicy 1020 API Reference AWS WAFV2 • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetPermissionPolicy 1021 AWS WAFV2 API Reference GetRateBasedRule Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the RateBasedRule that is specified by the RuleId that you included in the GetRateBasedRule request. Request Syntax { "RuleId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. RuleId The RuleId of the RateBasedRule that you want to get. RuleId is returned by CreateRateBasedRule and by ListRateBasedRules. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetRateBasedRule 1022 API Reference AWS WAFV2 Response Syntax { "Rule": { "MatchPredicates": [ { "DataId": "string", "Negated": boolean, "Type": "string" } ], "MetricName": "string", "Name": "string", "RateKey": "string", "RateLimit": number, "RuleId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. Rule Information about the RateBasedRule that you specified in the GetRateBasedRule request. Type: RateBasedRule object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 GetRateBasedRule 1023 AWS WAFV2 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetRateBasedRule 1024 AWS WAFV2 API Reference GetRateBasedRuleManagedKeys Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of IP addresses currently being blocked by the RateBasedRule that is specified by the RuleId. The maximum number of managed keys that will be blocked is 10,000. If more than 10,000 addresses exceed the rate limit, the 10,000 addresses with the highest rates will be blocked. Request Syntax { "NextMarker": "string", "RuleId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. NextMarker A null value
waf-apiref-207
waf-apiref.pdf
207
version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of IP addresses currently being blocked by the RateBasedRule that is specified by the RuleId. The maximum number of managed keys that will be blocked is 10,000. If more than 10,000 addresses exceed the rate limit, the 10,000 addresses with the highest rates will be blocked. Request Syntax { "NextMarker": "string", "RuleId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. NextMarker A null value and not currently used. Do not include this in your request. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* GetRateBasedRuleManagedKeys 1025 AWS WAFV2 Required: No RuleId API Reference The RuleId of the RateBasedRule for which you want to get a list of ManagedKeys. RuleId is returned by CreateRateBasedRule and by ListRateBasedRules. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ManagedKeys": [ "string" ], "NextMarker": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ManagedKeys An array of IP addresses that currently are blocked by the specified RateBasedRule. Type: Array of strings NextMarker A null value and not currently used. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* GetRateBasedRuleManagedKeys 1026 AWS WAFV2 Errors API Reference For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. GetRateBasedRuleManagedKeys 1027 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetRateBasedRuleManagedKeys 1028 AWS WAFV2 API Reference GetRegexMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the RegexMatchSet specified by RegexMatchSetId. Request Syntax { "RegexMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. RegexMatchSetId The RegexMatchSetId of the RegexMatchSet that you want to get. RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetRegexMatchSet 1029 API Reference AWS WAFV2 Response Syntax { "RegexMatchSet": { "Name": "string", "RegexMatchSetId": "string", "RegexMatchTuples": [ { "FieldToMatch": { "Data": "string", "Type": "string" }, "RegexPatternSetId": "string", "TextTransformation": "string" } ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. RegexMatchSet Information about the RegexMatchSet that you specified in the GetRegexMatchSet request. For more information, see RegexMatchTuple. Type: RegexMatchSet object Errors For information
waf-apiref-208
waf-apiref.pdf
208
by ListRegexMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetRegexMatchSet 1029 API Reference AWS WAFV2 Response Syntax { "RegexMatchSet": { "Name": "string", "RegexMatchSetId": "string", "RegexMatchTuples": [ { "FieldToMatch": { "Data": "string", "Type": "string" }, "RegexPatternSetId": "string", "TextTransformation": "string" } ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. RegexMatchSet Information about the RegexMatchSet that you specified in the GetRegexMatchSet request. For more information, see RegexMatchTuple. Type: RegexMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 GetRegexMatchSet 1030 AWS WAFV2 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetRegexMatchSet 1031 AWS WAFV2 API Reference GetRegexPatternSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the RegexPatternSet specified by RegexPatternSetId. Request Syntax { "RegexPatternSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. RegexPatternSetId The RegexPatternSetId of the RegexPatternSet that you want to get. RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetRegexPatternSet 1032 API Reference AWS WAFV2 Response Syntax { "RegexPatternSet": { "Name": "string", "RegexPatternSetId": "string", "RegexPatternStrings": [ "string" ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. RegexPatternSet Information about the RegexPatternSet that you specified in the GetRegexPatternSet request, including the identifier of the pattern set and the regular expression patterns you want AWS WAF to search for. Type: RegexPatternSet object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 GetRegexPatternSet 1033 AWS WAFV2 WAFNonexistentItemException API Reference The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetRegexPatternSet 1034 AWS WAFV2 API Reference GetRule Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the Rule that is specified by the RuleId that you included in the GetRule request. Request Syntax { "RuleId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. RuleId The RuleId of the Rule that you want to get. RuleId is returned by CreateRule and by ListRules. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetRule 1035 API Reference
waf-apiref-209
waf-apiref.pdf
209
version, AWS WAF has a single set of endpoints for regional and global use. Returns the Rule that is specified by the RuleId that you included in the GetRule request. Request Syntax { "RuleId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. RuleId The RuleId of the Rule that you want to get. RuleId is returned by CreateRule and by ListRules. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetRule 1035 API Reference AWS WAFV2 Response Syntax { "Rule": { "MetricName": "string", "Name": "string", "Predicates": [ { "DataId": "string", "Negated": boolean, "Type": "string" } ], "RuleId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. Rule Information about the Rule that you specified in the GetRule request. For more information, see the following topics: • Rule: Contains MetricName, Name, an array of Predicate objects, and RuleId • Predicate: Each Predicate object contains DataId, Negated, and Type Type: Rule object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. GetRule 1036 AWS WAFV2 HTTP Status Code: 500 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetRule 1037 AWS WAFV2 API Reference GetRuleGroup Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the RuleGroup that is specified by the RuleGroupId that you included in the GetRuleGroup request. To view the rules in a rule group, use ListActivatedRulesInRuleGroup. Request Syntax { "RuleGroupId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. RuleGroupId The RuleGroupId of the RuleGroup that you want to get. RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* GetRuleGroup 1038 API Reference AWS WAFV2 Required: Yes Response Syntax { "RuleGroup": { "MetricName": "string", "Name": "string", "RuleGroupId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. RuleGroup Information about the RuleGroup that you specified in the GetRuleGroup request. Type: RuleGroup object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 GetRuleGroup 1039 AWS WAFV2 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetRuleGroup 1040 AWS WAFV2 API Reference GetSampledRequests Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Gets detailed information about a specified number of requests--a sample--that AWS WAF
waf-apiref-210
waf-apiref.pdf
210
• AWS SDK for Python • AWS SDK for Ruby V3 GetRuleGroup 1040 AWS WAFV2 API Reference GetSampledRequests Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Gets detailed information about a specified number of requests--a sample--that AWS WAF randomly selects from among the first 5,000 requests that your AWS resource received during a time range that you choose. You can specify a sample size of up to 500 requests, and you can specify any time range in the previous three hours. GetSampledRequests returns a time range, which is usually the time range that you specified. However, if your resource (such as an Amazon CloudFront distribution) received 5,000 requests before the specified time range elapsed, GetSampledRequests returns an updated time range. This new time range indicates the actual period during which AWS WAF selected the requests in the sample. Request Syntax { "MaxItems": number, "RuleId": "string", "TimeWindow": { "EndTime": number, "StartTime": number }, "WebAclId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. GetSampledRequests 1041 AWS WAFV2 API Reference The request accepts the following data in JSON format. MaxItems The number of requests that you want AWS WAF to return from among the first 5,000 requests that your AWS resource received during the time range. If your resource received fewer requests than the value of MaxItems, GetSampledRequests returns information about all of them. Type: Long Valid Range: Minimum value of 1. Maximum value of 500. Required: Yes RuleId RuleId is one of three values: • The RuleId of the Rule or the RuleGroupId of the RuleGroup for which you want GetSampledRequests to return a sample of requests. • Default_Action, which causes GetSampledRequests to return a sample of the requests that didn't match any of the rules in the specified WebACL. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes TimeWindow The start date and time and the end date and time of the range for which you want GetSampledRequests to return a sample of requests. You must specify the times in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z". You can specify any time range in the previous three hours. Type: TimeWindow object Required: Yes WebAclId The WebACLId of the WebACL for which you want GetSampledRequests to return a sample of requests. GetSampledRequests 1042 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "PopulationSize": number, "SampledRequests": [ { "Action": "string", "Request": { "ClientIP": "string", "Country": "string", "Headers": [ { "Name": "string", "Value": "string" } ], "HTTPVersion": "string", "Method": "string", "URI": "string" }, "RuleWithinRuleGroup": "string", "Timestamp": number, "Weight": number } ], "TimeWindow": { "EndTime": number, "StartTime": number } } Response Elements If the action is successful, the service sends back an HTTP 200 response. GetSampledRequests 1043 AWS WAFV2 API Reference The following data is returned in JSON format by the service. PopulationSize The total number of requests from which GetSampledRequests got a sample of MaxItems requests. If PopulationSize is less than MaxItems, the sample includes every request that your AWS resource received during the specified time range. Type: Long SampledRequests A complex type that contains detailed information about each of the requests in the sample. Type: Array of SampledHTTPRequest objects TimeWindow Usually, TimeWindow is the time range that you specified in the GetSampledRequests request. However, if your AWS resource received more than 5,000 requests during the time range that you specified in the request, GetSampledRequests returns the time range for the first 5,000 requests. Times are in Coordinated Universal Time (UTC) format. Type: TimeWindow object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 GetSampledRequests 1044 AWS WAFV2 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK
waf-apiref-211
waf-apiref.pdf
211
was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 GetSampledRequests 1044 AWS WAFV2 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetSampledRequests 1045 AWS WAFV2 API Reference GetSizeConstraintSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the SizeConstraintSet specified by SizeConstraintSetId. Request Syntax { "SizeConstraintSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. SizeConstraintSetId The SizeConstraintSetId of the SizeConstraintSet that you want to get. SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetSizeConstraintSet 1046 API Reference AWS WAFV2 Response Syntax { "SizeConstraintSet": { "Name": "string", "SizeConstraints": [ { "ComparisonOperator": "string", "FieldToMatch": { "Data": "string", "Type": "string" }, "Size": number, "TextTransformation": "string" } ], "SizeConstraintSetId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. SizeConstraintSet Information about the SizeConstraintSet that you specified in the GetSizeConstraintSet request. For more information, see the following topics: • SizeConstraintSet: Contains SizeConstraintSetId, SizeConstraints, and Name • SizeConstraints: Contains an array of SizeConstraint objects. Each SizeConstraint object contains FieldToMatch, TextTransformation, ComparisonOperator, and Size • FieldToMatch: Contains Data and Type Type: SizeConstraintSet object Errors For information about the errors that are common to all actions, see Common Errors. GetSizeConstraintSet 1047 AWS WAFV2 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetSizeConstraintSet 1048 AWS WAFV2 API Reference GetSqlInjectionMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId. Request Syntax { "SqlInjectionMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. SqlInjectionMatchSetId The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to get. SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetSqlInjectionMatchSet 1049 API Reference AWS WAFV2 Response Syntax { "SqlInjectionMatchSet": { "Name": "string", "SqlInjectionMatchSetId": "string", "SqlInjectionMatchTuples": [ { "FieldToMatch": { "Data": "string", "Type": "string" }, "TextTransformation": "string" } ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. SqlInjectionMatchSet Information about the SqlInjectionMatchSet that you specified in the GetSqlInjectionMatchSet request. For more information, see the following topics: • SqlInjectionMatchSet: Contains Name, SqlInjectionMatchSetId, and an array of SqlInjectionMatchTuple objects • SqlInjectionMatchTuple: Each SqlInjectionMatchTuple object contains FieldToMatch and TextTransformation • FieldToMatch: Contains Data and Type Type: SqlInjectionMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. GetSqlInjectionMatchSet 1050 AWS WAFV2 WAFInternalErrorException API Reference The operation
waf-apiref-212
waf-apiref.pdf
212
} } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. SqlInjectionMatchSet Information about the SqlInjectionMatchSet that you specified in the GetSqlInjectionMatchSet request. For more information, see the following topics: • SqlInjectionMatchSet: Contains Name, SqlInjectionMatchSetId, and an array of SqlInjectionMatchTuple objects • SqlInjectionMatchTuple: Each SqlInjectionMatchTuple object contains FieldToMatch and TextTransformation • FieldToMatch: Contains Data and Type Type: SqlInjectionMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. GetSqlInjectionMatchSet 1050 AWS WAFV2 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetSqlInjectionMatchSet 1051 AWS WAFV2 API Reference GetWebACL Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the WebACL that is specified by WebACLId. Request Syntax { "WebACLId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. WebACLId The WebACLId of the WebACL that you want to get. WebACLId is returned by CreateWebACL and by ListWebACLs. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetWebACL 1052 API Reference AWS WAFV2 Response Syntax { "WebACL": { "DefaultAction": { "Type": "string" }, "MetricName": "string", "Name": "string", "Rules": [ { "Action": { "Type": "string" }, "ExcludedRules": [ { "RuleId": "string" } ], "OverrideAction": { "Type": "string" }, "Priority": number, "RuleId": "string", "Type": "string" } ], "WebACLArn": "string", "WebACLId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. WebACL Information about the WebACL that you specified in the GetWebACL request. For more information, see the following topics: GetWebACL 1053 AWS WAFV2 API Reference • WebACL: Contains DefaultAction, MetricName, Name, an array of Rule objects, and WebACLId • DefaultAction (Data type is WafAction): Contains Type • Rules: Contains an array of ActivatedRule objects, which contain Action, Priority, and RuleId • Action: Contains Type Type: WebACL object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET GetWebACL 1054 API Reference AWS WAFV2 • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetWebACL 1055 AWS WAFV2 API Reference GetWebACLForResource Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the web ACL for the specified resource, either an application load balancer or Amazon API Gateway stage. Request Syntax { "ResourceArn": "string" } Request Parameters For information about the parameters that are common to all actions, see Common
waf-apiref-213
waf-apiref.pdf
213
support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the web ACL for the specified resource, either an application load balancer or Amazon API Gateway stage. Request Syntax { "ResourceArn": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceArn The ARN (Amazon Resource Name) of the resource for which to get the web ACL, either an application load balancer or Amazon API Gateway stage. The ARN should be in one of the following formats: • For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account- id:loadbalancer/app/load-balancer-name/load-balancer-id • For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/ stages/stage-name GetWebACLForResource 1056 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes Response Syntax { "WebACLSummary": { "Name": "string", "WebACLId": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. WebACLSummary Information about the web ACL that you specified in the GetWebACLForResource request. If there is no associated resource, a null WebACLSummary is returned. Type: WebACLSummary object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 GetWebACLForResource 1057 AWS WAFV2 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFUnavailableEntityException The operation failed because the entity referenced is temporarily unavailable. Retry your request. HTTP Status Code: 400 GetWebACLForResource 1058 AWS WAFV2 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetWebACLForResource 1059 AWS WAFV2 API Reference GetXssMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns the XssMatchSet that is specified by XssMatchSetId. Request Syntax { "XssMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. XssMatchSetId The XssMatchSetId of the XssMatchSet that you want to get. XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetXssMatchSet 1060 API Reference AWS WAFV2 Response Syntax { "XssMatchSet": { "Name": "string", "XssMatchSetId": "string", "XssMatchTuples": [ { "FieldToMatch": { "Data": "string", "Type": "string" }, "TextTransformation": "string" } ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. XssMatchSet Information about the XssMatchSet
waf-apiref-214
waf-apiref.pdf
214
in JSON format. XssMatchSetId The XssMatchSetId of the XssMatchSet that you want to get. XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GetXssMatchSet 1060 API Reference AWS WAFV2 Response Syntax { "XssMatchSet": { "Name": "string", "XssMatchSetId": "string", "XssMatchTuples": [ { "FieldToMatch": { "Data": "string", "Type": "string" }, "TextTransformation": "string" } ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. XssMatchSet Information about the XssMatchSet that you specified in the GetXssMatchSet request. For more information, see the following topics: • XssMatchSet: Contains Name, XssMatchSetId, and an array of XssMatchTuple objects • XssMatchTuple: Each XssMatchTuple object contains FieldToMatch and TextTransformation • FieldToMatch: Contains Data and Type Type: XssMatchSet object Errors For information about the errors that are common to all actions, see Common Errors. GetXssMatchSet 1061 AWS WAFV2 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 GetXssMatchSet 1062 AWS WAFV2 API Reference ListActivatedRulesInRuleGroup Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of ActivatedRule objects. Request Syntax { "Limit": number, "NextMarker": "string", "RuleGroupId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of ActivatedRules that you want AWS WAF to return for this request. If you have more ActivatedRules than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of ActivatedRules. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListActivatedRulesInRuleGroup 1063 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more ActivatedRules than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of ActivatedRules. For the second and subsequent ListActivatedRulesInRuleGroup requests, specify the value of NextMarker from the previous response to get information about another batch of ActivatedRules. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No RuleGroupId The RuleGroupId of the RuleGroup for which you want to get a list of ActivatedRule objects. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: No Response Syntax { "ActivatedRules": [ { "Action": { "Type": "string" }, "ExcludedRules": [ { "RuleId": "string" } ], "OverrideAction": { "Type": "string" ListActivatedRulesInRuleGroup 1064 AWS WAFV2 API Reference }, "Priority": number, "RuleId": "string", "Type": "string" } ], "NextMarker": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ActivatedRules An array of ActivatedRules objects. Type: Array of ActivatedRule objects NextMarker If you have more ActivatedRules than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more ActivatedRules, submit another ListActivatedRulesInRuleGroup request, and specify the NextMarker value from the response in the NextMarker value in the next request. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. ListActivatedRulesInRuleGroup 1065 AWS WAFV2 HTTP Status Code: 500 WAFInvalidParameterException API Reference The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value.
waf-apiref-215
waf-apiref.pdf
215
the NextMarker value from the response in the NextMarker value in the next request. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. ListActivatedRulesInRuleGroup 1065 AWS WAFV2 HTTP Status Code: 500 WAFInvalidParameterException API Reference The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 ListActivatedRulesInRuleGroup 1066 AWS WAFV2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListActivatedRulesInRuleGroup 1067 AWS WAFV2 API Reference ListByteMatchSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of ByteMatchSetSummary objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of ByteMatchSet objects that you want AWS WAF to return for this request. If you have more ByteMatchSets objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of ByteMatchSet objects. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListByteMatchSets 1068 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more ByteMatchSets than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of ByteMatchSets. For the second and subsequent ListByteMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of ByteMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "ByteMatchSets": [ { "ByteMatchSetId": "string", "Name": "string" } ], "NextMarker": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ByteMatchSets An array of ByteMatchSetSummary objects. Type: Array of ByteMatchSetSummary objects ListByteMatchSets 1069 AWS WAFV2 NextMarker API Reference If you have more ByteMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more ByteMatchSet objects, submit another ListByteMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ •
waf-apiref-216
waf-apiref.pdf
216
of 1224. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 ListByteMatchSets 1070 AWS WAFV2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListByteMatchSets 1071 AWS WAFV2 API Reference ListGeoMatchSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of GeoMatchSetSummary objects in the response. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of GeoMatchSet objects that you want AWS WAF to return for this request. If you have more GeoMatchSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of GeoMatchSet objects. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListGeoMatchSets 1072 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more GeoMatchSets than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of GeoMatchSet objects. For the second and subsequent ListGeoMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of GeoMatchSet objects. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "GeoMatchSets": [ { "GeoMatchSetId": "string", "Name": "string" } ], "NextMarker": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. GeoMatchSets An array of GeoMatchSetSummary objects. Type: Array of GeoMatchSetSummary objects ListGeoMatchSets 1073 AWS WAFV2 NextMarker API Reference If you have more GeoMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more GeoMatchSet objects, submit another ListGeoMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 ListGeoMatchSets 1074 AWS WAFV2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListGeoMatchSets 1075 AWS WAFV2 API Reference ListIPSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of IPSetSummary objects in the response. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of IPSet objects that you want
waf-apiref-217
waf-apiref.pdf
217
For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of IPSetSummary objects in the response. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of IPSet objects that you want AWS WAF to return for this request. If you have more IPSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of IPSet objects. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListIPSets 1076 AWS WAFV2 NextMarker API Reference AWS WAF returns a NextMarker value in the response that allows you to list another group of IPSets. For the second and subsequent ListIPSets requests, specify the value of NextMarker from the previous response to get information about another batch of IPSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "IPSets": [ { "IPSetId": "string", "Name": "string" } ], "NextMarker": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. IPSets An array of IPSetSummary objects. Type: Array of IPSetSummary objects NextMarker To list more IPSet objects, submit another ListIPSets request, and in the next request use the NextMarker response value as the NextMarker value. ListIPSets 1077 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python ListIPSets 1078 AWS WAFV2 • AWS SDK for Ruby V3 API Reference ListIPSets 1079 AWS WAFV2 API Reference ListLoggingConfigurations Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of LoggingConfiguration objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of LoggingConfigurations that you want AWS WAF to return for this request. If you have more LoggingConfigurations than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of LoggingConfigurations. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListLoggingConfigurations 1080 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more LoggingConfigurations than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of LoggingConfigurations. For the second and subsequent ListLoggingConfigurations requests, specify the value of NextMarker from the previous response to get information about another batch of ListLoggingConfigurations. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "LoggingConfigurations": [ { "LogDestinationConfigs": [ "string" ], "RedactedFields": [ { "Data": "string", "Type": "string" } ], "ResourceArn": "string" } ], "NextMarker": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ListLoggingConfigurations 1081 AWS WAFV2 LoggingConfigurations An array of LoggingConfiguration objects. Type: Array of LoggingConfiguration objects NextMarker API Reference If you have more LoggingConfigurations than the number that you specified for Limit in the request, the response includes a
waf-apiref-218
waf-apiref.pdf
218
of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "LoggingConfigurations": [ { "LogDestinationConfigs": [ "string" ], "RedactedFields": [ { "Data": "string", "Type": "string" } ], "ResourceArn": "string" } ], "NextMarker": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ListLoggingConfigurations 1081 AWS WAFV2 LoggingConfigurations An array of LoggingConfiguration objects. Type: Array of LoggingConfiguration objects NextMarker API Reference If you have more LoggingConfigurations than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more LoggingConfigurations, submit another ListLoggingConfigurations request, and specify the NextMarker value from the response in the NextMarker value in the next request. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. ListLoggingConfigurations 1082 AWS WAFV2 API Reference • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 ListLoggingConfigurations 1083 AWS WAFV2 API Reference ListRateBasedRules Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of RuleSummary objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of Rules that you want AWS WAF to return for this request. If you have more Rules than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of Rules. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListRateBasedRules 1084 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more Rules than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of Rules. For the second and subsequent ListRateBasedRules requests, specify the value of NextMarker from the previous response to get information about another batch of Rules. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "Rules": [ { "Name": "string", "RuleId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more Rules than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more Rules, submit another ListRateBasedRules request, and specify the NextMarker value from the response in the NextMarker value in the next request. Type: String ListRateBasedRules 1085 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Rules An array of RuleSummary
waf-apiref-219
waf-apiref.pdf
219
] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more Rules than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more Rules, submit another ListRateBasedRules request, and specify the NextMarker value from the response in the NextMarker value in the next request. Type: String ListRateBasedRules 1085 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Rules An array of RuleSummary objects. Type: Array of RuleSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin ListRateBasedRules 1086 AWS WAFV2 • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListRateBasedRules 1087 AWS WAFV2 API Reference ListRegexMatchSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of RegexMatchSetSummary objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of RegexMatchSet objects that you want AWS WAF to return for this request. If you have more RegexMatchSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of RegexMatchSet objects. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListRegexMatchSets 1088 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more RegexMatchSet objects than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of ByteMatchSets. For the second and subsequent ListRegexMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of RegexMatchSet objects. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "RegexMatchSets": [ { "Name": "string", "RegexMatchSetId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more RegexMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more RegexMatchSet objects, submit another ListRegexMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request. ListRegexMatchSets 1089 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* RegexMatchSets An array of RegexMatchSetSummary objects. Type: Array of RegexMatchSetSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 ListRegexMatchSets 1090 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListRegexMatchSets 1091 AWS WAFV2 API Reference ListRegexPatternSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For
waf-apiref-220
waf-apiref.pdf
220
one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 ListRegexMatchSets 1090 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListRegexMatchSets 1091 AWS WAFV2 API Reference ListRegexPatternSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of RegexPatternSetSummary objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of RegexPatternSet objects that you want AWS WAF to return for this request. If you have more RegexPatternSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of RegexPatternSet objects. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListRegexPatternSets 1092 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more RegexPatternSet objects than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of RegexPatternSet objects. For the second and subsequent ListRegexPatternSets requests, specify the value of NextMarker from the previous response to get information about another batch of RegexPatternSet objects. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "RegexPatternSets": [ { "Name": "string", "RegexPatternSetId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more RegexPatternSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more RegexPatternSet objects, submit another ListRegexPatternSets request, and specify the NextMarker value from the response in the NextMarker value in the next request. ListRegexPatternSets 1093 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* RegexPatternSets An array of RegexPatternSetSummary objects. Type: Array of RegexPatternSetSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 ListRegexPatternSets 1094 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListRegexPatternSets 1095 AWS WAFV2 API Reference ListResourcesForWebACL Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of resources associated with the specified web ACL. Request Syntax { "ResourceType": "string", "WebACLId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceType The type of resource to list. Type: String Valid Values: APPLICATION_LOAD_BALANCER | API_GATEWAY Required: No WebACLId The unique identifier (ID) of the web ACL for which to list the associated resources. ListResourcesForWebACL 1096 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ResourceArns": [ "string" ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format
waf-apiref-221
waf-apiref.pdf
221
to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceType The type of resource to list. Type: String Valid Values: APPLICATION_LOAD_BALANCER | API_GATEWAY Required: No WebACLId The unique identifier (ID) of the web ACL for which to list the associated resources. ListResourcesForWebACL 1096 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ResourceArns": [ "string" ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ResourceArns An array of ARNs (Amazon Resource Names) of the resources associated with the specified web ACL. An array with zero elements is returned if there are no resources associated with the web ACL. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. ListResourcesForWebACL 1097 AWS WAFV2 HTTP Status Code: 500 WAFInvalidAccountException API Reference The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: ListResourcesForWebACL 1098 API Reference AWS WAFV2 • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 ListResourcesForWebACL 1099 AWS WAFV2 API Reference ListRuleGroups Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of RuleGroup objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of RuleGroups that you want AWS WAF to return for this request. If you have more RuleGroups than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of RuleGroups. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListRuleGroups 1100 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more RuleGroups than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of RuleGroups. For the second and subsequent ListRuleGroups requests, specify the value of NextMarker from the previous response to get information about another batch of RuleGroups. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "RuleGroups": [ { "Name": "string", "RuleGroupId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more RuleGroups than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more RuleGroups, submit another
waf-apiref-222
waf-apiref.pdf
222
of NextMarker from the previous response to get information about another batch of RuleGroups. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "RuleGroups": [ { "Name": "string", "RuleGroupId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more RuleGroups than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more RuleGroups, submit another ListRuleGroups request, and specify the NextMarker value from the response in the NextMarker value in the next request. ListRuleGroups 1101 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* RuleGroups An array of RuleGroup objects. Type: Array of RuleGroupSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 ListRuleGroups 1102 AWS WAFV2 API Reference ListRuleGroups 1103 AWS WAFV2 API Reference ListRules Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of RuleSummary objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of Rules that you want AWS WAF to return for this request. If you have more Rules than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of Rules. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListRules 1104 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more Rules than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of Rules. For the second and subsequent ListRules requests, specify the value of NextMarker from the previous response to get information about another batch of Rules. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "Rules": [ { "Name": "string", "RuleId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more Rules than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more Rules, submit another ListRules request, and specify the NextMarker value from the response in the NextMarker value in the next request. Type: String ListRules 1105 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Rules An array of RuleSummary objects. Type: Array of RuleSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin ListRules 1106 AWS WAFV2 • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListRules 1107 AWS WAFV2 API Reference ListSizeConstraintSets Service: AWS WAF Classic Regional Note AWS WAF Classic support
waf-apiref-223
waf-apiref.pdf
223
Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin ListRules 1106 AWS WAFV2 • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListRules 1107 AWS WAFV2 API Reference ListSizeConstraintSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of SizeConstraintSetSummary objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of SizeConstraintSet objects that you want AWS WAF to return for this request. If you have more SizeConstraintSets objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of SizeConstraintSet objects. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListSizeConstraintSets 1108 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more SizeConstraintSets than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of SizeConstraintSets. For the second and subsequent ListSizeConstraintSets requests, specify the value of NextMarker from the previous response to get information about another batch of SizeConstraintSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "SizeConstraintSets": [ { "Name": "string", "SizeConstraintSetId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more SizeConstraintSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more SizeConstraintSet objects, submit another ListSizeConstraintSets request, and specify the NextMarker value from the response in the NextMarker value in the next request. ListSizeConstraintSets 1109 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* SizeConstraintSets An array of SizeConstraintSetSummary objects. Type: Array of SizeConstraintSetSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 ListSizeConstraintSets 1110 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListSizeConstraintSets 1111 AWS WAFV2 API Reference ListSqlInjectionMatchSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of SqlInjectionMatchSet objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of SqlInjectionMatchSet objects that you want AWS WAF to return for this request. If you have more SqlInjectionMatchSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of Rules. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListSqlInjectionMatchSets 1112 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more SqlInjectionMatchSet objects
waf-apiref-224
waf-apiref.pdf
224
the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of SqlInjectionMatchSet objects that you want AWS WAF to return for this request. If you have more SqlInjectionMatchSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of Rules. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListSqlInjectionMatchSets 1112 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more SqlInjectionMatchSet objects than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of SqlInjectionMatchSets. For the second and subsequent ListSqlInjectionMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of SqlInjectionMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "SqlInjectionMatchSets": [ { "Name": "string", "SqlInjectionMatchSetId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more SqlInjectionMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more SqlInjectionMatchSet objects, submit another ListSqlInjectionMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request. ListSqlInjectionMatchSets 1113 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* SqlInjectionMatchSets An array of SqlInjectionMatchSetSummary objects. Type: Array of SqlInjectionMatchSetSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 ListSqlInjectionMatchSets 1114 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListSqlInjectionMatchSets 1115 AWS WAFV2 API Reference ListSubscribedRuleGroups Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of RuleGroup objects that you are subscribed to. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of subscribed rule groups that you want AWS WAF to return for this request. If you have more objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of objects. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListSubscribedRuleGroups 1116 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more ByteMatchSetssubscribed rule groups than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of subscribed rule groups. For the second and subsequent ListSubscribedRuleGroupsRequest requests, specify the value of NextMarker from the previous response to get information about another batch of subscribed rule groups. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "RuleGroups": [ { "MetricName": "string", "Name": "string", "RuleGroupId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more objects, submit another ListSubscribedRuleGroups request, and specify the NextMarker value from the response in the NextMarker value in the next request. ListSubscribedRuleGroups 1117 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length
waf-apiref-225
waf-apiref.pdf
225
[ { "MetricName": "string", "Name": "string", "RuleGroupId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more objects, submit another ListSubscribedRuleGroups request, and specify the NextMarker value from the response in the NextMarker value in the next request. ListSubscribedRuleGroups 1117 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* RuleGroups An array of RuleGroup objects. Type: Array of SubscribedRuleGroupSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 ListSubscribedRuleGroups 1118 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListSubscribedRuleGroups 1119 AWS WAFV2 API Reference ListTagsForResource Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Retrieves the tags associated with the specified AWS resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing. For example, you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each AWS resource, up to 50 tags for a resource. Tagging is only available through the API, SDKs, and CLI. You can't manage or view tags through the AWS WAF Classic console. You can tag the AWS resources that you manage through AWS WAF Classic: web ACLs, rule groups, and rules. Request Syntax { "Limit": number, "NextMarker": "string", "ResourceARN": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Type: Integer ListTagsForResource 1120 AWS WAFV2 API Reference Valid Range: Minimum value of 0. Maximum value of 100. Required: No NextMarker Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No ResourceARN Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes Response Syntax { "NextMarker": "string", "TagInfoForResource": { "ResourceARN": "string", "TagList": [ { "Key": "string", "Value": "string" } ] } } Response Elements If the action is successful, the service sends back an HTTP 200 response. ListTagsForResource 1121 AWS WAFV2 API Reference The following data is returned in JSON format by the service. NextMarker Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* TagInfoForResource Type: TagInfoForResource object Errors For information about the errors that are common to all actions, see Common Errors. WAFBadRequestException HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. ListTagsForResource 1122 AWS WAFV2 API Reference • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The
waf-apiref-226
waf-apiref.pdf
226
1122 AWS WAFV2 API Reference • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 ListTagsForResource 1123 AWS WAFV2 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListTagsForResource 1124 AWS WAFV2 API Reference ListWebACLs Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of WebACLSummary objects in the response. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of WebACL objects that you want AWS WAF to return for this request. If you have more WebACL objects than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of WebACL objects. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListWebACLs 1125 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more WebACL objects than the number that you specify for Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of WebACL objects. For the second and subsequent ListWebACLs requests, specify the value of NextMarker from the previous response to get information about another batch of WebACL objects. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "WebACLs": [ { "Name": "string", "WebACLId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more WebACL objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more WebACL objects, submit another ListWebACLs request, and specify the NextMarker value from the response in the NextMarker value in the next request. ListWebACLs 1126 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* WebACLs An array of WebACLSummary objects. Type: Array of WebACLSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 ListWebACLs 1127 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListWebACLs 1128 AWS WAFV2 API Reference ListXssMatchSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has
waf-apiref-227
waf-apiref.pdf
227
AWS SDK for JavaScript V3 ListWebACLs 1127 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListWebACLs 1128 AWS WAFV2 API Reference ListXssMatchSets Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Returns an array of XssMatchSet objects. Request Syntax { "Limit": number, "NextMarker": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Limit Specifies the number of XssMatchSet objects that you want AWS WAF to return for this request. If you have more XssMatchSet objects than the number you specify for Limit, the response includes a NextMarker value that you can use to get another batch of Rules. Type: Integer Valid Range: Minimum value of 0. Maximum value of 100. Required: No ListXssMatchSets 1129 AWS WAFV2 NextMarker API Reference If you specify a value for Limit and you have more XssMatchSet objects than the value of Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of XssMatchSets. For the second and subsequent ListXssMatchSets requests, specify the value of NextMarker from the previous response to get information about another batch of XssMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: No Response Syntax { "NextMarker": "string", "XssMatchSets": [ { "Name": "string", "XssMatchSetId": "string" } ] } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. NextMarker If you have more XssMatchSet objects than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more XssMatchSet objects, submit another ListXssMatchSets request, and specify the NextMarker value from the response in the NextMarker value in the next request. ListXssMatchSets 1130 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* XssMatchSets An array of XssMatchSetSummary objects. Type: Array of XssMatchSetSummary objects Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 ListXssMatchSets 1131 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference ListXssMatchSets 1132 AWS WAFV2 API Reference PutLoggingConfiguration Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Associates a LoggingConfiguration with a specified web ACL. You can access information about all traffic that AWS WAF inspects using the following steps: 1. Create an Amazon Data Firehose. Create the data firehose with a PUT source and in the region that you are operating. However, if you are capturing logs for Amazon CloudFront, always create the firehose in US East (N. Virginia). Give the data firehose a name that starts with the prefix aws-waf-logs-. For example, aws- waf-logs-us-east-2-analytics. Note Do not create the data firehose using a Kinesis stream as your source. 2. Associate that firehose to your web ACL using a PutLoggingConfiguration request. When you successfully enable logging using a PutLoggingConfiguration request, AWS WAF will create a service linked role with the necessary permissions to write logs to the Amazon Data Firehose. For more information, see Logging Web ACL Traffic Information in the AWS WAF Developer Guide. PutLoggingConfiguration 1133 API Reference AWS WAFV2 Request Syntax { "LoggingConfiguration": { "LogDestinationConfigs": [ "string" ], "RedactedFields": [ { "Data": "string",
waf-apiref-228
waf-apiref.pdf
228
that starts with the prefix aws-waf-logs-. For example, aws- waf-logs-us-east-2-analytics. Note Do not create the data firehose using a Kinesis stream as your source. 2. Associate that firehose to your web ACL using a PutLoggingConfiguration request. When you successfully enable logging using a PutLoggingConfiguration request, AWS WAF will create a service linked role with the necessary permissions to write logs to the Amazon Data Firehose. For more information, see Logging Web ACL Traffic Information in the AWS WAF Developer Guide. PutLoggingConfiguration 1133 API Reference AWS WAFV2 Request Syntax { "LoggingConfiguration": { "LogDestinationConfigs": [ "string" ], "RedactedFields": [ { "Data": "string", "Type": "string" } ], "ResourceArn": "string" } } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. LoggingConfiguration The Amazon Data Firehose that contains the inspected traffic information, the redacted fields details, and the Amazon Resource Name (ARN) of the web ACL to monitor. Note When specifying Type in RedactedFields, you must use one of the following values: URI, QUERY_STRING, HEADER, or METHOD. Type: LoggingConfiguration object Required: Yes Response Syntax { "LoggingConfiguration": { PutLoggingConfiguration 1134 AWS WAFV2 API Reference "LogDestinationConfigs": [ "string" ], "RedactedFields": [ { "Data": "string", "Type": "string" } ], "ResourceArn": "string" } } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. LoggingConfiguration The LoggingConfiguration that you submitted in the request. Type: LoggingConfiguration object Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFServiceLinkedRoleErrorException AWS WAF is not able to access the service linked role. This can be caused by a previous PutLoggingConfiguration request, which can lock the service linked role for about 20 PutLoggingConfiguration 1135 AWS WAFV2 API Reference seconds. Please try your request again. The service linked role can also be locked by a previous DeleteServiceLinkedRole request, which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, wait at least 15 minutes and try the request again. If you receive this same exception again, you will have to wait additional time until the role is unlocked. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 PutLoggingConfiguration 1136 AWS WAFV2 API Reference PutPermissionPolicy Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Attaches an IAM policy to the specified resource. The only supported use for this action is to share a RuleGroup across accounts. The PutPermissionPolicy is subject to the following restrictions: • You can attach only one policy with each PutPermissionPolicy request. • The policy must include an Effect, Action and Principal. • Effect must specify Allow. • The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard actions in the policy will be rejected. • The policy cannot include a Resource parameter. • The ARN in the request must be a valid RuleGroup ARN and the RuleGroup must exist in the same region. • The user making the request must be the owner of the RuleGroup. • Your policy must be composed using IAM Policy version 2012-10-17. For more information, see Policies and permissions in IAM. An example of a valid policy parameter is shown in the Examples section below. Request Syntax { PutPermissionPolicy 1137 AWS WAFV2 "Policy": "string", "ResourceArn": "string" } Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Policy The policy to attach to the specified RuleGroup. Type: String Length Constraints: Minimum length of 1. Maximum length
waf-apiref-229
waf-apiref.pdf
229
request must be the owner of the RuleGroup. • Your policy must be composed using IAM Policy version 2012-10-17. For more information, see Policies and permissions in IAM. An example of a valid policy parameter is shown in the Examples section below. Request Syntax { PutPermissionPolicy 1137 AWS WAFV2 "Policy": "string", "ResourceArn": "string" } Request Parameters API Reference For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. Policy The policy to attach to the specified RuleGroup. Type: String Length Constraints: Minimum length of 1. Maximum length of 395000. Pattern: .*\S.* Required: Yes ResourceArn The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the policy. Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. PutPermissionPolicy 1138 AWS WAFV2 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidPermissionPolicyException The operation failed because the specified policy is not in the proper format. The policy is subject to the following restrictions: • You can attach only one policy with each PutPermissionPolicy request. • The policy must include an Effect, Action and Principal. • Effect must specify Allow. • The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard actions in the policy will be rejected. • The policy cannot include a Resource parameter. • The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup must exist in the same region. • The user making the request must be the owner of the RuleGroup. • Your policy must be composed using IAM Policy version 2012-10-17. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 PutPermissionPolicy 1139 API Reference AWS WAFV2 Examples Example policy parameter - No escape characters This example illustrates one usage of PutPermissionPolicy. { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "AWS": "arn:aws:iam::111111111111:user/MyUserName" }, "Action": [ "waf:UpdateWebACL", "waf-regional:UpdateWebACL", "waf:GetRuleGroup", "waf-regional:GetRuleGroup" ] } ] } Example policy parameter - () This example illustrates one usage of PutPermissionPolicy. {\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"AWS \":\"arn:aws:iam::111111111111:user\/MyUserName\"},\"Action\":[\"waf:UpdateWebACL\", \"waf-regional:UpdateWebACL\",\"waf:GetRuleGroup\",\"waf-regional:GetRuleGroup\"]}]} See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ PutPermissionPolicy 1140 AWS WAFV2 • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference PutPermissionPolicy 1141 AWS WAFV2 API Reference TagResource Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Associates tags with the specified AWS resource. Tags are key:value pairs that you can use to categorize and manage your resources, for purposes like billing. For example, you might set the tag key to "customer" and the value to the customer name or ID. You can specify one or more tags to add to each AWS resource, up to 50 tags for a resource. Tagging is only available through the API, SDKs, and CLI. You can't manage or view tags through the AWS WAF Classic console. You can use this action to tag the AWS resources that you manage through AWS WAF Classic: web ACLs, rule groups, and rules. Request Syntax { "ResourceARN": "string", "Tags": [ { "Key": "string", "Value": "string" } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. TagResource 1142 AWS WAFV2 ResourceARN Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. API Reference Pattern: .*\S.* Required: Yes Tags Type: Array of Tag objects Array Members: Minimum number of 1 item. Required: Yes Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For
waf-apiref-230
waf-apiref.pdf
230
Request Syntax { "ResourceARN": "string", "Tags": [ { "Key": "string", "Value": "string" } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. TagResource 1142 AWS WAFV2 ResourceARN Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. API Reference Pattern: .*\S.* Required: Yes Tags Type: Array of Tag objects Array Members: Minimum number of 1 item. Required: Yes Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. WAFBadRequestException HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. TagResource 1143 AWS WAFV2 API Reference • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: TagResource 1144 API Reference AWS WAFV2 • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 TagResource 1145 AWS WAFV2 API Reference UntagResource Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Request Syntax { "ResourceARN": "string", "TagKeys": [ "string" ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ResourceARN Type: String Length Constraints: Minimum length of 1. Maximum length of 1224. Pattern: .*\S.* Required: Yes TagKeys Type: Array of strings UntagResource 1146 AWS WAFV2 API Reference Array Members: Minimum number of 1 item. Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Elements If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body. Errors For information about the errors that are common to all actions, see Common Errors. WAFBadRequestException HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. UntagResource 1147 AWS WAFV2 API Reference • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update
waf-apiref-231
waf-apiref.pdf
231
invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. UntagResource 1147 AWS WAFV2 API Reference • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFTagOperationException HTTP Status Code: 400 WAFTagOperationInternalErrorException HTTP Status Code: 500 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UntagResource 1148 AWS WAFV2 API Reference UntagResource 1149 AWS WAFV2 API Reference UpdateByteMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For each ByteMatchTuple object, you specify the following values: • Whether to insert or delete the object from the array. If you want to change a ByteMatchSetUpdate object, you delete the existing object and add a new one. • The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header. • The bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to look for. For more information, including how you specify the values for the AWS WAF API and the AWS CLI or AWS SDKs, see TargetString in the ByteMatchTuple data type. • Where to look, such as at the beginning or the end of a query string. • Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string. For example, you can add a ByteMatchSetUpdate object that matches web requests in which User-Agent headers contain the string BadBot. You can then configure AWS WAF to block those requests. To create and configure a ByteMatchSet, perform the following steps: 1. Create a ByteMatchSet. For more information, see CreateByteMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateByteMatchSet request. UpdateByteMatchSet 1150 AWS WAFV2 API Reference 3. Submit an UpdateByteMatchSet request to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI path) and the value 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. Request Syntax { "ByteMatchSetId": "string", "ChangeToken": "string", "Updates": [ { "Action": "string", "ByteMatchTuple": { "FieldToMatch": { "Data": "string", "Type": "string" }, "PositionalConstraint": "string", "TargetString": blob, "TextTransformation": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ByteMatchSetId The ByteMatchSetId of the ByteMatchSet that you want to update. ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. UpdateByteMatchSet 1151 API Reference AWS WAFV2 Pattern: .*\S.* Required: Yes ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of ByteMatchSetUpdate objects that you want to insert into or delete from a ByteMatchSet. For more information, see the applicable data types: • ByteMatchSetUpdate: Contains Action and ByteMatchTuple • ByteMatchTuple: Contains FieldToMatch, PositionalConstraint, TargetString, and TextTransformation • FieldToMatch: Contains Data and Type Type: Array of ByteMatchSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string"
waf-apiref-232
waf-apiref.pdf
232
1151 API Reference AWS WAFV2 Pattern: .*\S.* Required: Yes ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of ByteMatchSetUpdate objects that you want to insert into or delete from a ByteMatchSet. For more information, see the applicable data types: • ByteMatchSetUpdate: Contains Action and ByteMatchTuple • ByteMatchTuple: Contains FieldToMatch, PositionalConstraint, TargetString, and TextTransformation • FieldToMatch: Contains Data and Type Type: Array of ByteMatchSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. UpdateByteMatchSet 1152 AWS WAFV2 ChangeToken API Reference The ChangeToken that you used to submit the UpdateByteMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. UpdateByteMatchSet 1153 AWS WAFV2 HTTP Status Code: 400 WAFInvalidParameterException API Reference The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. UpdateByteMatchSet 1154 AWS WAFV2 API Reference • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateByteMatchSet 1155 AWS WAFV2 API Reference UpdateGeoMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025.
waf-apiref-233
waf-apiref.pdf
233
Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateByteMatchSet 1155 AWS WAFV2 API Reference UpdateGeoMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes GeoMatchConstraint objects in an GeoMatchSet. For each GeoMatchConstraint object, you specify the following values: • Whether to insert or delete the object from the array. If you want to change an GeoMatchConstraint object, you delete the existing object and add a new one. • The Type. The only valid value for Type is Country. • The Value, which is a two character code for the country to add to the GeoMatchConstraint object. Valid codes are listed in GeoMatchConstraint:Value. To create and configure an GeoMatchSet, perform the following steps: 1. Submit a CreateGeoMatchSet request. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateGeoMatchSet request. 3. Submit an UpdateGeoMatchSet request to specify the country that you want AWS WAF to watch for. When you update an GeoMatchSet, you specify the country that you want to add and/or the country that you want to delete. If you want to change a country, you delete the existing country and add the new one. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. UpdateGeoMatchSet 1156 API Reference AWS WAFV2 Request Syntax { "ChangeToken": "string", "GeoMatchSetId": "string", "Updates": [ { "Action": "string", "GeoMatchConstraint": { "Type": "string", "Value": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes GeoMatchSetId The GeoMatchSetId of the GeoMatchSet that you want to update. GeoMatchSetId is returned by CreateGeoMatchSet and by ListGeoMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. UpdateGeoMatchSet 1157 AWS WAFV2 Pattern: .*\S.* Required: Yes Updates API Reference An array of GeoMatchSetUpdate objects that you want to insert into or delete from an GeoMatchSet. For more information, see the applicable data types: • GeoMatchSetUpdate: Contains Action and GeoMatchConstraint • GeoMatchConstraint: Contains Type and Value You can have only one Type and Value per GeoMatchConstraint. To add multiple countries, include multiple GeoMatchSetUpdate objects in your request. Type: Array of GeoMatchSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateGeoMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. UpdateGeoMatchSet 1158 AWS WAFV2 Pattern: .*\S.* Errors API Reference For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF
waf-apiref-234
waf-apiref.pdf
234
a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. UpdateGeoMatchSet 1159 AWS WAFV2 API Reference • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. UpdateGeoMatchSet 1160 AWS WAFV2 HTTP Status Code: 400 WAFReferencedItemException API Reference The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateGeoMatchSet 1161 AWS WAFV2 API Reference UpdateIPSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes IPSetDescriptor objects in an IPSet. For each IPSetDescriptor object, you specify the following values: • Whether to insert or delete the object from the array. If you want to change an IPSetDescriptor object, you delete the existing object and add a new one. • The IP address version, IPv4 or IPv6. • The IP address in CIDR notation, for example, 192.0.2.0/24 (for the range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32 (for the individual IP address 192.0.2.44). AWS WAF supports IPv4 address ranges: /8 and any range between /16 through /32. AWS WAF supports IPv6 address ranges: /24, /32, /48, /56, /64, and /128. For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing. IPv6 addresses can be represented using any of the following formats: • 1111:0000:0000:0000:0000:0000:0000:0111/128 • 1111:0:0:0:0:0:0:0111/128 • 1111::0111/128 • 1111::111/128 You use an IPSet to specify which web requests
waf-apiref-235
waf-apiref.pdf
235
version, IPv4 or IPv6. • The IP address in CIDR notation, for example, 192.0.2.0/24 (for the range of IP addresses from 192.0.2.0 to 192.0.2.255) or 192.0.2.44/32 (for the individual IP address 192.0.2.44). AWS WAF supports IPv4 address ranges: /8 and any range between /16 through /32. AWS WAF supports IPv6 address ranges: /24, /32, /48, /56, /64, and /128. For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing. IPv6 addresses can be represented using any of the following formats: • 1111:0000:0000:0000:0000:0000:0000:0111/128 • 1111:0:0:0:0:0:0:0111/128 • 1111::0111/128 • 1111::111/128 You use an IPSet to specify which web requests you want to allow or block based on the IP addresses that the requests originated from. For example, if you're receiving a lot of requests UpdateIPSet 1162 AWS WAFV2 API Reference from one or a small number of IP addresses and you want to block the requests, you can create an IPSet that specifies those IP addresses, and then configure AWS WAF to block the requests. To create and configure an IPSet, perform the following steps: 1. Submit a CreateIPSet request. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateIPSet request. 3. Submit an UpdateIPSet request to specify the IP addresses that you want AWS WAF to watch for. When you update an IPSet, you specify the IP addresses that you want to add and the IP addresses that you want to delete. If you want to change an IP address, delete the existing IP address and add the new one. You can update a maximum of 1,000 addresses in a single request. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "IPSetId": "string", "Updates": [ { "Action": "string", "IPSetDescriptor": { "Type": "string", "Value": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. UpdateIPSet 1163 AWS WAFV2 API Reference The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes IPSetId The IPSetId of the IPSet that you want to update. IPSetId is returned by CreateIPSet and by ListIPSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of IPSetUpdate objects that you want to insert into or delete from an IPSet. For more information, see the applicable data types: • IPSetUpdate: Contains Action and IPSetDescriptor • IPSetDescriptor: Contains Type and Value You can specify a maximum of 1,000 addresses in a single request, for example, in a single request you can insert 999 addresses and delete 1 address, but you can't insert 999 addresses and delete 2 addresses. Type: Array of IPSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes UpdateIPSet 1164 AWS WAFV2 Response Syntax { "ChangeToken": "string" } Response Elements API Reference If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateIPSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: UpdateIPSet 1165 AWS WAFV2 API Reference • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action
waf-apiref-236
waf-apiref.pdf
236
remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. UpdateIPSet 1166 AWS WAFV2 API Reference HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface UpdateIPSet 1167 API Reference AWS WAFV2 • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateIPSet 1168 AWS WAFV2 API Reference UpdateRateBasedRule Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes Predicate objects in a rule and updates the RateLimit in the rule. Each Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests that you want to block or count. The RateLimit specifies the number of requests every five minutes that triggers the rule. If you add more than one predicate to a RateBasedRule, a request must match all the predicates and exceed the RateLimit to be counted or blocked. For example, suppose you add the following to a RateBasedRule: • An IPSet that matches the IP address 192.0.2.44/32 • A ByteMatchSet that matches BadBot in the User-Agent header Further, you specify a RateLimit of 1,000. You then add the RateBasedRule to a WebACL and specify that you want to block requests that satisfy the rule. For a request to be blocked, it must come from the IP address 192.0.2.44 and the User-Agent header in the request must contain the value BadBot. Further, requests that match these two conditions much be received at a rate of more than 1,000 every five minutes. If the rate drops below
waf-apiref-237
waf-apiref.pdf
237
to a RateBasedRule: • An IPSet that matches the IP address 192.0.2.44/32 • A ByteMatchSet that matches BadBot in the User-Agent header Further, you specify a RateLimit of 1,000. You then add the RateBasedRule to a WebACL and specify that you want to block requests that satisfy the rule. For a request to be blocked, it must come from the IP address 192.0.2.44 and the User-Agent header in the request must contain the value BadBot. Further, requests that match these two conditions much be received at a rate of more than 1,000 every five minutes. If the rate drops below this limit, AWS WAF no longer blocks the requests. As a second example, suppose you want to limit requests to a particular page on your site. To do this, you could add the following to a RateBasedRule: • A ByteMatchSet with FieldToMatch of URI UpdateRateBasedRule 1169 AWS WAFV2 API Reference • A PositionalConstraint of STARTS_WITH • A TargetString of login Further, you specify a RateLimit of 1,000. By adding this RateBasedRule to a WebACL, you could limit requests to your login page without affecting the rest of your site. Request Syntax { "ChangeToken": "string", "RateLimit": number, "RuleId": "string", "Updates": [ { "Action": "string", "Predicate": { "DataId": "string", "Negated": boolean, "Type": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* UpdateRateBasedRule 1170 AWS WAFV2 Required: Yes RateLimit API Reference The maximum number of requests, which have an identical value in the field specified by the RateKey, allowed in a five-minute period. If the number of requests exceeds the RateLimit and the other predicates specified in the rule are also met, AWS WAF triggers the action that is specified for this rule. Type: Long Valid Range: Minimum value of 100. Maximum value of 2000000000. Required: Yes RuleId The RuleId of the RateBasedRule that you want to update. RuleId is returned by CreateRateBasedRule and by ListRateBasedRules. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of RuleUpdate objects that you want to insert into or delete from a RateBasedRule. Type: Array of RuleUpdate objects Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. UpdateRateBasedRule 1171 AWS WAFV2 API Reference The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateRateBasedRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. UpdateRateBasedRule 1172 AWS WAFV2 API Reference • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or
waf-apiref-238
waf-apiref.pdf
238
action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. UpdateRateBasedRule 1173 AWS WAFV2 API Reference • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 UpdateRateBasedRule 1174 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference UpdateRateBasedRule 1175 AWS WAFV2 API Reference UpdateRegexMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes RegexMatchTuple objects (filters) in a RegexMatchSet. For each RegexMatchSetUpdate object, you specify the following values: • Whether to insert or delete the object from the array. If you want to change a RegexMatchSetUpdate object, you delete the existing object and add a new one. • The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header. • The identifier of the pattern (a regular expression) that you want AWS WAF to look for. For more information, see RegexPatternSet. • Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string. For example, you can create a RegexPatternSet that matches any requests with User-Agent headers that contain the string B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests. To create and configure a RegexMatchSet, perform the following steps: 1. Create a RegexMatchSet. For more information, see CreateRegexMatchSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRegexMatchSet request. 3. Submit an UpdateRegexMatchSet request to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI path) and the identifier of the UpdateRegexMatchSet 1176 AWS WAFV2 API Reference RegexPatternSet that contain the regular expression patterns 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. Request Syntax { "ChangeToken": "string", "RegexMatchSetId": "string", "Updates": [ { "Action": "string", "RegexMatchTuple": { "FieldToMatch": { "Data": "string", "Type": "string" }, "RegexPatternSetId": "string", "TextTransformation": "string" } }
waf-apiref-239
waf-apiref.pdf
239
an UpdateRegexMatchSet request to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI path) and the identifier of the UpdateRegexMatchSet 1176 AWS WAFV2 API Reference RegexPatternSet that contain the regular expression patterns 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. Request Syntax { "ChangeToken": "string", "RegexMatchSetId": "string", "Updates": [ { "Action": "string", "RegexMatchTuple": { "FieldToMatch": { "Data": "string", "Type": "string" }, "RegexPatternSetId": "string", "TextTransformation": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* UpdateRegexMatchSet 1177 AWS WAFV2 Required: Yes RegexMatchSetId API Reference The RegexMatchSetId of the RegexMatchSet that you want to update. RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of RegexMatchSetUpdate objects that you want to insert into or delete from a RegexMatchSet. For more information, see RegexMatchTuple. Type: Array of RegexMatchSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateRegexMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. UpdateRegexMatchSet 1178 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFDisallowedNameException The name specified is invalid. HTTP Status Code: 400 WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. UpdateRegexMatchSet 1179 AWS WAFV2 HTTP Status Code: 400 WAFLimitsExceededException API Reference The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface UpdateRegexMatchSet 1180 API Reference AWS WAFV2 • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateRegexMatchSet 1181 AWS WAFV2 API Reference UpdateRegexPatternSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic
waf-apiref-240
waf-apiref.pdf
240
see the following: • AWS Command Line Interface UpdateRegexMatchSet 1180 API Reference AWS WAFV2 • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateRegexMatchSet 1181 AWS WAFV2 API Reference UpdateRegexPatternSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes RegexPatternString objects in a RegexPatternSet. For each RegexPatternString object, you specify the following values: • Whether to insert or delete the RegexPatternString. • The regular expression pattern that you want to insert or delete. For more information, see RegexPatternSet. For example, you can create a RegexPatternString such as B[a@]dB[o0]t. AWS WAF will match this RegexPatternString to: • BadBot • BadB0t • B@dBot • B@dB0t To create and configure a RegexPatternSet, perform the following steps: 1. Create a RegexPatternSet. For more information, see CreateRegexPatternSet. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRegexPatternSet request. 3. Submit an UpdateRegexPatternSet request to specify the regular expression pattern that you want AWS WAF to watch for. UpdateRegexPatternSet 1182 AWS WAFV2 API Reference For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "RegexPatternSetId": "string", "Updates": [ { "Action": "string", "RegexPatternString": "string" } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RegexPatternSetId The RegexPatternSetId of the RegexPatternSet that you want to update. RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. UpdateRegexPatternSet 1183 AWS WAFV2 Pattern: .*\S.* Required: Yes Updates API Reference An array of RegexPatternSetUpdate objects that you want to insert into or delete from a RegexPatternSet. Type: Array of RegexPatternSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateRegexPatternSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. UpdateRegexPatternSet 1184 AWS WAFV2 WAFInternalErrorException API Reference The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidRegexPatternException The regular expression (regex) you specified in RegexPatternString is invalid. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 UpdateRegexPatternSet 1185 AWS WAFV2 API Reference WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or
waf-apiref-241
waf-apiref.pdf
241
Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 UpdateRegexPatternSet 1185 AWS WAFV2 API Reference WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin UpdateRegexPatternSet 1186 AWS WAFV2 • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference UpdateRegexPatternSet 1187 AWS WAFV2 API Reference UpdateRule Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes Predicate objects in a Rule. Each Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests that you want to allow, block, or count. If you add more than one predicate to a Rule, a request must match all of the specifications to be allowed, blocked, or counted. For example, suppose that you add the following to a Rule: • A ByteMatchSet that matches the value BadBot in the User-Agent header • An IPSet that matches the IP address 192.0.2.44 You then add the Rule to a WebACL and specify that you want to block requests that satisfy the Rule. For a request to be blocked, the User-Agent header in the request must contain the value BadBot and the request must originate from the IP address 192.0.2.44. To create and configure a Rule, perform the following steps: 1. Create and update the predicates that you want to include in the Rule. 2. Create the Rule. See CreateRule. 3. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRule request. 4. Submit an UpdateRule request to add predicates to the Rule. 5. Create and update a WebACL that contains the Rule. See CreateWebACL. If you want to replace one ByteMatchSet or IPSet with another, you delete the existing one and add the new one. UpdateRule 1188 AWS WAFV2 API Reference For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "RuleId": "string", "Updates": [ { "Action": "string", "Predicate": { "DataId": "string", "Negated": boolean, "Type": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RuleId The RuleId of the Rule that you want to update. RuleId is returned by CreateRule and by ListRules. UpdateRule 1189 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of RuleUpdate objects that you want to insert into or delete from a Rule. For more information, see the applicable data types: • RuleUpdate: Contains Action and Predicate • Predicate: Contains DataId, Negated, and Type • FieldToMatch: Contains Data and Type Type: Array of RuleUpdate objects Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following
waf-apiref-242
waf-apiref.pdf
242
CreateRule and by ListRules. UpdateRule 1189 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of RuleUpdate objects that you want to insert into or delete from a Rule. For more information, see the applicable data types: • RuleUpdate: Contains Action and Predicate • Predicate: Contains DataId, Negated, and Type • FieldToMatch: Contains Data and Type Type: Array of RuleUpdate objects Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateRule request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. UpdateRule 1190 AWS WAFV2 Pattern: .*\S.* Errors API Reference For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. UpdateRule 1191 AWS WAFV2 API Reference • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. UpdateRule 1192 AWS WAFV2 HTTP Status Code: 400 WAFReferencedItemException API Reference The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS
waf-apiref-243
waf-apiref.pdf
243
by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateRule 1193 AWS WAFV2 API Reference UpdateRuleGroup Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes ActivatedRule objects in a RuleGroup. You can only insert REGULAR rules into a rule group. You can have a maximum of ten rules per rule group. To create and configure a RuleGroup, perform the following steps: 1. Create and update the Rules that you want to include in the RuleGroup. See CreateRule. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateRuleGroup request. 3. Submit an UpdateRuleGroup request to add Rules to the RuleGroup. 4. Create and update a WebACL that contains the RuleGroup. See CreateWebACL. If you want to replace one Rule with another, you delete the existing one and add the new one. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "RuleGroupId": "string", "Updates": [ UpdateRuleGroup 1194 API Reference AWS WAFV2 { "Action": "string", "ActivatedRule": { "Action": { "Type": "string" }, "ExcludedRules": [ { "RuleId": "string" } ], "OverrideAction": { "Type": "string" }, "Priority": number, "RuleId": "string", "Type": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes RuleGroupId The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups. UpdateRuleGroup 1195 AWS WAFV2 Type: String API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of RuleGroupUpdate objects that you want to insert into or delete from a RuleGroup. You can only insert REGULAR rules into a rule group. ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup to a WebACL. In this case you do not use ActivatedRule|Action. For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. Type: Array of RuleGroupUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateRuleGroup request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String UpdateRuleGroup 1196 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an
waf-apiref-244
waf-apiref.pdf
244
isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. UpdateRuleGroup 1197 AWS WAFV2 API Reference • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. UpdateRuleGroup 1198 AWS WAFV2 HTTP Status Code: 400 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateRuleGroup 1199 AWS WAFV2 API Reference UpdateSizeConstraintSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. For each SizeConstraint object, you specify the following values: • Whether to insert or delete the object from the array. If you want to change a SizeConstraintSetUpdate object, you delete the existing object and add a new one. • The part of a web request that you want AWS WAF to evaluate, such as the length of a query string or the length of the User-Agent header. • Whether to perform any transformations on the request, such as converting it to lowercase, before checking its length. Note that transformations of the request body are not supported because the AWS resource forwards only the first 8192 bytes of your request to AWS WAF. You can only specify a single type of TextTransformation. • A ComparisonOperator used for evaluating the selected part of the request against the specified Size, such as equals, greater than, less than, and so on. • The length, in bytes, that you want AWS WAF to watch for in selected part of the request. The length is computed after applying the transformation. For example, you can add a SizeConstraintSetUpdate object that matches web requests in which the length of the User-Agent header is greater than 100 bytes. You can then configure AWS WAF to block those requests. To create and configure a SizeConstraintSet, perform the following steps:
waf-apiref-245
waf-apiref.pdf
245
of TextTransformation. • A ComparisonOperator used for evaluating the selected part of the request against the specified Size, such as equals, greater than, less than, and so on. • The length, in bytes, that you want AWS WAF to watch for in selected part of the request. The length is computed after applying the transformation. For example, you can add a SizeConstraintSetUpdate object that matches web requests in which the length of the User-Agent header is greater than 100 bytes. You can then configure AWS WAF to block those requests. To create and configure a SizeConstraintSet, perform the following steps: 1. Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet. UpdateSizeConstraintSet 1200 AWS WAFV2 API Reference 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateSizeConstraintSet request. 3. Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect (for example, the header or the URI path) and the value 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. Request Syntax { "ChangeToken": "string", "SizeConstraintSetId": "string", "Updates": [ { "Action": "string", "SizeConstraint": { "ComparisonOperator": "string", "FieldToMatch": { "Data": "string", "Type": "string" }, "Size": number, "TextTransformation": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String UpdateSizeConstraintSet 1201 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes SizeConstraintSetId The SizeConstraintSetId of the SizeConstraintSet that you want to update. SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of SizeConstraintSetUpdate objects that you want to insert into or delete from a SizeConstraintSet. For more information, see the applicable data types: • SizeConstraintSetUpdate: Contains Action and SizeConstraint • SizeConstraint: Contains FieldToMatch, TextTransformation, ComparisonOperator, and Size • FieldToMatch: Contains Data and Type Type: Array of SizeConstraintSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. UpdateSizeConstraintSet 1202 AWS WAFV2 API Reference The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateSizeConstraintSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. UpdateSizeConstraintSet 1203 AWS WAFV2 API Reference • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a
waf-apiref-246
waf-apiref.pdf
246
or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. UpdateSizeConstraintSet 1204 AWS WAFV2 API Reference • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFReferencedItemException The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 UpdateSizeConstraintSet 1205 AWS WAFV2 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 API Reference UpdateSizeConstraintSet 1206 AWS WAFV2 API Reference UpdateSqlInjectionMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. For each SqlInjectionMatchTuple object, you specify the following values: • Action: Whether to insert the object into or delete the object from the array. To change a SqlInjectionMatchTuple, you delete the existing object and add a new one. • FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, the name of the header or parameter. • TextTransformation: Which text transformation, if any, to perform on the web request before inspecting the request for snippets of malicious SQL code. You can only specify a single type of TextTransformation. You use SqlInjectionMatchSet objects to specify which Amazon 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: 1. Submit a CreateSqlInjectionMatchSet request. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateIPSet request. UpdateSqlInjectionMatchSet 1207 AWS WAFV2 API Reference 3. Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests that you want AWS WAF to inspect for snippets of SQL code. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "SqlInjectionMatchSetId": "string", "Updates": [ { "Action": "string", "SqlInjectionMatchTuple": { "FieldToMatch": { "Data": "string", "Type": "string" }, "TextTransformation": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the
waf-apiref-247
waf-apiref.pdf
247
UpdateSqlInjectionMatchSet 1207 AWS WAFV2 API Reference 3. Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests that you want AWS WAF to inspect for snippets of SQL code. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "SqlInjectionMatchSetId": "string", "Updates": [ { "Action": "string", "SqlInjectionMatchTuple": { "FieldToMatch": { "Data": "string", "Type": "string" }, "TextTransformation": "string" } } ] } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes UpdateSqlInjectionMatchSet 1208 AWS WAFV2 SqlInjectionMatchSetId API Reference The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to update. SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates 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 Type: Array of SqlInjectionMatchSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. UpdateSqlInjectionMatchSet 1209 AWS WAFV2 ChangeToken API Reference 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. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. UpdateSqlInjectionMatchSet 1210 AWS WAFV2 HTTP Status Code: 400 WAFInvalidParameterException API Reference The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. UpdateSqlInjectionMatchSet 1211 AWS WAFV2 API Reference • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed
waf-apiref-248
waf-apiref.pdf
248
or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. UpdateSqlInjectionMatchSet 1211 AWS WAFV2 API Reference • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateSqlInjectionMatchSet 1212 AWS WAFV2 API Reference UpdateWebACL Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies web requests that you want to allow, block, or count. When you update a WebACL, you specify the following values: • A default action for the WebACL, either ALLOW or BLOCK. AWS WAF performs the default action if a request doesn't match the criteria in any of the Rules in a WebACL. • The Rules that you want to add or delete. If you want to replace one Rule with another, you delete the existing Rule and add the new one. • For each Rule, whether you want AWS WAF to allow requests, block requests, or count requests that match the conditions in the Rule. • The order in which you want AWS WAF to evaluate the Rules in a WebACL. If you add more than one Rule to a WebACL, AWS WAF evaluates each request against the Rules in order based on the value of Priority. (The Rule that has the lowest value for Priority is evaluated first.) When a web request matches all the predicates (such as ByteMatchSets and IPSets) in a Rule, AWS WAF immediately takes the corresponding action, allow or block, and doesn't evaluate the request against the remaining Rules in the WebACL, if any. To create and configure a WebACL, perform the following steps: 1. Create and update the predicates that you want to include in Rules. For more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet. 2. Create and update the Rules that you want to include in the WebACL. For more information, see CreateRule and UpdateRule. UpdateWebACL 1213 AWS WAFV2 API Reference 3. Create a WebACL. See CreateWebACL. 4. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateWebACL request. 5. Submit an UpdateWebACL request to specify the Rules that you want to include in the WebACL, to specify the default action, and to associate the WebACL with an Amazon CloudFront distribution. The ActivatedRule can be a rule group. If you specify a rule group as your ActivatedRule, you can exclude specific rules from that rule group. If you already have a rule group associated with a web ACL and want to submit an UpdateWebACL request to exclude certain rules from that rule group, you must first remove the rule group from the web ACL, the re-insert it again, specifying the excluded rules. For details, see ActivatedRule:ExcludedRules. Be aware that if you try to add a RATE_BASED rule to a web ACL without setting the rule type when first creating the rule, the UpdateWebACL request will fail because the request tries to add a REGULAR rule (the default rule type) with the specified ID, which does not exist. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "DefaultAction": { "Type": "string" }, "Updates": [ { "Action": "string", "ActivatedRule": { "Action": { "Type": "string" }, "ExcludedRules": [ { "RuleId": "string" } UpdateWebACL 1214 API Reference AWS WAFV2
waf-apiref-249
waf-apiref.pdf
249
a RATE_BASED rule to a web ACL without setting the rule type when first creating the rule, the UpdateWebACL request will fail because the request tries to add a REGULAR rule (the default rule type) with the specified ID, which does not exist. For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "DefaultAction": { "Type": "string" }, "Updates": [ { "Action": "string", "ActivatedRule": { "Action": { "Type": "string" }, "ExcludedRules": [ { "RuleId": "string" } UpdateWebACL 1214 API Reference AWS WAFV2 ], "OverrideAction": { "Type": "string" }, "Priority": number, "RuleId": "string", "Type": "string" } } ], "WebACLId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes DefaultAction Type: WafAction object Required: No Updates An array of updates to make to the WebACL. An array of WebACLUpdate objects that you want to insert into or delete from a WebACL. For more information, see the applicable data types: • WebACLUpdate: Contains Action and ActivatedRule UpdateWebACL 1215 AWS WAFV2 API Reference • ActivatedRule: Contains Action, OverrideAction, Priority, RuleId, and Type. ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup to a WebACL. In this case, you do not use ActivatedRule|Action. For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction. • WafAction: Contains Type Type: Array of WebACLUpdate objects Required: No WebACLId The WebACLId of the WebACL that you want to update. WebACLId is returned by CreateWebACL and by ListWebACLs. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateWebACL request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String UpdateWebACL 1216 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. UpdateWebACL 1217 AWS WAFV2 API Reference • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete
waf-apiref-250
waf-apiref.pdf
250
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. UpdateWebACL 1218 AWS WAFV2 HTTP Status Code: 400 WAFReferencedItemException API Reference The operation failed because you tried to delete an object that is still in use. For example: • You tried to delete a ByteMatchSet that is still referenced by a Rule. • You tried to delete a Rule that is still referenced by a WebACL. HTTP Status Code: 400 WAFStaleDataException The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 WAFSubscriptionNotFoundException The specified subscription does not exist. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateWebACL 1219 AWS WAFV2 API Reference UpdateXssMatchSet Service: AWS WAF Classic Regional Note AWS WAF Classic support will end on September 30, 2025. This is AWS WAF Classic documentation. For more information, see AWS WAF Classic in the developer guide. For the latest version of AWS WAF , use the AWS WAFV2 API and see the AWS WAF Developer Guide. With the latest version, AWS WAF has a single set of endpoints for regional and global use. Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. For each XssMatchTuple object, you specify the following values: • Action: Whether to insert the object into or delete the object from the array. To change an XssMatchTuple, you delete the existing object and add a new one. • FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, the name of the header or parameter. • TextTransformation: Which text transformation, if any, to perform on the web request before inspecting the request for cross-site scripting attacks. You can only specify a single type of TextTransformation. You use XssMatchSet objects to specify which Amazon CloudFront requests that you want to allow, block, or count. For example, if you're receiving requests that contain cross-site scripting attacks in the request body and you want to block the requests, you can create an XssMatchSet with the applicable settings, and then configure AWS WAF to block the requests. To create and configure an XssMatchSet, perform the following steps: 1. Submit a CreateXssMatchSet request. 2. Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an UpdateIPSet request. 3. Submit an UpdateXssMatchSet request to specify the parts of web requests that you want AWS WAF to inspect for cross-site scripting attacks. UpdateXssMatchSet 1220 AWS WAFV2 API Reference For more information about how to use the AWS WAF API to allow or block HTTP requests, see the AWS WAF Developer Guide. Request Syntax { "ChangeToken": "string", "Updates": [ { "Action": "string", "XssMatchTuple": { "FieldToMatch": { "Data": "string", "Type": "string" }, "TextTransformation": "string" } } ], "XssMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of XssMatchSetUpdate objects that you want to insert into or delete from an XssMatchSet. For more information, see the applicable data types: UpdateXssMatchSet 1221 AWS WAFV2 API Reference • XssMatchSetUpdate: Contains Action and XssMatchTuple
waf-apiref-251
waf-apiref.pdf
251
"Type": "string" }, "TextTransformation": "string" } } ], "XssMatchSetId": "string" } Request Parameters For information about the parameters that are common to all actions, see Common Parameters. The request accepts the following data in JSON format. ChangeToken The value returned by the most recent call to GetChangeToken. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Updates An array of XssMatchSetUpdate objects that you want to insert into or delete from an XssMatchSet. For more information, see the applicable data types: UpdateXssMatchSet 1221 AWS WAFV2 API Reference • XssMatchSetUpdate: Contains Action and XssMatchTuple • XssMatchTuple: Contains FieldToMatch and TextTransformation • FieldToMatch: Contains Data and Type Type: Array of XssMatchSetUpdate objects Array Members: Minimum number of 1 item. Required: Yes XssMatchSetId The XssMatchSetId of the XssMatchSet that you want to update. XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets. Type: String Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Required: Yes Response Syntax { "ChangeToken": "string" } Response Elements If the action is successful, the service sends back an HTTP 200 response. The following data is returned in JSON format by the service. ChangeToken The ChangeToken that you used to submit the UpdateXssMatchSet request. You can also use this value to query the status of the request. For more information, see GetChangeTokenStatus. Type: String UpdateXssMatchSet 1222 AWS WAFV2 API Reference Length Constraints: Minimum length of 1. Maximum length of 128. Pattern: .*\S.* Errors For information about the errors that are common to all actions, see Common Errors. WAFInternalErrorException The operation failed because of a system problem, even though the request was valid. Retry your request. HTTP Status Code: 500 WAFInvalidAccountException The operation failed because you tried to create, update, or delete an object by using an invalid account identifier. HTTP Status Code: 400 WAFInvalidOperationException The operation failed because there was nothing to do. For example: • You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL. • You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet. • You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple isn't in the specified WebACL. • You tried to add a Rule to a WebACL, but the Rule already exists in the specified WebACL. • You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple already exists in the specified WebACL. HTTP Status Code: 400 WAFInvalidParameterException The operation failed because AWS WAF didn't recognize a parameter in the request. For example: • You specified an invalid parameter name. UpdateXssMatchSet 1223 AWS WAFV2 API Reference • You specified an invalid value. • You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) using an action other than INSERT or DELETE. • You tried to create a WebACL with a DefaultAction Type other than ALLOW, BLOCK, or COUNT. • You tried to create a RateBasedRule with a RateKey value other than IP. • You tried to update a WebACL with a WafAction Type other than ALLOW, BLOCK, or COUNT. • You tried to update a ByteMatchSet with a FieldToMatch Type other than HEADER, METHOD, QUERY_STRING, URI, or BODY. • You tried to update a ByteMatchSet with a Field of HEADER but no value for Data. • Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated. HTTP Status Code: 400 WAFLimitsExceededException The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create for an AWS account. For more information, see AWS WAF Classic quotas in the AWS WAF Developer Guide. HTTP Status Code: 400 WAFNonexistentContainerException The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example: • You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist. • You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist. • You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist. • You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. UpdateXssMatchSet 1224 AWS WAFV2 HTTP Status Code: 400 WAFStaleDataException API Reference The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS
waf-apiref-252
waf-apiref.pdf
252
You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet that doesn't exist. HTTP Status Code: 400 WAFNonexistentItemException The operation failed because the referenced object doesn't exist. UpdateXssMatchSet 1224 AWS WAFV2 HTTP Status Code: 400 WAFStaleDataException API Reference The operation failed because you tried to create, update, or delete an object by using a change token that has already been used. HTTP Status Code: 400 See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS Command Line Interface • AWS SDK for .NET • AWS SDK for C++ • AWS SDK for Go v2 • AWS SDK for Java V2 • AWS SDK for JavaScript V3 • AWS SDK for Kotlin • AWS SDK for PHP V3 • AWS SDK for Python • AWS SDK for Ruby V3 UpdateXssMatchSet 1225 AWS WAFV2 Data Types The following data types are supported by AWS WAFV2: API Reference • ActionCondition • AddressField • All • AllowAction • AllQueryArguments • AndStatement • APIKeySummary • AssociationConfig • AWSManagedRulesACFPRuleSet • AWSManagedRulesATPRuleSet • AWSManagedRulesBotControlRuleSet • BlockAction • Body • ByteMatchStatement • CaptchaAction • CaptchaConfig • CaptchaResponse • ChallengeAction • ChallengeConfig • ChallengeResponse • Condition • CookieMatchPattern • Cookies • CountAction • CustomHTTPHeader • CustomRequestHandling • CustomResponse 1226 AWS WAFV2 • CustomResponseBody • DataProtection • DataProtectionConfig • DefaultAction • EmailField • ExcludedRule • FieldToMatch • FieldToProtect • Filter • FirewallManagerRuleGroup • FirewallManagerStatement • ForwardedIPConfig • GeoMatchStatement • HeaderMatchPattern • HeaderOrder • Headers • HTTPHeader • HTTPRequest • ImmunityTimeProperty • IPSet • IPSetForwardedIPConfig • IPSetReferenceStatement • IPSetSummary • JA3Fingerprint • JA4Fingerprint • JsonBody • JsonMatchPattern • Label • LabelMatchStatement • LabelNameCondition API Reference 1227 AWS WAFV2 • LabelSummary • LoggingConfiguration • LoggingFilter • ManagedProductDescriptor • ManagedRuleGroupConfig • ManagedRuleGroupStatement • ManagedRuleGroupSummary • ManagedRuleGroupVersion • ManagedRuleSet • ManagedRuleSetSummary • ManagedRuleSetVersion • Method • MobileSdkRelease • NoneAction • NotStatement • OrStatement • OverrideAction • PasswordField • PhoneNumberField • QueryString • RateBasedStatement • RateBasedStatementCustomKey • RateBasedStatementManagedKeysIPSet • RateLimitCookie • RateLimitForwardedIP • RateLimitHeader • RateLimitHTTPMethod • RateLimitIP • RateLimitJA3Fingerprint • RateLimitJA4Fingerprint API Reference 1228 AWS WAFV2 • RateLimitLabelNamespace • RateLimitQueryArgument • RateLimitQueryString • RateLimitUriPath • Regex • RegexMatchStatement • RegexPatternSet • RegexPatternSetReferenceStatement • RegexPatternSetSummary • ReleaseSummary • RequestBodyAssociatedResourceTypeConfig • RequestInspection • RequestInspectionACFP • ResponseInspection • ResponseInspectionBodyContains • ResponseInspectionHeader • ResponseInspectionJson • ResponseInspectionStatusCode • Rule • RuleAction • RuleActionOverride • RuleGroup • RuleGroupReferenceStatement • RuleGroupSummary • RuleSummary • SampledHTTPRequest • SingleHeader • SingleQueryArgument • SizeConstraintStatement • SqliMatchStatement API Reference 1229 AWS WAFV2 • Statement • Tag • TagInfoForResource • TextTransformation • TimeWindow • UriFragment • UriPath • UsernameField • VersionToPublish • VisibilityConfig • WebACL • WebACLSummary • XssMatchStatement The following data types are supported by AWS WAF Classic: • ActivatedRule • ByteMatchSet • ByteMatchSetSummary • ByteMatchSetUpdate • ByteMatchTuple • ExcludedRule • FieldToMatch • GeoMatchConstraint • GeoMatchSet • GeoMatchSetSummary • GeoMatchSetUpdate • HTTPHeader • HTTPRequest • IPSet • IPSetDescriptor API Reference 1230 AWS WAFV2 • IPSetSummary • IPSetUpdate • LoggingConfiguration • Predicate • RateBasedRule • RegexMatchSet • RegexMatchSetSummary • RegexMatchSetUpdate • RegexMatchTuple • RegexPatternSet • RegexPatternSetSummary • RegexPatternSetUpdate • Rule • RuleGroup • RuleGroupSummary • RuleGroupUpdate • RuleSummary • RuleUpdate • SampledHTTPRequest • SizeConstraint • SizeConstraintSet • SizeConstraintSetSummary • SizeConstraintSetUpdate • SqlInjectionMatchSet • SqlInjectionMatchSetSummary • SqlInjectionMatchSetUpdate • SqlInjectionMatchTuple • SubscribedRuleGroupSummary • Tag • TagInfoForResource API Reference 1231 AWS WAFV2 • TimeWindow • WafAction • WafOverrideAction • WebACL • WebACLSummary • WebACLUpdate • XssMatchSet • XssMatchSetSummary • XssMatchSetUpdate • XssMatchTuple The following data types are supported by AWS WAF Classic Regional: • ActivatedRule • ByteMatchSet • ByteMatchSetSummary • ByteMatchSetUpdate • ByteMatchTuple • ExcludedRule • FieldToMatch • GeoMatchConstraint • GeoMatchSet • GeoMatchSetSummary • GeoMatchSetUpdate • HTTPHeader • HTTPRequest • IPSet • IPSetDescriptor • IPSetSummary • IPSetUpdate • LoggingConfiguration API Reference 1232 AWS WAFV2 • Predicate • RateBasedRule • RegexMatchSet • RegexMatchSetSummary • RegexMatchSetUpdate • RegexMatchTuple • RegexPatternSet • RegexPatternSetSummary • RegexPatternSetUpdate • Rule • RuleGroup • RuleGroupSummary • RuleGroupUpdate • RuleSummary • RuleUpdate • SampledHTTPRequest • SizeConstraint • SizeConstraintSet • SizeConstraintSetSummary • SizeConstraintSetUpdate • SqlInjectionMatchSet • SqlInjectionMatchSetSummary • SqlInjectionMatchSetUpdate • SqlInjectionMatchTuple • SubscribedRuleGroupSummary • Tag • TagInfoForResource • TimeWindow • WafAction • WafOverrideAction API Reference 1233 AWS WAFV2 • WebACL • WebACLSummary • WebACLUpdate • XssMatchSet • XssMatchSetSummary • XssMatchSetUpdate • XssMatchTuple AWS WAFV2 The following data types are supported by AWS WAFV2: • ActionCondition • AddressField • All • AllowAction • AllQueryArguments • AndStatement • APIKeySummary • AssociationConfig • AWSManagedRulesACFPRuleSet • AWSManagedRulesATPRuleSet • AWSManagedRulesBotControlRuleSet • BlockAction • Body • ByteMatchStatement • CaptchaAction • CaptchaConfig • CaptchaResponse • ChallengeAction • ChallengeConfig AWS WAFV2 API Reference 1234 API Reference AWS WAFV2 • ChallengeResponse • Condition • CookieMatchPattern • Cookies • CountAction • CustomHTTPHeader • CustomRequestHandling • CustomResponse • CustomResponseBody • DataProtection • DataProtectionConfig • DefaultAction • EmailField • ExcludedRule • FieldToMatch • FieldToProtect • Filter • FirewallManagerRuleGroup • FirewallManagerStatement • ForwardedIPConfig • GeoMatchStatement •
waf-apiref-253
waf-apiref.pdf
253
WAFV2 The following data types are supported by AWS WAFV2: • ActionCondition • AddressField • All • AllowAction • AllQueryArguments • AndStatement • APIKeySummary • AssociationConfig • AWSManagedRulesACFPRuleSet • AWSManagedRulesATPRuleSet • AWSManagedRulesBotControlRuleSet • BlockAction • Body • ByteMatchStatement • CaptchaAction • CaptchaConfig • CaptchaResponse • ChallengeAction • ChallengeConfig AWS WAFV2 API Reference 1234 API Reference AWS WAFV2 • ChallengeResponse • Condition • CookieMatchPattern • Cookies • CountAction • CustomHTTPHeader • CustomRequestHandling • CustomResponse • CustomResponseBody • DataProtection • DataProtectionConfig • DefaultAction • EmailField • ExcludedRule • FieldToMatch • FieldToProtect • Filter • FirewallManagerRuleGroup • FirewallManagerStatement • ForwardedIPConfig • GeoMatchStatement • HeaderMatchPattern • HeaderOrder • Headers • HTTPHeader • HTTPRequest • ImmunityTimeProperty • IPSet • IPSetForwardedIPConfig • IPSetReferenceStatement AWS WAFV2 1235 API Reference AWS WAFV2 • IPSetSummary • JA3Fingerprint • JA4Fingerprint • JsonBody • JsonMatchPattern • Label • LabelMatchStatement • LabelNameCondition • LabelSummary • LoggingConfiguration • LoggingFilter • ManagedProductDescriptor • ManagedRuleGroupConfig • ManagedRuleGroupStatement • ManagedRuleGroupSummary • ManagedRuleGroupVersion • ManagedRuleSet • ManagedRuleSetSummary • ManagedRuleSetVersion • Method • MobileSdkRelease • NoneAction • NotStatement • OrStatement • OverrideAction • PasswordField • PhoneNumberField • QueryString • RateBasedStatement • RateBasedStatementCustomKey AWS WAFV2 1236 AWS WAFV2 API Reference • RateBasedStatementManagedKeysIPSet • RateLimitCookie • RateLimitForwardedIP • RateLimitHeader • RateLimitHTTPMethod • RateLimitIP • RateLimitJA3Fingerprint • RateLimitJA4Fingerprint • RateLimitLabelNamespace • RateLimitQueryArgument • RateLimitQueryString • RateLimitUriPath • Regex • RegexMatchStatement • RegexPatternSet • RegexPatternSetReferenceStatement • RegexPatternSetSummary • ReleaseSummary • RequestBodyAssociatedResourceTypeConfig • RequestInspection • RequestInspectionACFP • ResponseInspection • ResponseInspectionBodyContains • ResponseInspectionHeader • ResponseInspectionJson • ResponseInspectionStatusCode • Rule • RuleAction • RuleActionOverride • RuleGroup AWS WAFV2 1237 API Reference AWS WAFV2 • RuleGroupReferenceStatement • RuleGroupSummary • RuleSummary • SampledHTTPRequest • SingleHeader • SingleQueryArgument • SizeConstraintStatement • SqliMatchStatement • Statement • Tag • TagInfoForResource • TextTransformation • TimeWindow • UriFragment • UriPath • UsernameField • VersionToPublish • VisibilityConfig • WebACL • WebACLSummary • XssMatchStatement AWS WAFV2 1238 AWS WAFV2 ActionCondition Service: AWS WAFV2 A single action condition for a Condition in a logging filter. Contents Action API Reference The action setting that a log record must contain in order to meet the condition. This is the action that AWS WAF applied to the web request. For rule groups, this is either the configured rule action setting, or if you've applied a rule action override to the rule, it's the override action. The value EXCLUDED_AS_COUNT matches on excluded rules and also on rules that have a rule action override of Count. Type: String Valid Values: ALLOW | BLOCK | COUNT | CAPTCHA | CHALLENGE | EXCLUDED_AS_COUNT Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 ActionCondition 1239 AWS WAFV2 AddressField Service: AWS WAFV2 API Reference The name of a field in the request payload that contains part or all of your customer's primary physical address. This data type is used in the RequestInspectionACFP data type. Contents Identifier The name of a single primary address field. How you specify the address fields depends on the request inspection payload type. • For JSON payloads, specify the field identifiers in JSON pointer syntax. For information about the JSON Pointer syntax, see the Internet Engineering Task Force (IETF) documentation JavaScript Object Notation (JSON) Pointer. For example, for the JSON payload { "form": { "primaryaddressline1": "THE_ADDRESS1", "primaryaddressline2": "THE_ADDRESS2", "primaryaddressline3": "THE_ADDRESS3" } }, the address field idenfiers are /form/primaryaddressline1, /form/primaryaddressline2, and /form/ primaryaddressline3. • For form encoded payload types, use the HTML form names. For example, for an HTML form with input elements named primaryaddressline1, primaryaddressline2, and primaryaddressline3, the address fields identifiers are primaryaddressline1, primaryaddressline2, and primaryaddressline3. Type: String Length Constraints: Minimum length of 1. Maximum length of 512. Pattern: .*\S.* Required: Yes AddressField 1240 AWS WAFV2 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AddressField 1241 AWS WAFV2 All Service: AWS WAFV2 API Reference Inspect all of the elements that AWS WAF has parsed and extracted from the web request component that you've identified in your FieldToMatch specifications. This is used in the FieldToMatch specification for some web request component types. JSON specification: "All": {} Contents The members of this exception structure are context-dependent. See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 All 1242 AWS WAFV2 AllowAction Service: AWS WAFV2 API Reference Specifies that AWS WAF should allow the request and optionally defines additional custom handling for the request. This is used in the context of other settings, for example to specify values
waf-apiref-254
waf-apiref.pdf
254
in the FieldToMatch specification for some web request component types. JSON specification: "All": {} Contents The members of this exception structure are context-dependent. See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 All 1242 AWS WAFV2 AllowAction Service: AWS WAFV2 API Reference Specifies that AWS WAF should allow the request and optionally defines additional custom handling for the request. This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction. Contents CustomRequestHandling Defines custom handling for the web request. For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide. Type: CustomRequestHandling object Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AllowAction 1243 AWS WAFV2 AllQueryArguments Service: AWS WAFV2 API Reference Inspect all query arguments of the web request. This is used in the FieldToMatch specification for some web request component types. JSON specification: "AllQueryArguments": {} Contents The members of this exception structure are context-dependent. See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AllQueryArguments 1244 AWS WAFV2 AndStatement Service: AWS WAFV2 API Reference A logical rule statement used to combine other rule statements with AND logic. You provide more than one Statement within the AndStatement. Contents Statements The statements to combine with AND logic. You can use any statements that can be nested. Type: Array of Statement objects Required: Yes See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AndStatement 1245 AWS WAFV2 APIKeySummary Service: AWS WAFV2 Information for a single API key. API Reference API keys are required for the integration of the CAPTCHA API in your JavaScript client applications. The API lets you customize the placement and characteristics of the CAPTCHA puzzle for your end users. For more information about the CAPTCHA JavaScript integration, see AWS WAF client application integration in the AWS WAF Developer Guide. Contents APIKey The generated, encrypted API key. You can copy this for use in your JavaScript CAPTCHA integration. Type: String Length Constraints: Minimum length of 1. Maximum length of 2048. Pattern: .*\S.* Required: No CreationTimestamp The date and time that the key was created. Type: Timestamp Required: No TokenDomains The token domains that are defined in this API key. Type: Array of strings Length Constraints: Minimum length of 1. Maximum length of 253. Pattern: ^[\w\.\-/]+$ Required: No APIKeySummary 1246 API Reference AWS WAFV2 Version Internal value used by AWS WAF to manage the key. Type: Integer Valid Range: Minimum value of 0. Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 APIKeySummary 1247 AWS WAFV2 AssociationConfig Service: AWS WAFV2 API Reference Specifies custom configurations for the associations between the web ACL and protected resources. Use this to customize the maximum size of the request body that your protected resources forward to AWS WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes). Note You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see AWS WAF Pricing. For Application Load Balancer and AWS AppSync, the limit is fixed at 8 KB (8,192 bytes). Contents RequestBody Customizes the maximum size of the request body that your protected CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access resources forward to AWS WAF for inspection. The default size is 16 KB (16,384 bytes). You can change the setting for any of the available resource types. Note You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see AWS WAF Pricing. Example JSON: { "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32" } For Application Load Balancer and AWS AppSync, the limit is fixed at 8 KB (8,192 bytes). Type: String to RequestBodyAssociatedResourceTypeConfig object map Valid Keys: CLOUDFRONT | API_GATEWAY | COGNITO_USER_POOL | APP_RUNNER_SERVICE | VERIFIED_ACCESS_INSTANCE AssociationConfig 1248 AWS WAFV2 Required: No See Also API Reference For
waf-apiref-255
waf-apiref.pdf
255
for inspection. The default size is 16 KB (16,384 bytes). You can change the setting for any of the available resource types. Note You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see AWS WAF Pricing. Example JSON: { "API_GATEWAY": "KB_48", "APP_RUNNER_SERVICE": "KB_32" } For Application Load Balancer and AWS AppSync, the limit is fixed at 8 KB (8,192 bytes). Type: String to RequestBodyAssociatedResourceTypeConfig object map Valid Keys: CLOUDFRONT | API_GATEWAY | COGNITO_USER_POOL | APP_RUNNER_SERVICE | VERIFIED_ACCESS_INSTANCE AssociationConfig 1248 AWS WAFV2 Required: No See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AssociationConfig 1249 AWS WAFV2 API Reference AWSManagedRulesACFPRuleSet Service: AWS WAFV2 Details for your use of the account creation fraud prevention managed rule group, AWSManagedRulesACFPRuleSet. This configuration is used in ManagedRuleGroupConfig. Contents CreationPath The path of the account creation endpoint for your application. This is the page on your website that accepts the completed registration form for a new user. This page must accept POST requests. For example, for the URL https://example.com/web/newaccount, you would provide the path /web/newaccount. Account creation page paths that start with the path that you provide are considered a match. For example /web/newaccount matches the account creation paths / web/newaccount, /web/newaccount/, /web/newaccountPage, and /web/newaccount/ thisPage, but doesn't match the path /home/web/newaccount or /website/newaccount. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: .*\S.* Required: Yes RegistrationPagePath The path of the account registration endpoint for your application. This is the page on your website that presents the registration form to new users. Note This page must accept GET text/html requests. For example, for the URL https://example.com/web/registration, you would provide the path /web/registration. Registration page paths that start with the path that you provide are considered a match. For example /web/registration matches the registration AWSManagedRulesACFPRuleSet 1250 AWS WAFV2 API Reference paths /web/registration, /web/registration/, /web/registrationPage, and /web/ registration/thisPage, but doesn't match the path /home/web/registration or / website/registration. Type: String Length Constraints: Minimum length of 1. Maximum length of 256. Pattern: .*\S.* Required: Yes RequestInspection The criteria for inspecting account creation requests, used by the ACFP rule group to validate and track account creation attempts. Type: RequestInspectionACFP object Required: Yes EnableRegexInPath Allow the use of regular expressions in the registration page path and the account creation path. Type: Boolean Required: No ResponseInspection The criteria for inspecting responses to account creation requests, used by the ACFP rule group to track account creation success rates. Note Response inspection is available only in web ACLs that protect Amazon CloudFront distributions. The ACFP rule group evaluates the responses that your protected resources send back to client account creation attempts, keeping count of successful and failed attempts from each IP AWSManagedRulesACFPRuleSet 1251 AWS WAFV2 API Reference address and client session. Using this information, the rule group labels and mitigates requests from client sessions and IP addresses that have had too many successful account creation attempts in a short amount of time. Type: ResponseInspection object Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AWSManagedRulesACFPRuleSet 1252 AWS WAFV2 API Reference AWSManagedRulesATPRuleSet Service: AWS WAFV2 Details for your use of the account takeover prevention managed rule group, AWSManagedRulesATPRuleSet. This configuration is used in ManagedRuleGroupConfig. Contents LoginPath The path of the login endpoint for your application. For example, for the URL https:// example.com/web/login, you would provide the path /web/login. Login paths that start with the path that you provide are considered a match. For example /web/login matches the login paths /web/login, /web/login/, /web/loginPage, and /web/login/thisPage, but doesn't match the login path /home/web/login or /website/login. The rule group inspects only HTTP POST requests to your specified login endpoint. Type: String Required: Yes EnableRegexInPath Allow the use of regular expressions in the login page path. Type: Boolean Required: No RequestInspection The criteria for inspecting login requests, used by the ATP rule group to validate credentials usage. Type: RequestInspection object Required: No ResponseInspection The criteria for inspecting responses to login requests, used by the ATP rule group to track login failure rates. AWSManagedRulesATPRuleSet 1253 AWS WAFV2 Note API Reference Response inspection is available only in web ACLs that protect Amazon CloudFront distributions. The ATP rule group evaluates the responses that your protected resources send back to client login attempts, keeping count of successful and failed attempts for each IP address and client session. Using this information, the rule group labels and mitigates requests from client sessions and IP addresses that have had too many failed login
waf-apiref-256
waf-apiref.pdf
256
usage. Type: RequestInspection object Required: No ResponseInspection The criteria for inspecting responses to login requests, used by the ATP rule group to track login failure rates. AWSManagedRulesATPRuleSet 1253 AWS WAFV2 Note API Reference Response inspection is available only in web ACLs that protect Amazon CloudFront distributions. The ATP rule group evaluates the responses that your protected resources send back to client login attempts, keeping count of successful and failed attempts for each IP address and client session. Using this information, the rule group labels and mitigates requests from client sessions and IP addresses that have had too many failed login attempts in a short amount of time. Type: ResponseInspection object Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AWSManagedRulesATPRuleSet 1254 AWS WAFV2 API Reference AWSManagedRulesBotControlRuleSet Service: AWS WAFV2 Details for your use of the Bot Control managed rule group, AWSManagedRulesBotControlRuleSet. This configuration is used in ManagedRuleGroupConfig. Contents InspectionLevel The inspection level to use for the Bot Control rule group. The common level is the least expensive. The targeted level includes all common level rules and adds rules with more advanced inspection criteria. For details, see AWS WAF Bot Control rule group in the AWS WAF Developer Guide. Type: String Valid Values: COMMON | TARGETED Required: Yes EnableMachineLearning Applies only to the targeted inspection level. Determines whether to use machine learning (ML) to analyze your web traffic for bot-related activity. Machine learning is required for the Bot Control rules TGT_ML_CoordinatedActivityLow and TGT_ML_CoordinatedActivityMedium, which inspect for anomalous behavior that might indicate distributed, coordinated bot activity. For more information about this choice, see the listing for these rules in the table at Bot Control rules listing in the AWS WAF Developer Guide. Default: TRUE Type: Boolean Required: No AWSManagedRulesBotControlRuleSet 1255 AWS WAFV2 See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 AWSManagedRulesBotControlRuleSet 1256 AWS WAFV2 BlockAction Service: AWS WAFV2 API Reference Specifies that AWS WAF should block the request and optionally defines additional custom handling for the response to the web request. This is used in the context of other settings, for example to specify values for RuleAction and web ACL DefaultAction. Contents CustomResponse Defines a custom response for the web request. For information about customizing web requests and responses, see Customizing web requests and responses in AWS WAF in the AWS WAF Developer Guide. Type: CustomResponse object Required: No See Also For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 BlockAction 1257 AWS WAFV2 Body Service: AWS WAFV2 API Reference Inspect the body of the web request. The body immediately follows the request headers. This is used to indicate the web request component to inspect, in the FieldToMatch specification. Contents OversizeHandling What AWS WAF should do if the body is larger than AWS WAF can inspect. AWS WAF does not support inspecting the entire contents of the web request body if the body exceeds the limit for the resource type. When a web request body is larger than the limit, the underlying host service only forwards the contents that are within the limit to AWS WAF for inspection. • For Application Load Balancer and AWS AppSync, the limit is fixed at 8 KB (8,192 bytes). • For CloudFront, API Gateway, Amazon Cognito, App Runner, and Verified Access, the default limit is 16 KB (16,384 bytes), and you can increase the limit for each resource type in the web ACL AssociationConfig, for additional processing fees. • For AWS Amplify, use the CloudFront limit. The options for oversize handling are the following: • CONTINUE - Inspect the available body contents normally, according to the rule inspection criteria. • MATCH - Treat the web request as matching the rule statement. AWS WAF applies the rule action to the request. • NO_MATCH - Treat the web request as not matching the rule statement. You can combine the MATCH or NO_MATCH settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit. Default: CONTINUE Type: String Valid Values: CONTINUE | MATCH | NO_MATCH Body 1258 AWS WAFV2 Required: No See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 Body 1259 AWS
waf-apiref-257
waf-apiref.pdf
257
- Treat the web request as not matching the rule statement. You can combine the MATCH or NO_MATCH settings for oversize handling with your rule and web ACL action settings, so that you block any request whose body is over the limit. Default: CONTINUE Type: String Valid Values: CONTINUE | MATCH | NO_MATCH Body 1258 AWS WAFV2 Required: No See Also API Reference For more information about using this API in one of the language-specific AWS SDKs, see the following: • AWS SDK for C++ • AWS SDK for Java V2 • AWS SDK for Ruby V3 Body 1259 AWS WAFV2 ByteMatchStatement Service: AWS WAFV2 API Reference A rule statement that defines a string match search for AWS WAF to apply to web requests. The byte match statement provides the bytes to search for, the location in requests that you want AWS WAF to search, and other settings. The bytes to search for are typically a string that corresponds with ASCII characters. In the AWS WAF console and the developer guide, this is called a string match statement. Contents FieldToMatch The part of the web request that you want AWS WAF to inspect. Type: FieldToMatch object Required: Yes PositionalConstraint The area within the portion of the web request that you want AWS WAF to search for SearchString. Valid values include the following: CONTAINS The specified part of the web request must include the value of SearchString, but the location doesn't matter. CONTAINS_WORD The specified part of the web request must include the value of SearchString, and SearchString must contain only alphanumeric characters or underscore (A-Z, a-z, 0-9, or _). In addition, SearchString must be a word, which means that both of the following are true: • SearchString is at the beginning of the specified part of the web request or is preceded by a character other than an alphanumeric character or underscore (_). Examples include the value of a header and ;BadBot. • SearchString is at the end of the specified part of the web request or is followed by a character other than an alphanumeric character or underscore (_), for example, BadBot; and -BadBot;. ByteMatchStatement 1260 AWS WAFV2 EXACTLY API Reference The value of the specified part of the web request must exactly match the value of SearchString. STARTS_WITH The value of SearchString must appear at the beginning of the specified part of the web request. ENDS_WITH The value of SearchString must appear at the end of the specified part of the web request. Type: String Valid Values: EXACTLY | STARTS_WITH | ENDS_WITH | CONTAINS | CONTAINS_WORD Required: Yes SearchString A string value that you want AWS WAF to search for. AWS WAF searches only in the part of web requests that you designate for inspection in FieldToMatch. The maximum length of the value is 200 bytes. Valid values depend on the component that you specify for inspection in FieldToMatch: • Method: The HTTP method that you want AWS WAF to search for. This indicates the type of operation specified in the request. • UriPath: The value that you want AWS WAF to search for in the URI path, for example, / images/daily-ad.jpg. • JA3Fingerprint: Available for use with Amazon CloudFront distributions and Application Load Balancers. Match against the request's JA3 fingerprint. The JA3 fingerprint is a 32- character hash derived from the TLS Client Hello of an incoming request. This fingerprint serves as a unique identifier for the client's TLS configuration. You can use this choice only with a string match ByteMatchStatement with the PositionalConstraint set to EXACTLY. You can obtain the JA3 fingerprint for client requests from the web ACL logs. If AWS WAF is able to calculate the fingerprint, it includes it in the logs. For information about the logging fields, see Log fields in the AWS WAF Developer Guide. ByteMatchStatement 1261 AWS WAFV2 API Reference • HeaderOrder: The list of header names to match for. AWS WAF creates a string that contains the ordered list of header names, from the headers in the web request, and then matches against that string. If SearchString includes alphabetic characters A-Z and a-z, note that the value is case sensitive. If you're using the AWS WAF API Specify a base64-encoded version of the value. The maximum length of the value before you base64-encode it is 200 bytes. For example, suppose the value of Type is HEADER and the value of Data is User-Agent. If you want to search the User-Agent header for the value BadBot, you base64-encode BadBot using MIME base64-encoding and include the resulting value, QmFkQm90, in the value of SearchString. If you're using the AWS CLI or one of the AWS SDKs The value that you want AWS WAF to search for. The SDK automatically base64 encodes the value. Type: Base64-encoded binary data object Required: Yes TextTransformations