AWS WAFV2 2019-07-29
- Client: Aws\WAFV2\WAFV2Client
- Service ID: wafv2
- Version: 2019-07-29
This page describes the parameters and results for the operations of the AWS WAFV2 (2019-07-29), and shows how to use the Aws\WAFV2\WAFV2Client object to call the described operations. This documentation is specific to the 2019-07-29 API version of the service.
Operation Summary
Each of the following operations can be created from a client using
$client->getCommand('CommandName')
, where "CommandName" is the
name of one of the following operations. Note: a command is a value that
encapsulates an operation and the parameters used to create an HTTP request.
You can also create and send a command immediately using the magic methods
available on a client object: $client->commandName(/* parameters */)
.
You can send the command asynchronously (returning a promise) by appending the
word "Async" to the operation name: $client->commandNameAsync(/* parameters */)
.
- AssociateWebACL ( array $params = [] )
Associates a web ACL with a regional application resource, to protect the resource.
- CheckCapacity ( array $params = [] )
Returns the web ACL capacity unit (WCU) requirements for a specified scope and set of rules.
- CreateIPSet ( array $params = [] )
Creates an IPSet, which you use to identify web requests that originate from specific IP addresses or ranges of IP addresses.
- CreateRegexPatternSet ( array $params = [] )
Creates a RegexPatternSet, which you reference in a RegexPatternSetReferenceStatement, to have WAF inspect a web request component for the specified patterns.
- CreateRuleGroup ( array $params = [] )
Creates a RuleGroup per the specifications provided.
- CreateWebACL ( array $params = [] )
Creates a WebACL per the specifications provided.
- DeleteFirewallManagerRuleGroups ( array $params = [] )
Deletes all rule groups that are managed by Firewall Manager for the specified web ACL.
- DeleteIPSet ( array $params = [] )
Deletes the specified IPSet.
- DeleteLoggingConfiguration ( array $params = [] )
Deletes the LoggingConfiguration from the specified web ACL.
- DeletePermissionPolicy ( array $params = [] )
Permanently deletes an IAM policy from the specified rule group.
- DeleteRegexPatternSet ( array $params = [] )
Deletes the specified RegexPatternSet.
- DeleteRuleGroup ( array $params = [] )
Deletes the specified RuleGroup.
- DeleteWebACL ( array $params = [] )
Deletes the specified WebACL.
- DescribeManagedRuleGroup ( array $params = [] )
Provides high-level information for a managed rule group, including descriptions of the rules.
- DisassociateWebACL ( array $params = [] )
Disassociates the specified regional application resource from any existing web ACL association.
- GenerateMobileSdkReleaseUrl ( array $params = [] )
Generates a presigned download URL for the specified release of the mobile SDK.
- GetIPSet ( array $params = [] )
Retrieves the specified IPSet.
- GetLoggingConfiguration ( array $params = [] )
Returns the LoggingConfiguration for the specified web ACL.
- GetManagedRuleSet ( array $params = [] )
Retrieves the specified managed rule set.
- GetMobileSdkRelease ( array $params = [] )
Retrieves information for the specified mobile SDK release, including release notes and tags.
- GetPermissionPolicy ( array $params = [] )
Returns the IAM policy that is attached to the specified rule group.
- GetRateBasedStatementManagedKeys ( array $params = [] )
Retrieves the keys that are currently blocked by a rate-based rule instance.
- GetRegexPatternSet ( array $params = [] )
Retrieves the specified RegexPatternSet.
- GetRuleGroup ( array $params = [] )
Retrieves the specified RuleGroup.
- GetSampledRequests ( array $params = [] )
Gets detailed information about a specified number of requests--a sample--that WAF randomly selects from among the first 5,000 requests that your Amazon Web Services resource received during a time range that you choose.
- GetWebACL ( array $params = [] )
Retrieves the specified WebACL.
- GetWebACLForResource ( array $params = [] )
Retrieves the WebACL for the specified resource.
- ListAvailableManagedRuleGroupVersions ( array $params = [] )
Returns a list of the available versions for the specified managed rule group.
- ListAvailableManagedRuleGroups ( array $params = [] )
Retrieves an array of managed rule groups that are available for you to use.
- ListIPSets ( array $params = [] )
Retrieves an array of IPSetSummary objects for the IP sets that you manage.
- ListLoggingConfigurations ( array $params = [] )
Retrieves an array of your LoggingConfiguration objects.
- ListManagedRuleSets ( array $params = [] )
Retrieves the managed rule sets that you own.
- ListMobileSdkReleases ( array $params = [] )
Retrieves a list of the available releases for the mobile SDK and the specified device platform.
- ListRegexPatternSets ( array $params = [] )
Retrieves an array of RegexPatternSetSummary objects for the regex pattern sets that you manage.
- ListResourcesForWebACL ( array $params = [] )
Retrieves an array of the Amazon Resource Names (ARNs) for the regional resources that are associated with the specified web ACL.
- ListRuleGroups ( array $params = [] )
Retrieves an array of RuleGroupSummary objects for the rule groups that you manage.
- ListTagsForResource ( array $params = [] )
Retrieves the TagInfoForResource for the specified resource.
- ListWebACLs ( array $params = [] )
Retrieves an array of WebACLSummary objects for the web ACLs that you manage.
- PutLoggingConfiguration ( array $params = [] )
Enables the specified LoggingConfiguration, to start logging from a web ACL, according to the configuration provided.
- PutManagedRuleSetVersions ( array $params = [] )
Defines the versions of your managed rule set that you are offering to the customers.
- PutPermissionPolicy ( array $params = [] )
Attaches an IAM policy to the specified resource.
- TagResource ( array $params = [] )
Associates tags with the specified Amazon Web Services resource.
- UntagResource ( array $params = [] )
Disassociates tags from an Amazon Web Services resource.
- UpdateIPSet ( array $params = [] )
Updates the specified IPSet.
- UpdateManagedRuleSetVersionExpiryDate ( array $params = [] )
Updates the expiration information for your managed rule set.
- UpdateRegexPatternSet ( array $params = [] )
Updates the specified RegexPatternSet.
- UpdateRuleGroup ( array $params = [] )
Updates the specified RuleGroup.
- UpdateWebACL ( array $params = [] )
Updates the specified WebACL.
Operations
AssociateWebACL
$result = $client->associateWebACL
([/* ... */]); $promise = $client->associateWebACLAsync
([/* ... */]);
Associates a web ACL with a regional application resource, to protect the resource. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
For Amazon CloudFront, don't use this call. Instead, use your CloudFront distribution configuration. To associate a web ACL, in the CloudFront call UpdateDistribution
, set the web ACL ID to the Amazon Resource Name (ARN) of the web ACL. For information, see UpdateDistribution.
When you make changes to web ACLs or web ACL components, like rules and rule groups, WAF propagates the changes everywhere that the web ACL and its components are stored and used. Your changes are applied within seconds, but there might be a brief period of inconsistency when the changes have arrived in some places and not in others. So, for example, if you change a rule action setting, the action might be the old action in one area and the new action in another area. Or if you add an IP address to an IP set used in a blocking rule, the new address might briefly be blocked in one area while still allowed in another. This temporary inconsistency can occur when you first associate a web ACL with an Amazon Web Services resource and when you change a web ACL that is already associated with a resource. Generally, any inconsistencies of this type last only a few seconds.
Parameter Syntax
$result = $client->associateWebACL([ 'ResourceArn' => '<string>', // REQUIRED 'WebACLArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ResourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource to associate with the web ACL.
The ARN must 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 REST API:
arn:aws:apigateway:region::/restapis/api-id/stages/stage-name
-
For an AppSync GraphQL API:
arn:aws:appsync:region:account-id:apis/GraphQLApiId
-
For an Amazon Cognito user pool:
arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
- WebACLArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the web ACL that you want to associate with the resource.
Result Syntax
[]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAFUnavailableEntityException:
WAF couldn’t retrieve a resource that you specified for this operation. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate. Verify the resources that you are specifying in your request parameters and then retry the operation.
-
The operation isn't valid.
CheckCapacity
$result = $client->checkCapacity
([/* ... */]); $promise = $client->checkCapacityAsync
([/* ... */]);
Returns the web ACL capacity unit (WCU) requirements for a specified scope and set of rules. You can use this to check the capacity requirements for the rules you want to use in a RuleGroup or WebACL.
WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.
Parameter Syntax
$result = $client->checkCapacity([ 'Rules' => [ // REQUIRED [ 'Action' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'Name' => '<string>', // REQUIRED 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, // REQUIRED 'RuleLabels' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'Statement' => [ // REQUIRED 'AndStatement' => [ 'Statements' => [ // REQUIRED [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', // REQUIRED 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED 'Position' => 'FIRST|LAST|ANY', // REQUIRED ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', // REQUIRED 'Scope' => 'LABEL|NAMESPACE', // REQUIRED ], 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', // REQUIRED ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', // REQUIRED ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', // REQUIRED ], ], // ... ], 'Name' => '<string>', // REQUIRED 'RuleActionOverrides' => [ [ 'ActionToUse' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Name' => '<string>', // REQUIRED ], // ... ], 'ScopeDownStatement' => [...], // RECURSIVE 'VendorName' => '<string>', // REQUIRED 'Version' => '<string>', ], 'NotStatement' => [ 'Statement' => [...], // REQUIRED, RECURSIVE ], 'OrStatement' => [ 'Statements' => [ // REQUIRED [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', // REQUIRED 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED ], 'Limit' => <integer>, // REQUIRED 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'RegexString' => '<string>', // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'ExcludedRules' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Name' => '<string>', // REQUIRED ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', // REQUIRED 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'Size' => <integer>, // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], ], 'VisibilityConfig' => [ // REQUIRED 'CloudWatchMetricsEnabled' => true || false, // REQUIRED 'MetricName' => '<string>', // REQUIRED 'SampledRequestsEnabled' => true || false, // REQUIRED ], ], // ... ], 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Rules
-
- Required: Yes
- Type: Array of Rule structures
An array of Rule that you're configuring to use in a rule group or web ACL.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'Capacity' => <integer>, ]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.
-
WAFUnavailableEntityException:
WAF couldn’t retrieve a resource that you specified for this operation. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate. Verify the resources that you are specifying in your request parameters and then retry the operation.
-
WAFSubscriptionNotFoundException:
You tried to use a managed rule group that's available by subscription, but you aren't subscribed to it yet.
-
WAFExpiredManagedRuleGroupVersionException:
The operation failed because the specified version for the managed rule group has expired. You can retrieve the available versions for the managed rule group by calling ListAvailableManagedRuleGroupVersions.
-
The operation isn't valid.
CreateIPSet
$result = $client->createIPSet
([/* ... */]); $promise = $client->createIPSetAsync
([/* ... */]);
Creates an IPSet, which you use to identify web requests that originate from specific IP addresses or ranges of IP addresses. For example, if you're receiving a lot of requests from a ranges of IP addresses, you can configure WAF to block them using an IPSet that lists those IP addresses.
Parameter Syntax
$result = $client->createIPSet([ 'Addresses' => ['<string>', ...], // REQUIRED 'Description' => '<string>', 'IPAddressVersion' => 'IPV4|IPV6', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'Tags' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- Addresses
-
- Required: Yes
- Type: Array of strings
Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses. All addresses must be specified using Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for
/0
.Example address strings:
-
To configure WAF to allow, block, or count requests that originated from the IP address 192.0.2.44, specify
192.0.2.44/32
. -
To configure WAF to allow, block, or count requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify
192.0.2.0/24
. -
To configure WAF to allow, block, or count requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify
1111:0000:0000:0000:0000:0000:0000:0111/128
. -
To configure WAF to allow, block, or count requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify
1111:0000:0000:0000:0000:0000:0000:0000/64
.
For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing.
Example JSON
Addresses
specifications:-
Empty array:
"Addresses": []
-
Array with one address:
"Addresses": ["192.0.2.44/32"]
-
Array with three addresses:
"Addresses": ["192.0.2.44/32", "192.0.2.0/24", "192.0.0.0/16"]
-
INVALID specification:
"Addresses": [""]
INVALID
- Description
-
- Type: string
A description of the IP set that helps with identification.
- IPAddressVersion
-
- Required: Yes
- Type: string
The version of the IP addresses, either
IPV4
orIPV6
. - Name
-
- Required: Yes
- Type: string
The name of the IP set. You cannot change the name of an
IPSet
after you create it. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- Tags
-
- Type: Array of Tag structures
An array of key:value pairs to associate with the resource.
Result Syntax
[ 'Summary' => [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LockToken' => '<string>', 'Name' => '<string>', ], ]
Result Details
Members
- Summary
-
- Type: IPSetSummary structure
High-level information about an IPSet, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage an
IPSet
, and the ARN, that you provide to the IPSetReferenceStatement to use the address set in a Rule.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
The operation isn't valid.
CreateRegexPatternSet
$result = $client->createRegexPatternSet
([/* ... */]); $promise = $client->createRegexPatternSetAsync
([/* ... */]);
Creates a RegexPatternSet, which you reference in a RegexPatternSetReferenceStatement, to have WAF inspect a web request component for the specified patterns.
Parameter Syntax
$result = $client->createRegexPatternSet([ 'Description' => '<string>', 'Name' => '<string>', // REQUIRED 'RegularExpressionList' => [ // REQUIRED [ 'RegexString' => '<string>', ], // ... ], 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'Tags' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- Description
-
- Type: string
A description of the set that helps with identification.
- Name
-
- Required: Yes
- Type: string
The name of the set. You cannot change the name after you create the set.
- RegularExpressionList
-
- Required: Yes
- Type: Array of Regex structures
Array of regular expression strings.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- Tags
-
- Type: Array of Tag structures
An array of key:value pairs to associate with the resource.
Result Syntax
[ 'Summary' => [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LockToken' => '<string>', 'Name' => '<string>', ], ]
Result Details
Members
- Summary
-
- Type: RegexPatternSetSummary structure
High-level information about a RegexPatternSet, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a
RegexPatternSet
, and the ARN, that you provide to the RegexPatternSetReferenceStatement to use the pattern set in a Rule.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
The operation isn't valid.
CreateRuleGroup
$result = $client->createRuleGroup
([/* ... */]); $promise = $client->createRuleGroupAsync
([/* ... */]);
Creates a RuleGroup per the specifications provided.
A rule group defines a collection of rules to inspect and control web requests that you can use in a WebACL. When you create a rule group, you define an immutable capacity limit. If you update a rule group, you must stay within the capacity. This allows others to reuse the rule group with confidence in its capacity requirements.
Parameter Syntax
$result = $client->createRuleGroup([ 'Capacity' => <integer>, // REQUIRED 'CustomResponseBodies' => [ '<EntityName>' => [ 'Content' => '<string>', // REQUIRED 'ContentType' => 'TEXT_PLAIN|TEXT_HTML|APPLICATION_JSON', // REQUIRED ], // ... ], 'Description' => '<string>', 'Name' => '<string>', // REQUIRED 'Rules' => [ [ 'Action' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'Name' => '<string>', // REQUIRED 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, // REQUIRED 'RuleLabels' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'Statement' => [ // REQUIRED 'AndStatement' => [ 'Statements' => [ // REQUIRED [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', // REQUIRED 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED 'Position' => 'FIRST|LAST|ANY', // REQUIRED ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', // REQUIRED 'Scope' => 'LABEL|NAMESPACE', // REQUIRED ], 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', // REQUIRED ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', // REQUIRED ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', // REQUIRED ], ], // ... ], 'Name' => '<string>', // REQUIRED 'RuleActionOverrides' => [ [ 'ActionToUse' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Name' => '<string>', // REQUIRED ], // ... ], 'ScopeDownStatement' => [...], // RECURSIVE 'VendorName' => '<string>', // REQUIRED 'Version' => '<string>', ], 'NotStatement' => [ 'Statement' => [...], // REQUIRED, RECURSIVE ], 'OrStatement' => [ 'Statements' => [ // REQUIRED [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', // REQUIRED 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED ], 'Limit' => <integer>, // REQUIRED 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'RegexString' => '<string>', // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'ExcludedRules' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Name' => '<string>', // REQUIRED ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', // REQUIRED 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'Size' => <integer>, // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], ], 'VisibilityConfig' => [ // REQUIRED 'CloudWatchMetricsEnabled' => true || false, // REQUIRED 'MetricName' => '<string>', // REQUIRED 'SampledRequestsEnabled' => true || false, // REQUIRED ], ], // ... ], 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'Tags' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], 'VisibilityConfig' => [ // REQUIRED 'CloudWatchMetricsEnabled' => true || false, // REQUIRED 'MetricName' => '<string>', // REQUIRED 'SampledRequestsEnabled' => true || false, // REQUIRED ], ]);
Parameter Details
Members
- Capacity
-
- Required: Yes
- Type: long (int|float)
The web ACL capacity units (WCUs) required for this rule group.
When you create your own rule group, you define this, and you cannot change it after creation. When you add or modify the rules in a rule group, WAF enforces this limit. You can check the capacity for a set of rules using CheckCapacity.
WAF uses WCUs to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect the relative cost of each rule. Simple rules that cost little to run use fewer WCUs than more complex rules that use more processing power. Rule group capacity is fixed at creation, which helps users plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.
- CustomResponseBodies
-
- Type: Associative array of custom strings keys (EntityName) to CustomResponseBody structures
A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.
For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
- Description
-
- Type: string
A description of the rule group that helps with identification.
- Name
-
- Required: Yes
- Type: string
The name of the rule group. You cannot change the name of a rule group after you create it.
- Rules
-
- Type: Array of Rule structures
The Rule statements used to identify the web requests that you want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- Tags
-
- Type: Array of Tag structures
An array of key:value pairs to associate with the resource.
- VisibilityConfig
-
- Required: Yes
- Type: VisibilityConfig structure
Defines and enables Amazon CloudWatch metrics and web request sample collection.
Result Syntax
[ 'Summary' => [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LockToken' => '<string>', 'Name' => '<string>', ], ]
Result Details
Members
- Summary
-
- Type: RuleGroupSummary structure
High-level information about a RuleGroup, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a
RuleGroup
, and the ARN, that you provide to the RuleGroupReferenceStatement to use the rule group in a Rule.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
WAFUnavailableEntityException:
WAF couldn’t retrieve a resource that you specified for this operation. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate. Verify the resources that you are specifying in your request parameters and then retry the operation.
-
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
WAFSubscriptionNotFoundException:
You tried to use a managed rule group that's available by subscription, but you aren't subscribed to it yet.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
CreateWebACL
$result = $client->createWebACL
([/* ... */]); $promise = $client->createWebACLAsync
([/* ... */]);
Creates a WebACL per the specifications provided.
A web ACL defines a collection of rules to use to inspect and control web requests. Each rule has an action defined (allow, block, or count) for requests that match the statement of the rule. In the web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types Rule, RuleGroup, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resources can be an Amazon CloudFront distribution, an Amazon API Gateway REST API, an Application Load Balancer, an AppSync GraphQL API, or an Amazon Cognito user pool.
Parameter Syntax
$result = $client->createWebACL([ 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'CustomResponseBodies' => [ '<EntityName>' => [ 'Content' => '<string>', // REQUIRED 'ContentType' => 'TEXT_PLAIN|TEXT_HTML|APPLICATION_JSON', // REQUIRED ], // ... ], 'DefaultAction' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Description' => '<string>', 'Name' => '<string>', // REQUIRED 'Rules' => [ [ 'Action' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'Name' => '<string>', // REQUIRED 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, // REQUIRED 'RuleLabels' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'Statement' => [ // REQUIRED 'AndStatement' => [ 'Statements' => [ // REQUIRED [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', // REQUIRED 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED 'Position' => 'FIRST|LAST|ANY', // REQUIRED ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', // REQUIRED 'Scope' => 'LABEL|NAMESPACE', // REQUIRED ], 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', // REQUIRED ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', // REQUIRED ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', // REQUIRED ], ], // ... ], 'Name' => '<string>', // REQUIRED 'RuleActionOverrides' => [ [ 'ActionToUse' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Name' => '<string>', // REQUIRED ], // ... ], 'ScopeDownStatement' => [...], // RECURSIVE 'VendorName' => '<string>', // REQUIRED 'Version' => '<string>', ], 'NotStatement' => [ 'Statement' => [...], // REQUIRED, RECURSIVE ], 'OrStatement' => [ 'Statements' => [ // REQUIRED [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', // REQUIRED 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED ], 'Limit' => <integer>, // REQUIRED 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'RegexString' => '<string>', // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'ExcludedRules' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Name' => '<string>', // REQUIRED ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', // REQUIRED 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'Size' => <integer>, // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], ], 'VisibilityConfig' => [ // REQUIRED 'CloudWatchMetricsEnabled' => true || false, // REQUIRED 'MetricName' => '<string>', // REQUIRED 'SampledRequestsEnabled' => true || false, // REQUIRED ], ], // ... ], 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'Tags' => [ [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], 'TokenDomains' => ['<string>', ...], 'VisibilityConfig' => [ // REQUIRED 'CloudWatchMetricsEnabled' => true || false, // REQUIRED 'MetricName' => '<string>', // REQUIRED 'SampledRequestsEnabled' => true || false, // REQUIRED ], ]);
Parameter Details
Members
- CaptchaConfig
-
- Type: CaptchaConfig structure
Specifies how WAF should handle
CAPTCHA
evaluations for rules that don't have their ownCaptchaConfig
settings. If you don't specify this, WAF uses its default settings forCaptchaConfig
. - ChallengeConfig
-
- Type: ChallengeConfig structure
Specifies how WAF should handle challenge evaluations for rules that don't have their own
ChallengeConfig
settings. If you don't specify this, WAF uses its default settings forChallengeConfig
. - CustomResponseBodies
-
- Type: Associative array of custom strings keys (EntityName) to CustomResponseBody structures
A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the web ACL, and then use them in the rules and default actions that you define in the web ACL.
For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
- DefaultAction
-
- Required: Yes
- Type: DefaultAction structure
The action to perform if none of the
Rules
contained in theWebACL
match. - Description
-
- Type: string
A description of the web ACL that helps with identification.
- Name
-
- Required: Yes
- Type: string
The name of the web ACL. You cannot change the name of a web ACL after you create it.
- Rules
-
- Type: Array of Rule structures
The Rule statements used to identify the web requests that you want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- Tags
-
- Type: Array of Tag structures
An array of key:value pairs to associate with the resource.
- TokenDomains
-
- Type: Array of strings
Specifies the domains that WAF should accept in a web request token. This enables the use of tokens across multiple protected websites. When WAF provides a token, it uses the domain of the Amazon Web Services resource that the web ACL is protecting. If you don't specify a list of token domains, WAF accepts tokens only for the domain of the protected resource. With a token domain list, WAF accepts the resource's host domain plus all domains in the token domain list, including their prefixed subdomains.
Example JSON:
"TokenDomains": { "mywebsite.com", "myotherwebsite.com" }
Public suffixes aren't allowed. For example, you can't use
usa.gov
orco.uk
as token domains. - VisibilityConfig
-
- Required: Yes
- Type: VisibilityConfig structure
Defines and enables Amazon CloudWatch metrics and web request sample collection.
Result Syntax
[ 'Summary' => [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LockToken' => '<string>', 'Name' => '<string>', ], ]
Result Details
Members
- Summary
-
- Type: WebACLSummary structure
High-level information about a WebACL, returned by operations like create and list. This provides information like the ID, that you can use to retrieve and manage a
WebACL
, and the ARN, that you provide to operations like AssociateWebACL.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.
-
WAFUnavailableEntityException:
WAF couldn’t retrieve a resource that you specified for this operation. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate. Verify the resources that you are specifying in your request parameters and then retry the operation.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
WAFSubscriptionNotFoundException:
You tried to use a managed rule group that's available by subscription, but you aren't subscribed to it yet.
-
The operation isn't valid.
-
WAFConfigurationWarningException:
The operation failed because you are inspecting the web request body, headers, or cookies without specifying how to handle oversize components. Rules that inspect the body must either provide an
OversizeHandling
configuration or they must be preceded by aSizeConstraintStatement
that blocks the body content from being too large. Rules that inspect the headers or cookies must provide anOversizeHandling
configuration.Provide the handling configuration and retry your operation.
Alternately, you can suppress this warning by adding the following tag to the resource that you provide to this operation:
Tag
(key:WAF:OversizeFieldsHandlingConstraintOptOut
, value:true
). -
WAFExpiredManagedRuleGroupVersionException:
The operation failed because the specified version for the managed rule group has expired. You can retrieve the available versions for the managed rule group by calling ListAvailableManagedRuleGroupVersions.
DeleteFirewallManagerRuleGroups
$result = $client->deleteFirewallManagerRuleGroups
([/* ... */]); $promise = $client->deleteFirewallManagerRuleGroupsAsync
([/* ... */]);
Deletes all rule groups that are managed by Firewall Manager for the specified web ACL.
You can only use this if ManagedByFirewallManager
is false in the specified WebACL.
Parameter Syntax
$result = $client->deleteFirewallManagerRuleGroups([ 'WebACLArn' => '<string>', // REQUIRED 'WebACLLockToken' => '<string>', // REQUIRED ]);
Parameter Details
Members
- WebACLArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the web ACL.
- WebACLLockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation.
Result Syntax
[ 'NextWebACLLockToken' => '<string>', ]
Result Details
Members
- NextWebACLLockToken
-
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
The operation isn't valid.
DeleteIPSet
$result = $client->deleteIPSet
([/* ... */]); $promise = $client->deleteIPSetAsync
([/* ... */]);
Deletes the specified IPSet.
Parameter Syntax
$result = $client->deleteIPSet([ 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- LockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - Name
-
- Required: Yes
- Type: string
The name of the IP set. You cannot change the name of an
IPSet
after you create it. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.
-
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
The operation isn't valid.
DeleteLoggingConfiguration
$result = $client->deleteLoggingConfiguration
([/* ... */]); $promise = $client->deleteLoggingConfigurationAsync
([/* ... */]);
Deletes the LoggingConfiguration from the specified web ACL.
Parameter Syntax
$result = $client->deleteLoggingConfiguration([ 'ResourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ResourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the web ACL from which you want to delete the LoggingConfiguration.
Result Syntax
[]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
DeletePermissionPolicy
$result = $client->deletePermissionPolicy
([/* ... */]); $promise = $client->deletePermissionPolicyAsync
([/* ... */]);
Permanently deletes an IAM policy from the specified rule group.
You must be the owner of the rule group to perform this operation.
Parameter Syntax
$result = $client->deletePermissionPolicy([ 'ResourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[]
Result Details
Errors
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
DeleteRegexPatternSet
$result = $client->deleteRegexPatternSet
([/* ... */]); $promise = $client->deleteRegexPatternSetAsync
([/* ... */]);
Deletes the specified RegexPatternSet.
Parameter Syntax
$result = $client->deleteRegexPatternSet([ 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- LockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - Name
-
- Required: Yes
- Type: string
The name of the set. You cannot change the name after you create the set.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.
-
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
The operation isn't valid.
DeleteRuleGroup
$result = $client->deleteRuleGroup
([/* ... */]); $promise = $client->deleteRuleGroupAsync
([/* ... */]);
Deletes the specified RuleGroup.
Parameter Syntax
$result = $client->deleteRuleGroup([ 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- LockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - Name
-
- Required: Yes
- Type: string
The name of the rule group. You cannot change the name of a rule group after you create it.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.
-
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
The operation isn't valid.
DeleteWebACL
$result = $client->deleteWebACL
([/* ... */]); $promise = $client->deleteWebACLAsync
([/* ... */]);
Deletes the specified WebACL.
You can only use this if ManagedByFirewallManager
is false in the specified WebACL.
Before deleting any web ACL, first disassociate it from all resources.
-
To retrieve a list of the resources that are associated with a web ACL, use the following calls:
-
For regional resources, call ListResourcesForWebACL.
-
For Amazon CloudFront distributions, use the CloudFront call
ListDistributionsByWebACLId
. For information, see ListDistributionsByWebACLId.
-
-
To disassociate a resource from a web ACL, use the following calls:
-
For regional resources, call DisassociateWebACL.
-
For Amazon CloudFront distributions, provide an empty web ACL ID in the CloudFront call
UpdateDistribution
. For information, see UpdateDistribution.
-
Parameter Syntax
$result = $client->deleteWebACL([ 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- LockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - Name
-
- Required: Yes
- Type: string
The name of the web ACL. You cannot change the name of a web ACL after you create it.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.
-
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
The operation isn't valid.
DescribeManagedRuleGroup
$result = $client->describeManagedRuleGroup
([/* ... */]); $promise = $client->describeManagedRuleGroupAsync
([/* ... */]);
Provides high-level information for a managed rule group, including descriptions of the rules.
Parameter Syntax
$result = $client->describeManagedRuleGroup([ 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'VendorName' => '<string>', // REQUIRED 'VersionName' => '<string>', ]);
Parameter Details
Members
- Name
-
- Required: Yes
- Type: string
The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- VendorName
-
- Required: Yes
- Type: string
The name of the managed rule group vendor. You use this, along with the rule group name, to identify the rule group.
- VersionName
-
- Type: string
The version of the rule group. You can only use a version that is not scheduled for expiration. If you don't provide this, WAF uses the vendor's default version.
Result Syntax
[ 'AvailableLabels' => [ [ 'Name' => '<string>', ], // ... ], 'Capacity' => <integer>, 'ConsumedLabels' => [ [ 'Name' => '<string>', ], // ... ], 'LabelNamespace' => '<string>', 'Rules' => [ [ 'Action' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], 'SnsTopicArn' => '<string>', 'VersionName' => '<string>', ]
Result Details
Members
- AvailableLabels
-
- Type: Array of LabelSummary structures
The labels that one or more rules in this rule group add to matching web requests. These labels are defined in the
RuleLabels
for a Rule. - Capacity
-
- Type: long (int|float)
The web ACL capacity units (WCUs) required for this rule group. WAF uses web ACL capacity units (WCU) to calculate and control the operating resources that are used to run your rules, rule groups, and web ACLs. WAF calculates capacity differently for each rule type, to reflect each rule's relative cost. Rule group capacity is fixed at creation, so users can plan their web ACL WCU usage when they use a rule group. The WCU limit for web ACLs is 1,500.
- ConsumedLabels
-
- Type: Array of LabelSummary structures
The labels that one or more rules in this rule group match against in label match statements. These labels are defined in a
LabelMatchStatement
specification, in the Statement definition of a rule. - LabelNamespace
-
- Type: string
The label namespace prefix for this rule group. All labels added by rules in this rule group have this prefix.
-
The syntax for the label namespace prefix for a managed rule group is the following:
awswaf:managed:<vendor>:<rule group name>
: -
When a rule with a label matches a web request, WAF adds the fully qualified label to the request. A fully qualified label is made up of the label namespace from the rule group or web ACL where the rule is defined and the label from the rule, separated by a colon:
<label namespace>:<label from rule>
- Rules
-
- Type: Array of RuleSummary structures
- SnsTopicArn
-
- Type: string
The Amazon resource name (ARN) of the Amazon Simple Notification Service SNS topic that's used to record changes to the managed rule group. You can subscribe to the SNS topic to receive notifications when the managed rule group is modified, such as for new versions and for version expiration. For more information, see the Amazon Simple Notification Service Developer Guide.
- VersionName
-
- Type: string
The managed rule group's version.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
-
WAFExpiredManagedRuleGroupVersionException:
The operation failed because the specified version for the managed rule group has expired. You can retrieve the available versions for the managed rule group by calling ListAvailableManagedRuleGroupVersions.
DisassociateWebACL
$result = $client->disassociateWebACL
([/* ... */]); $promise = $client->disassociateWebACLAsync
([/* ... */]);
Disassociates the specified regional application resource from any existing web ACL association. A resource can have at most one web ACL association. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
For Amazon CloudFront, don't use this call. Instead, use your CloudFront distribution configuration. To disassociate a web ACL, provide an empty web ACL ID in the CloudFront call UpdateDistribution
. For information, see UpdateDistribution.
Parameter Syntax
$result = $client->disassociateWebACL([ 'ResourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ResourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource to disassociate from the web ACL.
The ARN must 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 REST API:
arn:aws:apigateway:region::/restapis/api-id/stages/stage-name
-
For an AppSync GraphQL API:
arn:aws:appsync:region:account-id:apis/GraphQLApiId
-
For an Amazon Cognito user pool:
arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
Result Syntax
[]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
GenerateMobileSdkReleaseUrl
$result = $client->generateMobileSdkReleaseUrl
([/* ... */]); $promise = $client->generateMobileSdkReleaseUrlAsync
([/* ... */]);
Generates a presigned download URL for the specified release of the mobile SDK.
The mobile SDK is not generally available. Customers who have access to the mobile SDK can use it to establish and manage WAF tokens for use in HTTP(S) requests from a mobile device to WAF. For more information, see WAF client application integration in the WAF Developer Guide.
Parameter Syntax
$result = $client->generateMobileSdkReleaseUrl([ 'Platform' => 'IOS|ANDROID', // REQUIRED 'ReleaseVersion' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'Url' => '<string>', ]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
GetIPSet
$result = $client->getIPSet
([/* ... */]); $promise = $client->getIPSetAsync
([/* ... */]);
Retrieves the specified IPSet.
Parameter Syntax
$result = $client->getIPSet([ 'Id' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- Name
-
- Required: Yes
- Type: string
The name of the IP set. You cannot change the name of an
IPSet
after you create it. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'IPSet' => [ 'ARN' => '<string>', 'Addresses' => ['<string>', ...], 'Description' => '<string>', 'IPAddressVersion' => 'IPV4|IPV6', 'Id' => '<string>', 'Name' => '<string>', ], 'LockToken' => '<string>', ]
Result Details
Members
- IPSet
-
- Type: IPSet structure
- LockToken
-
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
GetLoggingConfiguration
$result = $client->getLoggingConfiguration
([/* ... */]); $promise = $client->getLoggingConfigurationAsync
([/* ... */]);
Returns the LoggingConfiguration for the specified web ACL.
Parameter Syntax
$result = $client->getLoggingConfiguration([ 'ResourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ResourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration.
Result Syntax
[ 'LoggingConfiguration' => [ 'LogDestinationConfigs' => ['<string>', ...], 'LoggingFilter' => [ 'DefaultBehavior' => 'KEEP|DROP', 'Filters' => [ [ 'Behavior' => 'KEEP|DROP', 'Conditions' => [ [ 'ActionCondition' => [ 'Action' => 'ALLOW|BLOCK|COUNT|CAPTCHA|CHALLENGE|EXCLUDED_AS_COUNT', ], 'LabelNameCondition' => [ 'LabelName' => '<string>', ], ], // ... ], 'Requirement' => 'MEETS_ALL|MEETS_ANY', ], // ... ], ], 'ManagedByFirewallManager' => true || false, 'RedactedFields' => [ [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], // ... ], 'ResourceArn' => '<string>', ], ]
Result Details
Members
- LoggingConfiguration
-
- Type: LoggingConfiguration structure
The LoggingConfiguration for the specified web ACL.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
GetManagedRuleSet
$result = $client->getManagedRuleSet
([/* ... */]); $promise = $client->getManagedRuleSetAsync
([/* ... */]);
Retrieves the specified managed rule set.
This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Amazon Web Services Marketplace sellers.
Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets
, GetManagedRuleSet
, PutManagedRuleSetVersions
, and UpdateManagedRuleSetVersionExpiryDate
.
Parameter Syntax
$result = $client->getManagedRuleSet([ 'Id' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
A unique identifier for the managed rule set. The ID is returned in the responses to commands like
list
. You provide it to operations likeget
andupdate
. - Name
-
- Required: Yes
- Type: string
The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.
This name is assigned to the corresponding managed rule group, which your customers can access and use.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'LockToken' => '<string>', 'ManagedRuleSet' => [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LabelNamespace' => '<string>', 'Name' => '<string>', 'PublishedVersions' => [ '<VersionKeyString>' => [ 'AssociatedRuleGroupArn' => '<string>', 'Capacity' => <integer>, 'ExpiryTimestamp' => <DateTime>, 'ForecastedLifetime' => <integer>, 'LastUpdateTimestamp' => <DateTime>, 'PublishTimestamp' => <DateTime>, ], // ... ], 'RecommendedVersion' => '<string>', ], ]
Result Details
Members
- LockToken
-
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - ManagedRuleSet
-
- Type: ManagedRuleSet structure
The managed rule set that you requested.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
GetMobileSdkRelease
$result = $client->getMobileSdkRelease
([/* ... */]); $promise = $client->getMobileSdkReleaseAsync
([/* ... */]);
Retrieves information for the specified mobile SDK release, including release notes and tags.
The mobile SDK is not generally available. Customers who have access to the mobile SDK can use it to establish and manage WAF tokens for use in HTTP(S) requests from a mobile device to WAF. For more information, see WAF client application integration in the WAF Developer Guide.
Parameter Syntax
$result = $client->getMobileSdkRelease([ 'Platform' => 'IOS|ANDROID', // REQUIRED 'ReleaseVersion' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'MobileSdkRelease' => [ 'ReleaseNotes' => '<string>', 'ReleaseVersion' => '<string>', 'Tags' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], 'Timestamp' => <DateTime>, ], ]
Result Details
Members
- MobileSdkRelease
-
- Type: MobileSdkRelease structure
Information for a specified SDK release, including release notes and tags.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
GetPermissionPolicy
$result = $client->getPermissionPolicy
([/* ... */]); $promise = $client->getPermissionPolicyAsync
([/* ... */]);
Returns the IAM policy that is attached to the specified rule group.
You must be the owner of the rule group to perform this operation.
Parameter Syntax
$result = $client->getPermissionPolicy([ 'ResourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
Result Syntax
[ 'Policy' => '<string>', ]
Result Details
Errors
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
GetRateBasedStatementManagedKeys
$result = $client->getRateBasedStatementManagedKeys
([/* ... */]); $promise = $client->getRateBasedStatementManagedKeysAsync
([/* ... */]);
Retrieves the keys that are currently blocked by a rate-based rule instance. The maximum number of managed keys that can be blocked for a single rate-based rule instance is 10,000. If more than 10,000 addresses exceed the rate limit, those with the highest rates are blocked.
For a rate-based rule that you've defined inside a rule group, provide the name of the rule group reference statement in your request, in addition to the rate-based rule name and the web ACL name.
WAF monitors web requests and manages keys independently for each unique combination of web ACL, optional rule group, and rate-based rule. For example, if you define a rate-based rule inside a rule group, and then use the rule group in a web ACL, WAF monitors web requests and manages keys for that web ACL, rule group reference statement, and rate-based rule instance. If you use the same rule group in a second web ACL, WAF monitors web requests and manages keys for this second usage completely independent of your first.
Parameter Syntax
$result = $client->getRateBasedStatementManagedKeys([ 'RuleGroupRuleName' => '<string>', 'RuleName' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'WebACLId' => '<string>', // REQUIRED 'WebACLName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- RuleGroupRuleName
-
- Type: string
The name of the rule group reference statement in your web ACL. This is required only when you have the rate-based rule nested inside a rule group.
- RuleName
-
- Required: Yes
- Type: string
The name of the rate-based rule to get the keys for. If you have the rule defined inside a rule group that you're using in your web ACL, also provide the name of the rule group reference statement in the request parameter
RuleGroupRuleName
. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- WebACLId
-
- Required: Yes
- Type: string
The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- WebACLName
-
- Required: Yes
- Type: string
The name of the web ACL. You cannot change the name of a web ACL after you create it.
Result Syntax
[ 'ManagedKeysIPV4' => [ 'Addresses' => ['<string>', ...], 'IPAddressVersion' => 'IPV4|IPV6', ], 'ManagedKeysIPV6' => [ 'Addresses' => ['<string>', ...], 'IPAddressVersion' => 'IPV4|IPV6', ], ]
Result Details
Members
- ManagedKeysIPV4
-
- Type: RateBasedStatementManagedKeysIPSet structure
The keys that are of Internet Protocol version 4 (IPv4).
- ManagedKeysIPV6
-
- Type: RateBasedStatementManagedKeysIPSet structure
The keys that are of Internet Protocol version 6 (IPv6).
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
GetRegexPatternSet
$result = $client->getRegexPatternSet
([/* ... */]); $promise = $client->getRegexPatternSetAsync
([/* ... */]);
Retrieves the specified RegexPatternSet.
Parameter Syntax
$result = $client->getRegexPatternSet([ 'Id' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- Name
-
- Required: Yes
- Type: string
The name of the set. You cannot change the name after you create the set.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'LockToken' => '<string>', 'RegexPatternSet' => [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'Name' => '<string>', 'RegularExpressionList' => [ [ 'RegexString' => '<string>', ], // ... ], ], ]
Result Details
Members
- LockToken
-
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - RegexPatternSet
-
- Type: RegexPatternSet structure
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
GetRuleGroup
$result = $client->getRuleGroup
([/* ... */]); $promise = $client->getRuleGroupAsync
([/* ... */]);
Retrieves the specified RuleGroup.
Parameter Syntax
$result = $client->getRuleGroup([ 'ARN' => '<string>', 'Id' => '<string>', 'Name' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', ]);
Parameter Details
Members
- ARN
-
- Type: string
The Amazon Resource Name (ARN) of the entity.
- Id
-
- Type: string
A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- Name
-
- Type: string
The name of the rule group. You cannot change the name of a rule group after you create it.
- Scope
-
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'LockToken' => '<string>', 'RuleGroup' => [ 'ARN' => '<string>', 'AvailableLabels' => [ [ 'Name' => '<string>', ], // ... ], 'Capacity' => <integer>, 'ConsumedLabels' => [ [ 'Name' => '<string>', ], // ... ], 'CustomResponseBodies' => [ '<EntityName>' => [ 'Content' => '<string>', 'ContentType' => 'TEXT_PLAIN|TEXT_HTML|APPLICATION_JSON', ], // ... ], 'Description' => '<string>', 'Id' => '<string>', 'LabelNamespace' => '<string>', 'Name' => '<string>', 'Rules' => [ [ 'Action' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'Name' => '<string>', 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, 'RuleLabels' => [ [ 'Name' => '<string>', ], // ... ], 'Statement' => [ 'AndStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', 'Position' => 'FIRST|LAST|ANY', ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', 'Scope' => 'LABEL|NAMESPACE', ], 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', ], ], // ... ], 'Name' => '<string>', 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], 'ScopeDownStatement' => [...], // RECURSIVE 'VendorName' => '<string>', 'Version' => '<string>', ], 'NotStatement' => [ 'Statement' => [...], // RECURSIVE ], 'OrStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], 'Limit' => <integer>, 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'RegexString' => '<string>', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'Size' => <integer>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], ], 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], // ... ], 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], ]
Result Details
Members
- LockToken
-
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - RuleGroup
-
- Type: RuleGroup structure
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
GetSampledRequests
$result = $client->getSampledRequests
([/* ... */]); $promise = $client->getSampledRequestsAsync
([/* ... */]);
Gets detailed information about a specified number of requests--a sample--that WAF randomly selects from among the first 5,000 requests that your Amazon Web Services 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 a 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 WAF selected the requests in the sample.
Parameter Syntax
$result = $client->getSampledRequests([ 'MaxItems' => <integer>, // REQUIRED 'RuleMetricName' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'TimeWindow' => [ // REQUIRED 'EndTime' => <integer || string || DateTime>, // REQUIRED 'StartTime' => <integer || string || DateTime>, // REQUIRED ], 'WebAclArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- MaxItems
-
- Required: Yes
- Type: long (int|float)
The number of requests that you want WAF to return from among the first 5,000 requests that your Amazon Web Services resource received during the time range. If your resource received fewer requests than the value of
MaxItems
,GetSampledRequests
returns information about all of them. - RuleMetricName
-
- Required: Yes
- Type: string
The metric name assigned to the
Rule
orRuleGroup
dimension for which you want a sample of requests. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- TimeWindow
-
- Required: Yes
- Type: TimeWindow structure
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. If you specify a start time that's earlier than three hours ago, WAF sets it to three hours ago. - WebAclArn
-
- Required: Yes
- Type: string
The Amazon resource name (ARN) of the
WebACL
for which you want a sample of requests.
Result Syntax
[ 'PopulationSize' => <integer>, 'SampledRequests' => [ [ 'Action' => '<string>', 'CaptchaResponse' => [ 'FailureReason' => 'TOKEN_MISSING|TOKEN_EXPIRED|TOKEN_INVALID|TOKEN_DOMAIN_MISMATCH', 'ResponseCode' => <integer>, 'SolveTimestamp' => <integer>, ], 'ChallengeResponse' => [ 'FailureReason' => 'TOKEN_MISSING|TOKEN_EXPIRED|TOKEN_INVALID|TOKEN_DOMAIN_MISMATCH', 'ResponseCode' => <integer>, 'SolveTimestamp' => <integer>, ], 'Labels' => [ [ 'Name' => '<string>', ], // ... ], 'OverriddenAction' => '<string>', 'Request' => [ 'ClientIP' => '<string>', 'Country' => '<string>', 'HTTPVersion' => '<string>', 'Headers' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], 'Method' => '<string>', 'URI' => '<string>', ], 'RequestHeadersInserted' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], 'ResponseCodeSent' => <integer>, 'RuleNameWithinRuleGroup' => '<string>', 'Timestamp' => <DateTime>, 'Weight' => <integer>, ], // ... ], 'TimeWindow' => [ 'EndTime' => <DateTime>, 'StartTime' => <DateTime>, ], ]
Result Details
Members
- PopulationSize
-
- Type: long (int|float)
The total number of requests from which
GetSampledRequests
got a sample ofMaxItems
requests. IfPopulationSize
is less thanMaxItems
, the sample includes every request that your Amazon Web Services resource received during the specified time range. - SampledRequests
-
- Type: Array of SampledHTTPRequest structures
A complex type that contains detailed information about each of the requests in the sample.
- TimeWindow
-
- Type: TimeWindow structure
Usually,
TimeWindow
is the time range that you specified in theGetSampledRequests
request. However, if your Amazon Web Services 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.
Errors
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
GetWebACL
$result = $client->getWebACL
([/* ... */]); $promise = $client->getWebACLAsync
([/* ... */]);
Retrieves the specified WebACL.
Parameter Syntax
$result = $client->getWebACL([ 'Id' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
The unique identifier for the web ACL. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- Name
-
- Required: Yes
- Type: string
The name of the web ACL. You cannot change the name of a web ACL after you create it.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'ApplicationIntegrationURL' => '<string>', 'LockToken' => '<string>', 'WebACL' => [ 'ARN' => '<string>', 'Capacity' => <integer>, 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'CustomResponseBodies' => [ '<EntityName>' => [ 'Content' => '<string>', 'ContentType' => 'TEXT_PLAIN|TEXT_HTML|APPLICATION_JSON', ], // ... ], 'DefaultAction' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Description' => '<string>', 'Id' => '<string>', 'LabelNamespace' => '<string>', 'ManagedByFirewallManager' => true || false, 'Name' => '<string>', 'PostProcessFirewallManagerRuleGroups' => [ [ 'FirewallManagerStatement' => [ 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', ], ], // ... ], 'Name' => '<string>', 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], 'ScopeDownStatement' => [ 'AndStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', 'Position' => 'FIRST|LAST|ANY', ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', 'Scope' => 'LABEL|NAMESPACE', ], 'ManagedRuleGroupStatement' => [...], // RECURSIVE 'NotStatement' => [ 'Statement' => [...], // RECURSIVE ], 'OrStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], 'Limit' => <integer>, 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'RegexString' => '<string>', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'Size' => <integer>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], ], 'VendorName' => '<string>', 'Version' => '<string>', ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], ], 'Name' => '<string>', 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], // ... ], 'PreProcessFirewallManagerRuleGroups' => [ [ 'FirewallManagerStatement' => [ 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', ], ], // ... ], 'Name' => '<string>', 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], 'ScopeDownStatement' => [ 'AndStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', 'Position' => 'FIRST|LAST|ANY', ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', 'Scope' => 'LABEL|NAMESPACE', ], 'ManagedRuleGroupStatement' => [...], // RECURSIVE 'NotStatement' => [ 'Statement' => [...], // RECURSIVE ], 'OrStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], 'Limit' => <integer>, 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'RegexString' => '<string>', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'Size' => <integer>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], ], 'VendorName' => '<string>', 'Version' => '<string>', ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], ], 'Name' => '<string>', 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], // ... ], 'Rules' => [ [ 'Action' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'Name' => '<string>', 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, 'RuleLabels' => [ [ 'Name' => '<string>', ], // ... ], 'Statement' => [ 'AndStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', 'Position' => 'FIRST|LAST|ANY', ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', 'Scope' => 'LABEL|NAMESPACE', ], 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', ], ], // ... ], 'Name' => '<string>', 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], 'ScopeDownStatement' => [...], // RECURSIVE 'VendorName' => '<string>', 'Version' => '<string>', ], 'NotStatement' => [ 'Statement' => [...], // RECURSIVE ], 'OrStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], 'Limit' => <integer>, 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'RegexString' => '<string>', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'Size' => <integer>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], ], 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], // ... ], 'TokenDomains' => ['<string>', ...], 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], ]
Result Details
Members
- ApplicationIntegrationURL
-
- Type: string
The URL to use in SDK integrations with Amazon Web Services managed rule groups. For example, you can use the integration SDKs with the account takeover prevention managed rule group
AWSManagedRulesATPRuleSet
. This is only populated if you are using a rule group in your web ACL that integrates with your applications in this way. For more information, see WAF client application integration in the WAF Developer Guide. - LockToken
-
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - WebACL
-
- Type: WebACL structure
The web ACL specification. You can modify the settings in this web ACL and use it to update this web ACL or create a new one.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
GetWebACLForResource
$result = $client->getWebACLForResource
([/* ... */]); $promise = $client->getWebACLForResourceAsync
([/* ... */]);
Retrieves the WebACL for the specified resource.
Parameter Syntax
$result = $client->getWebACLForResource([ 'ResourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ResourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource whose web ACL you want to retrieve.
The ARN must 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 REST API:
arn:aws:apigateway:region::/restapis/api-id/stages/stage-name
-
For an AppSync GraphQL API:
arn:aws:appsync:region:account-id:apis/GraphQLApiId
-
For an Amazon Cognito user pool:
arn:aws:cognito-idp:region:account-id:userpool/user-pool-id
Result Syntax
[ 'WebACL' => [ 'ARN' => '<string>', 'Capacity' => <integer>, 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'CustomResponseBodies' => [ '<EntityName>' => [ 'Content' => '<string>', 'ContentType' => 'TEXT_PLAIN|TEXT_HTML|APPLICATION_JSON', ], // ... ], 'DefaultAction' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Description' => '<string>', 'Id' => '<string>', 'LabelNamespace' => '<string>', 'ManagedByFirewallManager' => true || false, 'Name' => '<string>', 'PostProcessFirewallManagerRuleGroups' => [ [ 'FirewallManagerStatement' => [ 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', ], ], // ... ], 'Name' => '<string>', 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], 'ScopeDownStatement' => [ 'AndStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', 'Position' => 'FIRST|LAST|ANY', ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', 'Scope' => 'LABEL|NAMESPACE', ], 'ManagedRuleGroupStatement' => [...], // RECURSIVE 'NotStatement' => [ 'Statement' => [...], // RECURSIVE ], 'OrStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], 'Limit' => <integer>, 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'RegexString' => '<string>', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'Size' => <integer>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], ], 'VendorName' => '<string>', 'Version' => '<string>', ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], ], 'Name' => '<string>', 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], // ... ], 'PreProcessFirewallManagerRuleGroups' => [ [ 'FirewallManagerStatement' => [ 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', ], ], // ... ], 'Name' => '<string>', 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], 'ScopeDownStatement' => [ 'AndStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', 'Position' => 'FIRST|LAST|ANY', ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', 'Scope' => 'LABEL|NAMESPACE', ], 'ManagedRuleGroupStatement' => [...], // RECURSIVE 'NotStatement' => [ 'Statement' => [...], // RECURSIVE ], 'OrStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], 'Limit' => <integer>, 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'RegexString' => '<string>', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'Size' => <integer>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], ], 'VendorName' => '<string>', 'Version' => '<string>', ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], ], 'Name' => '<string>', 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], // ... ], 'Rules' => [ [ 'Action' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, ], ], 'Name' => '<string>', 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, 'RuleLabels' => [ [ 'Name' => '<string>', ], // ... ], 'Statement' => [ 'AndStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', 'Position' => 'FIRST|LAST|ANY', ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', 'Scope' => 'LABEL|NAMESPACE', ], 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', ], ], // ... ], 'Name' => '<string>', 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], 'ScopeDownStatement' => [...], // RECURSIVE 'VendorName' => '<string>', 'Version' => '<string>', ], 'NotStatement' => [ 'Statement' => [...], // RECURSIVE ], 'OrStatement' => [ 'Statements' => [ [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', 'HeaderName' => '<string>', ], 'Limit' => <integer>, 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'RegexString' => '<string>', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', 'ExcludedRules' => [ [ 'Name' => '<string>', ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, 'ResponseHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ [ 'Name' => '<string>', 'Value' => '<string>', ], // ... ], ], ], ], 'Name' => '<string>', ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'Size' => <integer>, 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], 'TextTransformations' => [ [ 'Priority' => <integer>, 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', ], // ... ], ], ], 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], // ... ], 'TokenDomains' => ['<string>', ...], 'VisibilityConfig' => [ 'CloudWatchMetricsEnabled' => true || false, 'MetricName' => '<string>', 'SampledRequestsEnabled' => true || false, ], ], ]
Result Details
Members
- WebACL
-
- Type: WebACL structure
The web ACL that is associated with the resource. If there is no associated resource, WAF returns a null web ACL.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAFUnavailableEntityException:
WAF couldn’t retrieve a resource that you specified for this operation. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate. Verify the resources that you are specifying in your request parameters and then retry the operation.
-
The operation isn't valid.
ListAvailableManagedRuleGroupVersions
$result = $client->listAvailableManagedRuleGroupVersions
([/* ... */]); $promise = $client->listAvailableManagedRuleGroupVersionsAsync
([/* ... */]);
Returns a list of the available versions for the specified managed rule group.
Parameter Syntax
$result = $client->listAvailableManagedRuleGroupVersions([ 'Limit' => <integer>, 'Name' => '<string>', // REQUIRED 'NextMarker' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'VendorName' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - Name
-
- Required: Yes
- Type: string
The name of the managed rule group. You use this, along with the vendor name, to identify the rule group.
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- VendorName
-
- Required: Yes
- Type: string
The name of the managed rule group vendor. You use this, along with the rule group name, to identify the rule group.
Result Syntax
[ 'CurrentDefaultVersion' => '<string>', 'NextMarker' => '<string>', 'Versions' => [ [ 'LastUpdateTimestamp' => <DateTime>, 'Name' => '<string>', ], // ... ], ]
Result Details
Members
- CurrentDefaultVersion
-
- Type: string
The name of the version that's currently set as the default.
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Versions
-
- Type: Array of ManagedRuleGroupVersion structures
The versions that are currently available for the specified managed rule group.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation isn't valid.
ListAvailableManagedRuleGroups
$result = $client->listAvailableManagedRuleGroups
([/* ... */]); $promise = $client->listAvailableManagedRuleGroupsAsync
([/* ... */]);
Retrieves an array of managed rule groups that are available for you to use. This list includes all Amazon Web Services Managed Rules rule groups and all of the Amazon Web Services Marketplace managed rule groups that you're subscribed to.
Parameter Syntax
$result = $client->listAvailableManagedRuleGroups([ 'Limit' => <integer>, 'NextMarker' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'ManagedRuleGroups' => [ [ 'Description' => '<string>', 'Name' => '<string>', 'VendorName' => '<string>', 'VersioningSupported' => true || false, ], // ... ], 'NextMarker' => '<string>', ]
Result Details
Members
- ManagedRuleGroups
-
- Type: Array of ManagedRuleGroupSummary structures
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
ListIPSets
$result = $client->listIPSets
([/* ... */]); $promise = $client->listIPSetsAsync
([/* ... */]);
Retrieves an array of IPSetSummary objects for the IP sets that you manage.
Parameter Syntax
$result = $client->listIPSets([ 'Limit' => <integer>, 'NextMarker' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'IPSets' => [ [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LockToken' => '<string>', 'Name' => '<string>', ], // ... ], 'NextMarker' => '<string>', ]
Result Details
Members
- IPSets
-
- Type: Array of IPSetSummary structures
Array of IPSets. This may not be the full list of IPSets that you have defined. See the
Limit
specification for this request. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
ListLoggingConfigurations
$result = $client->listLoggingConfigurations
([/* ... */]); $promise = $client->listLoggingConfigurationsAsync
([/* ... */]);
Retrieves an array of your LoggingConfiguration objects.
Parameter Syntax
$result = $client->listLoggingConfigurations([ 'Limit' => <integer>, 'NextMarker' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'LoggingConfigurations' => [ [ 'LogDestinationConfigs' => ['<string>', ...], 'LoggingFilter' => [ 'DefaultBehavior' => 'KEEP|DROP', 'Filters' => [ [ 'Behavior' => 'KEEP|DROP', 'Conditions' => [ [ 'ActionCondition' => [ 'Action' => 'ALLOW|BLOCK|COUNT|CAPTCHA|CHALLENGE|EXCLUDED_AS_COUNT', ], 'LabelNameCondition' => [ 'LabelName' => '<string>', ], ], // ... ], 'Requirement' => 'MEETS_ALL|MEETS_ANY', ], // ... ], ], 'ManagedByFirewallManager' => true || false, 'RedactedFields' => [ [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], // ... ], 'ResourceArn' => '<string>', ], // ... ], 'NextMarker' => '<string>', ]
Result Details
Members
- LoggingConfigurations
-
- Type: Array of LoggingConfiguration structures
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
ListManagedRuleSets
$result = $client->listManagedRuleSets
([/* ... */]); $promise = $client->listManagedRuleSetsAsync
([/* ... */]);
Retrieves the managed rule sets that you own.
This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Amazon Web Services Marketplace sellers.
Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets
, GetManagedRuleSet
, PutManagedRuleSetVersions
, and UpdateManagedRuleSetVersionExpiryDate
.
Parameter Syntax
$result = $client->listManagedRuleSets([ 'Limit' => <integer>, 'NextMarker' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'ManagedRuleSets' => [ [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LabelNamespace' => '<string>', 'LockToken' => '<string>', 'Name' => '<string>', ], // ... ], 'NextMarker' => '<string>', ]
Result Details
Members
- ManagedRuleSets
-
- Type: Array of ManagedRuleSetSummary structures
Your managed rule sets.
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
ListMobileSdkReleases
$result = $client->listMobileSdkReleases
([/* ... */]); $promise = $client->listMobileSdkReleasesAsync
([/* ... */]);
Retrieves a list of the available releases for the mobile SDK and the specified device platform.
The mobile SDK is not generally available. Customers who have access to the mobile SDK can use it to establish and manage WAF tokens for use in HTTP(S) requests from a mobile device to WAF. For more information, see WAF client application integration in the WAF Developer Guide.
Parameter Syntax
$result = $client->listMobileSdkReleases([ 'Limit' => <integer>, 'NextMarker' => '<string>', 'Platform' => 'IOS|ANDROID', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Platform
-
- Required: Yes
- Type: string
The device platform to retrieve the list for.
Result Syntax
[ 'NextMarker' => '<string>', 'ReleaseSummaries' => [ [ 'ReleaseVersion' => '<string>', 'Timestamp' => <DateTime>, ], // ... ], ]
Result Details
Members
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - ReleaseSummaries
-
- Type: Array of ReleaseSummary structures
High level information for the available SDK releases.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
ListRegexPatternSets
$result = $client->listRegexPatternSets
([/* ... */]); $promise = $client->listRegexPatternSetsAsync
([/* ... */]);
Retrieves an array of RegexPatternSetSummary objects for the regex pattern sets that you manage.
Parameter Syntax
$result = $client->listRegexPatternSets([ 'Limit' => <integer>, 'NextMarker' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'NextMarker' => '<string>', 'RegexPatternSets' => [ [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LockToken' => '<string>', 'Name' => '<string>', ], // ... ], ]
Result Details
Members
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - RegexPatternSets
-
- Type: Array of RegexPatternSetSummary structures
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
ListResourcesForWebACL
$result = $client->listResourcesForWebACL
([/* ... */]); $promise = $client->listResourcesForWebACLAsync
([/* ... */]);
Retrieves an array of the Amazon Resource Names (ARNs) for the regional resources that are associated with the specified web ACL. If you want the list of Amazon CloudFront resources, use the CloudFront call ListDistributionsByWebACLId
.
Parameter Syntax
$result = $client->listResourcesForWebACL([ 'ResourceType' => 'APPLICATION_LOAD_BALANCER|API_GATEWAY|APPSYNC|COGNITO_USER_POOL', 'WebACLArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ResourceType
-
- Type: string
Used for web ACLs that are scoped for regional applications. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
If you don't provide a resource type, the call uses the resource type
APPLICATION_LOAD_BALANCER
.Default:
APPLICATION_LOAD_BALANCER
- WebACLArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the web ACL.
Result Syntax
[ 'ResourceArns' => ['<string>', ...], ]
Result Details
Members
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
ListRuleGroups
$result = $client->listRuleGroups
([/* ... */]); $promise = $client->listRuleGroupsAsync
([/* ... */]);
Retrieves an array of RuleGroupSummary objects for the rule groups that you manage.
Parameter Syntax
$result = $client->listRuleGroups([ 'Limit' => <integer>, 'NextMarker' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'NextMarker' => '<string>', 'RuleGroups' => [ [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LockToken' => '<string>', 'Name' => '<string>', ], // ... ], ]
Result Details
Members
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - RuleGroups
-
- Type: Array of RuleGroupSummary structures
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
ListTagsForResource
$result = $client->listTagsForResource
([/* ... */]); $promise = $client->listTagsForResourceAsync
([/* ... */]);
Retrieves the TagInfoForResource for the specified 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 Amazon Web Services resource, up to 50 tags for a resource.
You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage or view tags through the WAF console.
Parameter Syntax
$result = $client->listTagsForResource([ 'Limit' => <integer>, 'NextMarker' => '<string>', 'ResourceARN' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - ResourceARN
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource.
Result Syntax
[ 'NextMarker' => '<string>', 'TagInfoForResource' => [ 'ResourceARN' => '<string>', 'TagList' => [ [ 'Key' => '<string>', 'Value' => '<string>', ], // ... ], ], ]
Result Details
Members
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - TagInfoForResource
-
- Type: TagInfoForResource structure
The collection of tagging definitions for the resource.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
The operation isn't valid.
ListWebACLs
$result = $client->listWebACLs
([/* ... */]); $promise = $client->listWebACLsAsync
([/* ... */]);
Retrieves an array of WebACLSummary objects for the web ACLs that you manage.
Parameter Syntax
$result = $client->listWebACLs([ 'Limit' => <integer>, 'NextMarker' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Limit
-
- Type: int
The maximum number of objects that you want WAF to return for this request. If more objects are available, in the response, WAF provides a
NextMarker
value that you can use in a subsequent call to get the next batch of objects. - NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'NextMarker' => '<string>', 'WebACLs' => [ [ 'ARN' => '<string>', 'Description' => '<string>', 'Id' => '<string>', 'LockToken' => '<string>', 'Name' => '<string>', ], // ... ], ]
Result Details
Members
- NextMarker
-
- Type: string
When you request a list of objects with a
Limit
setting, if the number of objects that are still available for retrieval exceeds the limit, WAF returns aNextMarker
value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request. - WebACLs
-
- Type: Array of WebACLSummary structures
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
PutLoggingConfiguration
$result = $client->putLoggingConfiguration
([/* ... */]); $promise = $client->putLoggingConfigurationAsync
([/* ... */]);
Enables the specified LoggingConfiguration, to start logging from a web ACL, according to the configuration provided.
This operation completely replaces any mutable specifications that you already have for a logging configuration with the ones that you provide to this call.
To modify an existing logging configuration, do the following:
-
Retrieve it by calling GetLoggingConfiguration
-
Update its settings as needed
-
Provide the complete logging configuration specification to this call
You can define one logging destination per web ACL.
You can access information about the traffic that WAF inspects using the following steps:
-
Create your logging destination. You can use an Amazon CloudWatch Logs log group, an Amazon Simple Storage Service (Amazon S3) bucket, or an Amazon Kinesis Data Firehose.
The name that you give the destination must start with
aws-waf-logs-
. Depending on the type of destination, you might need to configure additional settings or permissions.For configuration requirements and pricing information for each destination type, see Logging web ACL traffic in the WAF Developer Guide.
-
Associate your logging destination to your web ACL using a
PutLoggingConfiguration
request.
When you successfully enable logging using a PutLoggingConfiguration
request, WAF creates an additional role or policy that is required to write logs to the logging destination. For an Amazon CloudWatch Logs log group, WAF creates a resource policy on the log group. For an Amazon S3 bucket, WAF creates a bucket policy. For an Amazon Kinesis Data Firehose, WAF creates a service-linked role.
For additional information about web ACL logging, see Logging web ACL traffic information in the WAF Developer Guide.
Parameter Syntax
$result = $client->putLoggingConfiguration([ 'LoggingConfiguration' => [ // REQUIRED 'LogDestinationConfigs' => ['<string>', ...], // REQUIRED 'LoggingFilter' => [ 'DefaultBehavior' => 'KEEP|DROP', // REQUIRED 'Filters' => [ // REQUIRED [ 'Behavior' => 'KEEP|DROP', // REQUIRED 'Conditions' => [ // REQUIRED [ 'ActionCondition' => [ 'Action' => 'ALLOW|BLOCK|COUNT|CAPTCHA|CHALLENGE|EXCLUDED_AS_COUNT', // REQUIRED ], 'LabelNameCondition' => [ 'LabelName' => '<string>', // REQUIRED ], ], // ... ], 'Requirement' => 'MEETS_ALL|MEETS_ANY', // REQUIRED ], // ... ], ], 'ManagedByFirewallManager' => true || false, 'RedactedFields' => [ [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], // ... ], 'ResourceArn' => '<string>', // REQUIRED ], ]);
Parameter Details
Members
- LoggingConfiguration
-
- Required: Yes
- Type: LoggingConfiguration structure
Result Syntax
[ 'LoggingConfiguration' => [ 'LogDestinationConfigs' => ['<string>', ...], 'LoggingFilter' => [ 'DefaultBehavior' => 'KEEP|DROP', 'Filters' => [ [ 'Behavior' => 'KEEP|DROP', 'Conditions' => [ [ 'ActionCondition' => [ 'Action' => 'ALLOW|BLOCK|COUNT|CAPTCHA|CHALLENGE|EXCLUDED_AS_COUNT', ], 'LabelNameCondition' => [ 'LabelName' => '<string>', ], ], // ... ], 'Requirement' => 'MEETS_ALL|MEETS_ANY', ], // ... ], ], 'ManagedByFirewallManager' => true || false, 'RedactedFields' => [ [ 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Headers' => [ 'MatchPattern' => [ 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', ], 'SingleQueryArgument' => [ 'Name' => '<string>', ], 'UriPath' => [ ], ], // ... ], 'ResourceArn' => '<string>', ], ]
Result Details
Members
- LoggingConfiguration
-
- Type: LoggingConfiguration structure
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAFServiceLinkedRoleErrorException:
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 seconds. Please try your request again. The service linked role can also be locked by a previousDeleteServiceLinkedRole
request, which can lock the role for 15 minutes or more. If you recently made a call toDeleteServiceLinkedRole
, 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. -
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
The operation isn't valid.
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
WAFLogDestinationPermissionIssueException:
The operation failed because you don't have the permissions that your logging configuration requires. For information, see Logging web ACL traffic information in the WAF Developer Guide.
PutManagedRuleSetVersions
$result = $client->putManagedRuleSetVersions
([/* ... */]); $promise = $client->putManagedRuleSetVersionsAsync
([/* ... */]);
Defines the versions of your managed rule set that you are offering to the customers. Customers see your offerings as managed rule groups with versioning.
This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Amazon Web Services Marketplace sellers.
Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets
, GetManagedRuleSet
, PutManagedRuleSetVersions
, and UpdateManagedRuleSetVersionExpiryDate
.
Customers retrieve their managed rule group list by calling ListAvailableManagedRuleGroups. The name that you provide here for your managed rule set is the name the customer sees for the corresponding managed rule group. Customers can retrieve the available versions for a managed rule group by calling ListAvailableManagedRuleGroupVersions. You provide a rule group specification for each version. For each managed rule set, you must specify a version that you recommend using.
To initiate the expiration of a managed rule group version, use UpdateManagedRuleSetVersionExpiryDate.
Parameter Syntax
$result = $client->putManagedRuleSetVersions([ 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'RecommendedVersion' => '<string>', 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'VersionsToPublish' => [ '<VersionKeyString>' => [ 'AssociatedRuleGroupArn' => '<string>', 'ForecastedLifetime' => <integer>, ], // ... ], ]);
Parameter Details
Members
- Id
-
- Required: Yes
- Type: string
A unique identifier for the managed rule set. The ID is returned in the responses to commands like
list
. You provide it to operations likeget
andupdate
. - LockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - Name
-
- Required: Yes
- Type: string
The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.
This name is assigned to the corresponding managed rule group, which your customers can access and use.
- RecommendedVersion
-
- Type: string
The version of the named managed rule group that you'd like your customers to choose, from among your version offerings.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- VersionsToPublish
-
- Type: Associative array of custom strings keys (VersionKeyString) to VersionToPublish structures
The versions of the named managed rule group that you want to offer to your customers.
Result Syntax
[ 'NextLockToken' => '<string>', ]
Result Details
Members
- NextLockToken
-
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
The operation isn't valid.
PutPermissionPolicy
$result = $client->putPermissionPolicy
([/* ... */]); $promise = $client->putPermissionPolicyAsync
([/* ... */]);
Attaches an IAM policy to the specified resource. Use this to share a rule group across accounts.
You must be the owner of the rule group to perform this operation.
This action is subject to the following restrictions:
-
You can attach only one policy with each
PutPermissionPolicy
request. -
The ARN in the request must be a valid WAF RuleGroup ARN and the rule group must exist in the same Region.
-
The user making the request must be the owner of the rule group.
Parameter Syntax
$result = $client->putPermissionPolicy([ 'Policy' => '<string>', // REQUIRED 'ResourceArn' => '<string>', // REQUIRED ]);
Parameter Details
Members
- Policy
-
- Required: Yes
- Type: string
The policy to attach to the specified rule group.
The policy specifications must conform to the following:
-
The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.
-
The policy must include specifications for
Effect
,Action
, andPrincipal
. -
Effect
must specifyAllow
. -
Action
must specifywafv2:CreateWebACL
,wafv2:UpdateWebACL
, andwafv2:PutFirewallManagerRuleGroups
and may optionally specifywafv2:GetRuleGroup
. WAF rejects any extra actions or wildcard actions in the policy. -
The policy must not include a
Resource
parameter.
For more information, see IAM Policies.
- ResourceArn
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the policy.
Result Syntax
[]
Result Details
Errors
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAFInvalidPermissionPolicyException:
The operation failed because the specified policy isn't in the proper format.
The policy specifications must conform to the following:
-
The policy must be composed using IAM Policy version 2012-10-17 or version 2015-01-01.
-
The policy must include specifications for
Effect
,Action
, andPrincipal
. -
Effect
must specifyAllow
. -
Action
must specifywafv2:CreateWebACL
,wafv2:UpdateWebACL
, andwafv2:PutFirewallManagerRuleGroups
and may optionally specifywafv2:GetRuleGroup
. WAF rejects any extra actions or wildcard actions in the policy. -
The policy must not include a
Resource
parameter.
For more information, see IAM Policies.
-
TagResource
$result = $client->tagResource
([/* ... */]); $promise = $client->tagResourceAsync
([/* ... */]);
Associates tags with the specified Amazon Web Services 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 Amazon Web Services resource, up to 50 tags for a resource.
You can tag the Amazon Web Services resources that you manage through WAF: web ACLs, rule groups, IP sets, and regex pattern sets. You can't manage or view tags through the WAF console.
Parameter Syntax
$result = $client->tagResource([ 'ResourceARN' => '<string>', // REQUIRED 'Tags' => [ // REQUIRED [ 'Key' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ]);
Parameter Details
Members
- ResourceARN
-
- Required: Yes
- Type: string
The Amazon Resource Name (ARN) of the resource.
- Tags
-
- Required: Yes
- Type: Array of Tag structures
An array of key:value pairs to associate with the resource.
Result Syntax
[]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
The operation isn't valid.
UntagResource
$result = $client->untagResource
([/* ... */]); $promise = $client->untagResourceAsync
([/* ... */]);
Disassociates tags from an Amazon Web Services resource. Tags are key:value pairs that you can associate with Amazon Web Services resources. For example, the tag key might be "customer" and the tag value might be "companyA." You can specify one or more tags to add to each container. You can add up to 50 tags to each Amazon Web Services resource.
Parameter Syntax
$result = $client->untagResource([ 'ResourceARN' => '<string>', // REQUIRED 'TagKeys' => ['<string>', ...], // REQUIRED ]);
Parameter Details
Members
Result Syntax
[]
Result Details
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
An error occurred during the tagging operation. Retry your request.
-
WAFTagOperationInternalErrorException:
WAF couldn’t perform your tagging operation because of an internal error. Retry your request.
-
The operation isn't valid.
UpdateIPSet
$result = $client->updateIPSet
([/* ... */]); $promise = $client->updateIPSetAsync
([/* ... */]);
Updates the specified IPSet.
This operation completely replaces the mutable specifications that you already have for the IP set with the ones that you provide to this call.
To modify an IP set, do the following:
-
Retrieve it by calling GetIPSet
-
Update its settings as needed
-
Provide the complete IP set specification to this call
When you make changes to web ACLs or web ACL components, like rules and rule groups, WAF propagates the changes everywhere that the web ACL and its components are stored and used. Your changes are applied within seconds, but there might be a brief period of inconsistency when the changes have arrived in some places and not in others. So, for example, if you change a rule action setting, the action might be the old action in one area and the new action in another area. Or if you add an IP address to an IP set used in a blocking rule, the new address might briefly be blocked in one area while still allowed in another. This temporary inconsistency can occur when you first associate a web ACL with an Amazon Web Services resource and when you change a web ACL that is already associated with a resource. Generally, any inconsistencies of this type last only a few seconds.
Parameter Syntax
$result = $client->updateIPSet([ 'Addresses' => ['<string>', ...], // REQUIRED 'Description' => '<string>', 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Addresses
-
- Required: Yes
- Type: Array of strings
Contains an array of strings that specifies zero or more IP addresses or blocks of IP addresses. All addresses must be specified using Classless Inter-Domain Routing (CIDR) notation. WAF supports all IPv4 and IPv6 CIDR ranges except for
/0
.Example address strings:
-
To configure WAF to allow, block, or count requests that originated from the IP address 192.0.2.44, specify
192.0.2.44/32
. -
To configure WAF to allow, block, or count requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify
192.0.2.0/24
. -
To configure WAF to allow, block, or count requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify
1111:0000:0000:0000:0000:0000:0000:0111/128
. -
To configure WAF to allow, block, or count requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify
1111:0000:0000:0000:0000:0000:0000:0000/64
.
For more information about CIDR notation, see the Wikipedia entry Classless Inter-Domain Routing.
Example JSON
Addresses
specifications:-
Empty array:
"Addresses": []
-
Array with one address:
"Addresses": ["192.0.2.44/32"]
-
Array with three addresses:
"Addresses": ["192.0.2.44/32", "192.0.2.0/24", "192.0.0.0/16"]
-
INVALID specification:
"Addresses": [""]
INVALID
- Description
-
- Type: string
A description of the IP set that helps with identification.
- Id
-
- Required: Yes
- Type: string
A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- LockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - Name
-
- Required: Yes
- Type: string
The name of the IP set. You cannot change the name of an
IPSet
after you create it. - Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'NextLockToken' => '<string>', ]
Result Details
Members
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
The operation isn't valid.
UpdateManagedRuleSetVersionExpiryDate
$result = $client->updateManagedRuleSetVersionExpiryDate
([/* ... */]); $promise = $client->updateManagedRuleSetVersionExpiryDateAsync
([/* ... */]);
Updates the expiration information for your managed rule set. Use this to initiate the expiration of a managed rule group version. After you initiate expiration for a version, WAF excludes it from the response to ListAvailableManagedRuleGroupVersions for the managed rule group.
This is intended for use only by vendors of managed rule sets. Vendors are Amazon Web Services and Amazon Web Services Marketplace sellers.
Vendors, you can use the managed rule set APIs to provide controlled rollout of your versioned managed rule group offerings for your customers. The APIs are ListManagedRuleSets
, GetManagedRuleSet
, PutManagedRuleSetVersions
, and UpdateManagedRuleSetVersionExpiryDate
.
Parameter Syntax
$result = $client->updateManagedRuleSetVersionExpiryDate([ 'ExpiryTimestamp' => <integer || string || DateTime>, // REQUIRED 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'VersionToExpire' => '<string>', // REQUIRED ]);
Parameter Details
Members
- ExpiryTimestamp
-
- Required: Yes
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time that you want the version to expire.
Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z".
- Id
-
- Required: Yes
- Type: string
A unique identifier for the managed rule set. The ID is returned in the responses to commands like
list
. You provide it to operations likeget
andupdate
. - LockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - Name
-
- Required: Yes
- Type: string
The name of the managed rule set. You use this, along with the rule set ID, to identify the rule set.
This name is assigned to the corresponding managed rule group, which your customers can access and use.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- VersionToExpire
-
- Required: Yes
- Type: string
The version that you want to remove from your list of offerings for the named managed rule group.
Result Syntax
[ 'ExpiringVersion' => '<string>', 'ExpiryTimestamp' => <DateTime>, 'NextLockToken' => '<string>', ]
Result Details
Members
- ExpiringVersion
-
- Type: string
The version that is set to expire.
- ExpiryTimestamp
-
- Type: timestamp (string|DateTime or anything parsable by strtotime)
The time that the version will expire.
Times are in Coordinated Universal Time (UTC) format. UTC format includes the special designator, Z. For example, "2016-09-27T14:50Z".
- NextLockToken
-
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation.
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
The operation isn't valid.
UpdateRegexPatternSet
$result = $client->updateRegexPatternSet
([/* ... */]); $promise = $client->updateRegexPatternSetAsync
([/* ... */]);
Updates the specified RegexPatternSet.
This operation completely replaces the mutable specifications that you already have for the regex pattern set with the ones that you provide to this call.
To modify a regex pattern set, do the following:
-
Retrieve it by calling GetRegexPatternSet
-
Update its settings as needed
-
Provide the complete regex pattern set specification to this call
When you make changes to web ACLs or web ACL components, like rules and rule groups, WAF propagates the changes everywhere that the web ACL and its components are stored and used. Your changes are applied within seconds, but there might be a brief period of inconsistency when the changes have arrived in some places and not in others. So, for example, if you change a rule action setting, the action might be the old action in one area and the new action in another area. Or if you add an IP address to an IP set used in a blocking rule, the new address might briefly be blocked in one area while still allowed in another. This temporary inconsistency can occur when you first associate a web ACL with an Amazon Web Services resource and when you change a web ACL that is already associated with a resource. Generally, any inconsistencies of this type last only a few seconds.
Parameter Syntax
$result = $client->updateRegexPatternSet([ 'Description' => '<string>', 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'RegularExpressionList' => [ // REQUIRED [ 'RegexString' => '<string>', ], // ... ], 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED ]);
Parameter Details
Members
- Description
-
- Type: string
A description of the set that helps with identification.
- Id
-
- Required: Yes
- Type: string
A unique identifier for the set. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- LockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - Name
-
- Required: Yes
- Type: string
The name of the set. You cannot change the name after you create the set.
- RegularExpressionList
-
- Required: Yes
- Type: Array of Regex structures
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
Result Syntax
[ 'NextLockToken' => '<string>', ]
Result Details
Members
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
The operation isn't valid.
UpdateRuleGroup
$result = $client->updateRuleGroup
([/* ... */]); $promise = $client->updateRuleGroupAsync
([/* ... */]);
Updates the specified RuleGroup.
This operation completely replaces the mutable specifications that you already have for the rule group with the ones that you provide to this call.
To modify a rule group, do the following:
-
Retrieve it by calling GetRuleGroup
-
Update its settings as needed
-
Provide the complete rule group specification to this call
When you make changes to web ACLs or web ACL components, like rules and rule groups, WAF propagates the changes everywhere that the web ACL and its components are stored and used. Your changes are applied within seconds, but there might be a brief period of inconsistency when the changes have arrived in some places and not in others. So, for example, if you change a rule action setting, the action might be the old action in one area and the new action in another area. Or if you add an IP address to an IP set used in a blocking rule, the new address might briefly be blocked in one area while still allowed in another. This temporary inconsistency can occur when you first associate a web ACL with an Amazon Web Services resource and when you change a web ACL that is already associated with a resource. Generally, any inconsistencies of this type last only a few seconds.
A rule group defines a collection of rules to inspect and control web requests that you can use in a WebACL. When you create a rule group, you define an immutable capacity limit. If you update a rule group, you must stay within the capacity. This allows others to reuse the rule group with confidence in its capacity requirements.
Parameter Syntax
$result = $client->updateRuleGroup([ 'CustomResponseBodies' => [ '<EntityName>' => [ 'Content' => '<string>', // REQUIRED 'ContentType' => 'TEXT_PLAIN|TEXT_HTML|APPLICATION_JSON', // REQUIRED ], // ... ], 'Description' => '<string>', 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Rules' => [ [ 'Action' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'Name' => '<string>', // REQUIRED 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, // REQUIRED 'RuleLabels' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'Statement' => [ // REQUIRED 'AndStatement' => [ 'Statements' => [ // REQUIRED [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'PositionalConstraint' => 'EXACTLY|STARTS_WITH|ENDS_WITH|CONTAINS|CONTAINS_WORD', // REQUIRED 'SearchString' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'GeoMatchStatement' => [ 'CountryCodes' => ['<string>', ...], 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED ], ], 'IPSetReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'IPSetForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED 'Position' => 'FIRST|LAST|ANY', // REQUIRED ], ], 'LabelMatchStatement' => [ 'Key' => '<string>', // REQUIRED 'Scope' => 'LABEL|NAMESPACE', // REQUIRED ], 'ManagedRuleGroupStatement' => [ 'ExcludedRules' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'ManagedRuleGroupConfigs' => [ [ 'AWSManagedRulesBotControlRuleSet' => [ 'InspectionLevel' => 'COMMON|TARGETED', // REQUIRED ], 'LoginPath' => '<string>', 'PasswordField' => [ 'Identifier' => '<string>', // REQUIRED ], 'PayloadType' => 'JSON|FORM_ENCODED', 'UsernameField' => [ 'Identifier' => '<string>', // REQUIRED ], ], // ... ], 'Name' => '<string>', // REQUIRED 'RuleActionOverrides' => [ [ 'ActionToUse' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Name' => '<string>', // REQUIRED ], // ... ], 'ScopeDownStatement' => [...], // RECURSIVE 'VendorName' => '<string>', // REQUIRED 'Version' => '<string>', ], 'NotStatement' => [ 'Statement' => [...], // REQUIRED, RECURSIVE ], 'OrStatement' => [ 'Statements' => [ // REQUIRED [...], // RECURSIVE // ... ], ], 'RateBasedStatement' => [ 'AggregateKeyType' => 'IP|FORWARDED_IP', // REQUIRED 'ForwardedIPConfig' => [ 'FallbackBehavior' => 'MATCH|NO_MATCH', // REQUIRED 'HeaderName' => '<string>', // REQUIRED ], 'Limit' => <integer>, // REQUIRED 'ScopeDownStatement' => [...], // RECURSIVE ], 'RegexMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'RegexString' => '<string>', // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'RegexPatternSetReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'RuleGroupReferenceStatement' => [ 'ARN' => '<string>', // REQUIRED 'ExcludedRules' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'RuleActionOverrides' => [ [ 'ActionToUse' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Name' => '<string>', // REQUIRED ], // ... ], ], 'SizeConstraintStatement' => [ 'ComparisonOperator' => 'EQ|NE|LE|LT|GE|GT', // REQUIRED 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'Size' => <integer>, // REQUIRED 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'SqliMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'SensitivityLevel' => 'LOW|HIGH', 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], 'XssMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedCookies' => ['<string>', ...], 'IncludedCookies' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'Headers' => [ 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'ExcludedHeaders' => ['<string>', ...], 'IncludedHeaders' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', // REQUIRED ], 'JsonBody' => [ 'InvalidFallbackBehavior' => 'MATCH|NO_MATCH|EVALUATE_AS_STRING', 'MatchPattern' => [ // REQUIRED 'All' => [ ], 'IncludedPaths' => ['<string>', ...], ], 'MatchScope' => 'ALL|KEY|VALUE', // REQUIRED 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Method' => [ ], 'QueryString' => [ ], 'SingleHeader' => [ 'Name' => '<string>', // REQUIRED ], 'SingleQueryArgument' => [ 'Name' => '<string>', // REQUIRED ], 'UriPath' => [ ], ], 'TextTransformations' => [ // REQUIRED [ 'Priority' => <integer>, // REQUIRED 'Type' => 'NONE|COMPRESS_WHITE_SPACE|HTML_ENTITY_DECODE|LOWERCASE|CMD_LINE|URL_DECODE|BASE64_DECODE|HEX_DECODE|MD5|REPLACE_COMMENTS|ESCAPE_SEQ_DECODE|SQL_HEX_DECODE|CSS_DECODE|JS_DECODE|NORMALIZE_PATH|NORMALIZE_PATH_WIN|REMOVE_NULLS|REPLACE_NULLS|BASE64_DECODE_EXT|URL_DECODE_UNI|UTF8_TO_UNICODE', // REQUIRED ], // ... ], ], ], 'VisibilityConfig' => [ // REQUIRED 'CloudWatchMetricsEnabled' => true || false, // REQUIRED 'MetricName' => '<string>', // REQUIRED 'SampledRequestsEnabled' => true || false, // REQUIRED ], ], // ... ], 'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED 'VisibilityConfig' => [ // REQUIRED 'CloudWatchMetricsEnabled' => true || false, // REQUIRED 'MetricName' => '<string>', // REQUIRED 'SampledRequestsEnabled' => true || false, // REQUIRED ], ]);
Parameter Details
Members
- CustomResponseBodies
-
- Type: Associative array of custom strings keys (EntityName) to CustomResponseBody structures
A map of custom response keys and content bodies. When you create a rule with a block action, you can send a custom response to the web request. You define these for the rule group, and then use them in the rules that you define in the rule group.
For information about customizing web requests and responses, see Customizing web requests and responses in WAF in the WAF Developer Guide.
For information about the limits on count and size for custom request and response settings, see WAF quotas in the WAF Developer Guide.
- Description
-
- Type: string
A description of the rule group that helps with identification.
- Id
-
- Required: Yes
- Type: string
A unique identifier for the rule group. This ID is returned in the responses to create and list commands. You provide it to operations like update and delete.
- LockToken
-
- Required: Yes
- Type: string
A token used for optimistic locking. WAF returns a token to your
get
andlist
requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations likeupdate
anddelete
. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with aWAFOptimisticLockException
. If this happens, perform anotherget
, and use the new token returned by that operation. - Name
-
- Required: Yes
- Type: string
The name of the rule group. You cannot change the name of a rule group after you create it.
- Rules
-
- Type: Array of Rule structures
The Rule statements used to identify the web requests that you want to allow, block, or count. Each rule includes one top-level statement that WAF uses to identify matching web requests, and parameters that govern how WAF handles them.
- Scope
-
- Required: Yes
- Type: string
Specifies whether this is for an Amazon CloudFront distribution or for a regional application. A regional application can be an Application Load Balancer (ALB), an Amazon API Gateway REST API, an AppSync GraphQL API, or an Amazon Cognito user pool.
To work with CloudFront, you must also specify the Region US East (N. Virginia) as follows:
-
CLI - Specify the Region when you use the CloudFront scope:
--scope=CLOUDFRONT --region=us-east-1
. -
API and SDKs - For all calls, use the Region endpoint us-east-1.
- VisibilityConfig
-
- Required: Yes
- Type: VisibilityConfig structure
Defines and enables Amazon CloudWatch metrics and web request sample collection.
Result Syntax
[ 'NextLockToken' => '<string>', ]
Result Details
Members
Errors
-
Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.
-
The operation failed because WAF didn't recognize a parameter in the request. For example:
-
You specified a parameter name or value that isn't valid.
-
Your nested statement isn't valid. You might have tried to nest a statement that can’t be nested.
-
You tried to update a
WebACL
with aDefaultAction
that isn't among the types available at DefaultAction. -
Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL can't be associated.
-
-
WAF couldn’t perform the operation because your resource doesn't exist. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate.
-
WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.
-
WAF couldn’t save your changes because you tried to update or delete a resource that has changed since you last retrieved it. Get the resource again, make any changes you need to make to the new copy, and retry your operation.
-
WAF couldn’t perform the operation because you exceeded your resource limit. For example, the maximum number of
WebACL
objects that you can create for an Amazon Web Services account. For more information, see WAF quotas in the WAF Developer Guide. -
WAFUnavailableEntityException:
WAF couldn’t retrieve a resource that you specified for this operation. If you've just created a resource that you're using in this operation, you might just need to wait a few minutes. It can take from a few seconds to a number of minutes for changes to propagate. Verify the resources that you are specifying in your request parameters and then retry the operation.
-
WAFSubscriptionNotFoundException:
You tried to use a managed rule group that's available by subscription, but you aren't subscribed to it yet.
-
The operation isn't valid.
-
WAFConfigurationWarningException:
The operation failed because you are inspecting the web request body, headers, or cookies without specifying how to handle oversize components. Rules that inspect the body must either provide an
OversizeHandling
configuration or they must be preceded by aSizeConstraintStatement
that blocks the body content from being too large. Rules that inspect the headers or cookies must provide anOversizeHandling
configuration.Provide the handling configuration and retry your operation.
Alternately, you can suppress this warning by adding the following tag to the resource that you provide to this operation:
Tag
(key:WAF:OversizeFieldsHandlingConstraintOptOut
, value:true
).
UpdateWebACL
$result = $client->updateWebACL
([/* ... */]); $promise = $client->updateWebACLAsync
([/* ... */]);
Updates the specified WebACL. While updating a web ACL, WAF provides continuous coverage to the resources that you have associated with the web ACL.
This operation completely replaces the mutable specifications that you already have for the web ACL with the ones that you provide to this call.
To modify a web ACL, do the following:
-
Retrieve it by calling GetWebACL
-
Update its settings as needed
-
Provide the complete web ACL specification to this call
When you make changes to web ACLs or web ACL components, like rules and rule groups, WAF propagates the changes everywhere that the web ACL and its components are stored and used. Your changes are applied within seconds, but there might be a brief period of inconsistency when the changes have arrived in some places and not in others. So, for example, if you change a rule action setting, the action might be the old action in one area and the new action in another area. Or if you add an IP address to an IP set used in a blocking rule, the new address might briefly be blocked in one area while still allowed in another. This temporary inconsistency can occur when you first associate a web ACL with an Amazon Web Services resource and when you change a web ACL that is already associated with a resource. Generally, any inconsistencies of this type last only a few seconds.
A web ACL defines a collection of rules to use to inspect and control web requests. Each rule has an action defined (allow, block, or count) for requests that match the statement of the rule. In the web ACL, you assign a default action to take (allow, block) for any request that does not match any of the rules. The rules in a web ACL can be a combination of the types Rule, RuleGroup, and managed rule group. You can associate a web ACL with one or more Amazon Web Services resources to protect. The resources can be an Amazon CloudFront distribution, an Amazon API Gateway REST API, an Application Load Balancer, an AppSync GraphQL API, or an Amazon Cognito user pool.
Parameter Syntax
$result = $client->updateWebACL([ 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'CustomResponseBodies' => [ '<EntityName>' => [ 'Content' => '<string>', // REQUIRED 'ContentType' => 'TEXT_PLAIN|TEXT_HTML|APPLICATION_JSON', // REQUIRED ], // ... ], 'DefaultAction' => [ // REQUIRED 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'Description' => '<string>', 'Id' => '<string>', // REQUIRED 'LockToken' => '<string>', // REQUIRED 'Name' => '<string>', // REQUIRED 'Rules' => [ [ 'Action' => [ 'Allow' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Block' => [ 'CustomResponse' => [ 'CustomResponseBodyKey' => '<string>', 'ResponseCode' => <integer>, // REQUIRED 'ResponseHeaders' => [ [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Captcha' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Challenge' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], ], 'CaptchaConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'ChallengeConfig' => [ 'ImmunityTimeProperty' => [ 'ImmunityTime' => <integer>, // REQUIRED ], ], 'Name' => '<string>', // REQUIRED 'OverrideAction' => [ 'Count' => [ 'CustomRequestHandling' => [ 'InsertHeaders' => [ // REQUIRED [ 'Name' => '<string>', // REQUIRED 'Value' => '<string>', // REQUIRED ], // ... ], ], ], 'None' => [ ], ], 'Priority' => <integer>, // REQUIRED 'RuleLabels' => [ [ 'Name' => '<string>', // REQUIRED ], // ... ], 'Statement' => [ // REQUIRED 'AndStatement' => [ 'Statements' => [ // REQUIRED [...], // RECURSIVE // ... ], ], 'ByteMatchStatement' => [ 'FieldToMatch' => [ // REQUIRED 'AllQueryArguments' => [ ], 'Body' => [ 'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH', ], 'Cookies' => [