SDK for PHP 3.x

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.
CreateAPIKey ( array $params = [] )
Creates an API key that contains a set of token domains.
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.
DeleteAPIKey ( array $params = [] )
Deletes the specified API key.
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.
DescribeAllManagedProducts ( array $params = [] )
Provides high-level information for the Amazon Web Services Managed Rules rule groups and Amazon Web Services Marketplace managed rule groups.
DescribeManagedProductsByVendor ( array $params = [] )
Provides high-level information for the managed rule groups owned by a specific vendor.
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.
GetDecryptedAPIKey ( array $params = [] )
Returns your API key in decrypted form.
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 IP addresses 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.
ListAPIKeys ( array $params = [] )
Retrieves a list of the API keys that you've defined for the specified scope.
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 = [] )
Use this to share a rule group with other accounts.
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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 in the Amazon CloudFront Developer Guide.

Required permissions for customer-managed IAM policies

This call requires permissions that are specific to the protected resource type. For details, see Permissions for AssociateWebACL in the WAF Developer Guide.

Temporary inconsistencies during updates

When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes.

The following are examples of the temporary inconsistencies that you might notice during change propagation:

  • After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable.

  • After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another.

  • After you change a rule action setting, you might see the old action in some places and the new action in others.

  • After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another.

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:partition:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id

  • For an Amazon API Gateway REST API: arn:partition:apigateway:region::/restapis/api-id/stages/stage-name

  • For an AppSync GraphQL API: arn:partition:appsync:region:account-id:apis/GraphQLApiId

  • For an Amazon Cognito user pool: arn:partition:cognito-idp:region:account-id:userpool/user-pool-id

  • For an App Runner service: arn:partition:apprunner:region:account-id:service/apprunner-service-name/apprunner-service-id

  • For an Amazon Web Services Verified Access instance: arn:partition:ec2:region:account-id:verified-access-instance/instance-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

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

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. For more information, see WAF web ACL capacity units (WCU) in the WAF Developer Guide.

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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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' => [
                        [
                            'AWSManagedRulesACFPRuleSet' => [
                                'CreationPath' => '<string>', // REQUIRED
                                'EnableRegexInPath' => true || false,
                                'RegistrationPagePath' => '<string>', // REQUIRED
                                'RequestInspection' => [ // REQUIRED
                                    'AddressFields' => [
                                        [
                                            'Identifier' => '<string>', // REQUIRED
                                        ],
                                        // ...
                                    ],
                                    'EmailField' => [
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                    'PasswordField' => [
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                    'PayloadType' => 'JSON|FORM_ENCODED', // REQUIRED
                                    'PhoneNumberFields' => [
                                        [
                                            'Identifier' => '<string>', // REQUIRED
                                        ],
                                        // ...
                                    ],
                                    'UsernameField' => [
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                ],
                                'ResponseInspection' => [
                                    'BodyContains' => [
                                        'FailureStrings' => ['<string>', ...], // REQUIRED
                                        'SuccessStrings' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Header' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Name' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Json' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'StatusCode' => [
                                        'FailureCodes' => [<integer>, ...], // REQUIRED
                                        'SuccessCodes' => [<integer>, ...], // REQUIRED
                                    ],
                                ],
                            ],
                            'AWSManagedRulesATPRuleSet' => [
                                'EnableRegexInPath' => true || false,
                                'LoginPath' => '<string>', // REQUIRED
                                'RequestInspection' => [
                                    'PasswordField' => [ // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                    'PayloadType' => 'JSON|FORM_ENCODED', // REQUIRED
                                    'UsernameField' => [ // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                ],
                                'ResponseInspection' => [
                                    'BodyContains' => [
                                        'FailureStrings' => ['<string>', ...], // REQUIRED
                                        'SuccessStrings' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Header' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Name' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Json' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'StatusCode' => [
                                        'FailureCodes' => [<integer>, ...], // REQUIRED
                                        'SuccessCodes' => [<integer>, ...], // REQUIRED
                                    ],
                                ],
                            ],
                            'AWSManagedRulesBotControlRuleSet' => [
                                'EnableMachineLearning' => true || false,
                                '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|CUSTOM_KEYS|CONSTANT', // REQUIRED
                    'CustomKeys' => [
                        [
                            'Cookie' => [
                                'Name' => '<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
                                    ],
                                    // ...
                                ],
                            ],
                            'ForwardedIP' => [
                            ],
                            'HTTPMethod' => [
                            ],
                            'Header' => [
                                'Name' => '<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
                                    ],
                                    // ...
                                ],
                            ],
                            'IP' => [
                            ],
                            'LabelNamespace' => [
                                'Namespace' => '<string>', // REQUIRED
                            ],
                            'QueryArgument' => [
                                'Name' => '<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
                                    ],
                                    // ...
                                ],
                            ],
                            'QueryString' => [
                                '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
                                    ],
                                    // ...
                                ],
                            ],
                            '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
                                    ],
                                    // ...
                                ],
                            ],
                        ],
                        // ...
                    ],
                    'EvaluationWindowSec' => <integer>,
                    '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

Members
Capacity
Type: long (int|float)

The capacity required by the rules and scope.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFLimitsExceededException:

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.

WAFInvalidResourceException:

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.

WAFInvalidOperationException:

The operation isn't valid.

CreateAPIKey

$result = $client->createAPIKey([/* ... */]);
$promise = $client->createAPIKeyAsync([/* ... */]);

Creates an API key that contains a set of token domains.

API keys are required for the integration of the CAPTCHA API in your JavaScript client applications. The API lets you customize the placement and characteristics of the CAPTCHA puzzle for your end users. For more information about the CAPTCHA JavaScript integration, see WAF client application integration in the WAF Developer Guide.

You can use a single key for up to 5 domains. After you generate a key, you can copy it for use in your JavaScript integration.

Parameter Syntax

$result = $client->createAPIKey([
    'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED
    'TokenDomains' => ['<string>', ...], // REQUIRED
]);

Parameter Details

Members
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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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.

TokenDomains
Required: Yes
Type: Array of strings

The client application domains that you want to use this API key for.

Example JSON: "TokenDomains": ["abc.com", "store.abc.com"]

Public suffixes aren't allowed. For example, you can't use gov.au or co.uk as token domains.

Result Syntax

[
    'APIKey' => '<string>',
]

Result Details

Members
APIKey
Type: string

The generated, encrypted API key. You can copy this for use in your JavaScript CAPTCHA integration.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

The operation isn't valid.

WAFLimitsExceededException:

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.

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 that you want WAF to inspect for in incoming requests. 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:

  • For requests that originated from the IP address 192.0.2.44, specify 192.0.2.44/32.

  • For requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.

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

  • For 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 or IPV6.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFDuplicateItemException:

WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.

WAFOptimisticLockException:

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.

WAFLimitsExceededException:

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.

WAFTagOperationException:

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.

WAFInvalidOperationException:

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFDuplicateItemException:

WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.

WAFOptimisticLockException:

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.

WAFLimitsExceededException:

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.

WAFTagOperationException:

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.

WAFInvalidOperationException:

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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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' => [
                        [
                            'AWSManagedRulesACFPRuleSet' => [
                                'CreationPath' => '<string>', // REQUIRED
                                'EnableRegexInPath' => true || false,
                                'RegistrationPagePath' => '<string>', // REQUIRED
                                'RequestInspection' => [ // REQUIRED
                                    'AddressFields' => [
                                        [
                                            'Identifier' => '<string>', // REQUIRED
                                        ],
                                        // ...
                                    ],
                                    'EmailField' => [
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                    'PasswordField' => [
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                    'PayloadType' => 'JSON|FORM_ENCODED', // REQUIRED
                                    'PhoneNumberFields' => [
                                        [
                                            'Identifier' => '<string>', // REQUIRED
                                        ],
                                        // ...
                                    ],
                                    'UsernameField' => [
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                ],
                                'ResponseInspection' => [
                                    'BodyContains' => [
                                        'FailureStrings' => ['<string>', ...], // REQUIRED
                                        'SuccessStrings' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Header' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Name' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Json' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'StatusCode' => [
                                        'FailureCodes' => [<integer>, ...], // REQUIRED
                                        'SuccessCodes' => [<integer>, ...], // REQUIRED
                                    ],
                                ],
                            ],
                            'AWSManagedRulesATPRuleSet' => [
                                'EnableRegexInPath' => true || false,
                                'LoginPath' => '<string>', // REQUIRED
                                'RequestInspection' => [
                                    'PasswordField' => [ // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                    'PayloadType' => 'JSON|FORM_ENCODED', // REQUIRED
                                    'UsernameField' => [ // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                ],
                                'ResponseInspection' => [
                                    'BodyContains' => [
                                        'FailureStrings' => ['<string>', ...], // REQUIRED
                                        'SuccessStrings' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Header' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Name' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Json' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'StatusCode' => [
                                        'FailureCodes' => [<integer>, ...], // REQUIRED
                                        'SuccessCodes' => [<integer>, ...], // REQUIRED
                                    ],
                                ],
                            ],
                            'AWSManagedRulesBotControlRuleSet' => [
                                'EnableMachineLearning' => true || false,
                                '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|CUSTOM_KEYS|CONSTANT', // REQUIRED
                    'CustomKeys' => [
                        [
                            'Cookie' => [
                                'Name' => '<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
                                    ],
                                    // ...
                                ],
                            ],
                            'ForwardedIP' => [
                            ],
                            'HTTPMethod' => [
                            ],
                            'Header' => [
                                'Name' => '<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
                                    ],
                                    // ...
                                ],
                            ],
                            'IP' => [
                            ],
                            'LabelNamespace' => [
                                'Namespace' => '<string>', // REQUIRED
                            ],
                            'QueryArgument' => [
                                'Name' => '<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
                                    ],
                                    // ...
                                ],
                            ],
                            'QueryString' => [
                                '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
                                    ],
                                    // ...
                                ],
                            ],
                            '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
                                    ],
                                    // ...
                                ],
                            ],
                        ],
                        // ...
                    ],
                    'EvaluationWindowSec' => <integer>,
                    '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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. For more information, see WAF web ACL capacity units (WCU) in the WAF Developer Guide.

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 manage. 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFDuplicateItemException:

WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.

WAFOptimisticLockException:

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.

WAFLimitsExceededException:

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.

WAFTagOperationException:

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.

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

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 a statement that defines what to look for in web requests and an action that WAF applies to requests that match the statement. 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

Parameter Syntax

$result = $client->createWebACL([
    'AssociationConfig' => [
        'RequestBody' => [
            '<AssociatedResourceType>' => [
                'DefaultSizeInspectionLimit' => 'KB_16|KB_32|KB_48|KB_64', // REQUIRED
            ],
            // ...
        ],
    ],
    '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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' => [
                        [
                            'AWSManagedRulesACFPRuleSet' => [
                                'CreationPath' => '<string>', // REQUIRED
                                'EnableRegexInPath' => true || false,
                                'RegistrationPagePath' => '<string>', // REQUIRED
                                'RequestInspection' => [ // REQUIRED
                                    'AddressFields' => [
                                        [
                                            'Identifier' => '<string>', // REQUIRED
                                        ],
                                        // ...
                                    ],
                                    'EmailField' => [
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                    'PasswordField' => [
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                    'PayloadType' => 'JSON|FORM_ENCODED', // REQUIRED
                                    'PhoneNumberFields' => [
                                        [
                                            'Identifier' => '<string>', // REQUIRED
                                        ],
                                        // ...
                                    ],
                                    'UsernameField' => [
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                ],
                                'ResponseInspection' => [
                                    'BodyContains' => [
                                        'FailureStrings' => ['<string>', ...], // REQUIRED
                                        'SuccessStrings' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Header' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Name' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Json' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'StatusCode' => [
                                        'FailureCodes' => [<integer>, ...], // REQUIRED
                                        'SuccessCodes' => [<integer>, ...], // REQUIRED
                                    ],
                                ],
                            ],
                            'AWSManagedRulesATPRuleSet' => [
                                'EnableRegexInPath' => true || false,
                                'LoginPath' => '<string>', // REQUIRED
                                'RequestInspection' => [
                                    'PasswordField' => [ // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                    'PayloadType' => 'JSON|FORM_ENCODED', // REQUIRED
                                    'UsernameField' => [ // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                    ],
                                ],
                                'ResponseInspection' => [
                                    'BodyContains' => [
                                        'FailureStrings' => ['<string>', ...], // REQUIRED
                                        'SuccessStrings' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Header' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Name' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'Json' => [
                                        'FailureValues' => ['<string>', ...], // REQUIRED
                                        'Identifier' => '<string>', // REQUIRED
                                        'SuccessValues' => ['<string>', ...], // REQUIRED
                                    ],
                                    'StatusCode' => [
                                        'FailureCodes' => [<integer>, ...], // REQUIRED
                                        'SuccessCodes' => [<integer>, ...], // REQUIRED
                                    ],
                                ],
                            ],
                            'AWSManagedRulesBotControlRuleSet' => [
                                'EnableMachineLearning' => true || false,
                                '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|CUSTOM_KEYS|CONSTANT', // REQUIRED
                    'CustomKeys' => [
                        [
                            'Cookie' => [
                                'Name' => '<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
                                    ],
                                    // ...
                                ],
                            ],
                            'ForwardedIP' => [
                            ],
                            'HTTPMethod' => [
                            ],
                            'Header' => [
                                'Name' => '<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
                                    ],
                                    // ...
                                ],
                            ],
                            'IP' => [
                            ],
                            'LabelNamespace' => [
                                'Namespace' => '<string>', // REQUIRED
                            ],
                            'QueryArgument' => [
                                'Name' => '<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
                                    ],
                                    // ...
                                ],
                            ],
                            'QueryString' => [
                                '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
                                    ],
                                    // ...
                                ],
                            ],
                            '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
                                    ],
                                    // ...
                                ],
                            ],
                        ],
                        // ...
                    ],
                    'EvaluationWindowSec' => <integer>,
                    '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
                        ],
                        'HeaderOrder' => [
                            '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
                        ],
                        'JA3Fingerprint' => [
                            'FallbackBehavior' => '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
AssociationConfig
Type: AssociationConfig structure

Specifies custom configurations for the associations between the web ACL and protected resources.

Use this to customize the maximum size of the request body that your protected resources forward to WAF for inspection. You can customize this setting for CloudFront, API Gateway, Amazon Cognito, App Runner, or Verified Access resources. The default setting is 16 KB (16,384 bytes).

You are charged additional fees when your protected resources forward body sizes that are larger than the default. For more information, see WAF Pricing.

For Application Load Balancer and AppSync, the limit is fixed at 8 KB (8,192 bytes).

CaptchaConfig
Type: CaptchaConfig structure

Specifies how WAF should handle CAPTCHA evaluations for rules that don't have their own CaptchaConfig settings. If you don't specify this, WAF uses its default settings for CaptchaConfig.

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

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 the WebACL 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 manage. 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 gov.au or co.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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFDuplicateItemException:

WAF couldn’t perform the operation because the resource that you tried to save is a duplicate of an existing one.

WAFOptimisticLockException:

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.

WAFLimitsExceededException:

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.

WAFInvalidResourceException:

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.

WAFNonexistentItemException:

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.

WAFTagOperationException:

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.

WAFInvalidOperationException:

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 a SizeConstraintStatement that blocks the body content from being too large. Rules that inspect the headers or cookies must provide an OversizeHandling 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.

DeleteAPIKey

$result = $client->deleteAPIKey([/* ... */]);
$promise = $client->deleteAPIKeyAsync([/* ... */]);

Deletes the specified API key.

After you delete a key, it can take up to 24 hours for WAF to disallow use of the key in all regions.

Parameter Syntax

$result = $client->deleteAPIKey([
    'APIKey' => '<string>', // REQUIRED
    'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED
]);

Parameter Details

Members
APIKey
Required: Yes
Type: string

The encrypted API key that you want to delete.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFNonexistentItemException:

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.

WAFOptimisticLockException:

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.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

The operation isn't valid.

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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

Result Syntax

[
    'NextWebACLLockToken' => '<string>',
]

Result Details

Members
NextWebACLLockToken
Type: string

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFOptimisticLockException:

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.

WAFInvalidOperationException:

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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFOptimisticLockException:

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.

WAFAssociatedItemException:

WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.

WAFTagOperationException:

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.

WAFInvalidOperationException:

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([
    'LogScope' => 'CUSTOMER|SECURITY_LAKE',
    'LogType' => 'WAF_LOGS',
    'ResourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
LogScope
Type: string

The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

Default: CUSTOMER

LogType
Type: string

Used to distinguish between various logging options. Currently, there is one option.

Default: WAF_LOGS

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

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFNonexistentItemException:

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.

WAFOptimisticLockException:

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.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the rule group from which you want to delete the policy.

You must be the owner of the rule group to perform this operation.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

WAFNonexistentItemException:

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.

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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 a DefaultAction 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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFOptimisticLockException:

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.

WAFAssociatedItemException:

WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.

WAFTagOperationException:

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.

WAFInvalidOperationException:

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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFOptimisticLockException:

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.

WAFAssociatedItemException:

WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.

WAFTagOperationException:

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.

WAFInvalidOperationException:

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:

  • 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 in the Amazon CloudFront API Reference.

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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFOptimisticLockException:

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.

WAFAssociatedItemException:

WAF couldn’t perform the operation because your resource is being used by another resource or it’s associated with another resource.

WAFTagOperationException:

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.

WAFInvalidOperationException:

The operation isn't valid.

DescribeAllManagedProducts

$result = $client->describeAllManagedProducts([/* ... */]);
$promise = $client->describeAllManagedProductsAsync([/* ... */]);

Provides high-level information for the Amazon Web Services Managed Rules rule groups and Amazon Web Services Marketplace managed rule groups.

Parameter Syntax

$result = $client->describeAllManagedProducts([
    'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED
]);

Parameter Details

Members
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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

[
    'ManagedProducts' => [
        [
            'IsAdvancedManagedRuleSet' => true || false,
            'IsVersioningSupported' => true || false,
            'ManagedRuleSetName' => '<string>',
            'ProductDescription' => '<string>',
            'ProductId' => '<string>',
            'ProductLink' => '<string>',
            'ProductTitle' => '<string>',
            'SnsTopicArn' => '<string>',
            'VendorName' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
ManagedProducts
Type: Array of ManagedProductDescriptor structures

High-level information for the Amazon Web Services Managed Rules rule groups and Amazon Web Services Marketplace managed rule groups.

Errors

WAFInvalidOperationException:

The operation isn't valid.

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

DescribeManagedProductsByVendor

$result = $client->describeManagedProductsByVendor([/* ... */]);
$promise = $client->describeManagedProductsByVendorAsync([/* ... */]);

Provides high-level information for the managed rule groups owned by a specific vendor.

Parameter Syntax

$result = $client->describeManagedProductsByVendor([
    'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED
    'VendorName' => '<string>', // REQUIRED
]);

Parameter Details

Members
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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 a rule group.

Result Syntax

[
    'ManagedProducts' => [
        [
            'IsAdvancedManagedRuleSet' => true || false,
            'IsVersioningSupported' => true || false,
            'ManagedRuleSetName' => '<string>',
            'ProductDescription' => '<string>',
            'ProductId' => '<string>',
            'ProductLink' => '<string>',
            'ProductTitle' => '<string>',
            'SnsTopicArn' => '<string>',
            'VendorName' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
ManagedProducts
Type: Array of ManagedProductDescriptor structures

High-level information for the managed rule groups owned by the specified vendor.

Errors

WAFInvalidOperationException:

The operation isn't valid.

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 a 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 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. For more information, see WAF web ACL capacity units (WCU) in the WAF Developer Guide.

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 provide notification of 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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidResourceException:

WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 in the Amazon CloudFront API Reference.

Required permissions for customer-managed IAM policies

This call requires permissions that are specific to the protected resource type. For details, see Permissions for DisassociateWebACL in the WAF Developer Guide.

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:partition:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id

  • For an Amazon API Gateway REST API: arn:partition:apigateway:region::/restapis/api-id/stages/stage-name

  • For an AppSync GraphQL API: arn:partition:appsync:region:account-id:apis/GraphQLApiId

  • For an Amazon Cognito user pool: arn:partition:cognito-idp:region:account-id:userpool/user-pool-id

  • For an App Runner service: arn:partition:apprunner:region:account-id:service/apprunner-service-name/apprunner-service-id

  • For an Amazon Web Services Verified Access instance: arn:partition:ec2:region:account-id:verified-access-instance/instance-id

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

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
Platform
Required: Yes
Type: string

The device platform.

ReleaseVersion
Required: Yes
Type: string

The release version. For the latest available version, specify LATEST.

Result Syntax

[
    'Url' => '<string>',
]

Result Details

Members
Url
Type: string

The presigned download URL for the specified SDK release.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFNonexistentItemException:

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.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

The operation isn't valid.

GetDecryptedAPIKey

$result = $client->getDecryptedAPIKey([/* ... */]);
$promise = $client->getDecryptedAPIKeyAsync([/* ... */]);

Returns your API key in decrypted form. Use this to check the token domains that you have defined for the key.

API keys are required for the integration of the CAPTCHA API in your JavaScript client applications. The API lets you customize the placement and characteristics of the CAPTCHA puzzle for your end users. For more information about the CAPTCHA JavaScript integration, see WAF client application integration in the WAF Developer Guide.

Parameter Syntax

$result = $client->getDecryptedAPIKey([
    'APIKey' => '<string>', // REQUIRED
    'Scope' => 'CLOUDFRONT|REGIONAL', // REQUIRED
]);

Parameter Details

Members
APIKey
Required: Yes
Type: string

The encrypted API key.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

[
    'CreationTimestamp' => <DateTime>,
    'TokenDomains' => ['<string>', ...],
]

Result Details

Members
CreationTimestamp
Type: timestamp (string|DateTime or anything parsable by strtotime)

The date and time that the key was created.

TokenDomains
Type: Array of strings

The token domains that are defined in this API key.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFNonexistentItemException:

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.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

The operation isn't valid.

WAFInvalidResourceException:

WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

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([
    'LogScope' => 'CUSTOMER|SECURITY_LAKE',
    'LogType' => 'WAF_LOGS',
    'ResourceArn' => '<string>', // REQUIRED
]);

Parameter Details

Members
LogScope
Type: string

The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

Default: CUSTOMER

LogType
Type: string

Used to distinguish between various logging options. Currently, there is one option.

Default: WAF_LOGS

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>', ...],
        'LogScope' => 'CUSTOMER|SECURITY_LAKE',
        'LogType' => 'WAF_LOGS',
        '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',
                ],
                'HeaderOrder' => [
                    'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                ],
                'Headers' => [
                    'MatchPattern' => [
                        'All' => [
                        ],
                        'ExcludedHeaders' => ['<string>', ...],
                        'IncludedHeaders' => ['<string>', ...],
                    ],
                    'MatchScope' => 'ALL|KEY|VALUE',
                    'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                ],
                'JA3Fingerprint' => [
                    'FallbackBehavior' => '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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFNonexistentItemException:

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.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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 like get and update.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

ManagedRuleSet
Type: ManagedRuleSet structure

The managed rule set that you requested.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

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
Platform
Required: Yes
Type: string

The device platform.

ReleaseVersion
Required: Yes
Type: string

The release version. For the latest available version, specify LATEST.

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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFNonexistentItemException:

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.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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
ResourceArn
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the rule group for which you want to get the policy.

Result Syntax

[
    'Policy' => '<string>',
]

Result Details

Members
Policy
Type: string

The IAM policy that is attached to the specified rule group.

Errors

WAFNonexistentItemException:

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.

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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 a DefaultAction 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 IP addresses that are currently blocked by a rate-based rule instance. This is only available for rate-based rules that aggregate solely on the IP address or on the forwarded IP address.

The maximum number of addresses 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

The keys that are of Internet Protocol version 4 (IPv4).

ManagedKeysIPV6

The keys that are of Internet Protocol version 6 (IPv6).

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

The operation isn't valid.

WAFUnsupportedAggregateKeyTypeException:

The rule that you've named doesn't aggregate solely on the IP address or solely on the forwarded IP address. This call is only available for rate-based rules with an AggregateKeyType setting of IP or FORWARDED_IP.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

RegexPatternSet
Type: RegexPatternSet structure

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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' => [
                            [
                                'AWSManagedRulesACFPRuleSet' => [
                                    'CreationPath' => '<string>',
                                    'EnableRegexInPath' => true || false,
                                    'RegistrationPagePath' => '<string>',
                                    'RequestInspection' => [
                                        'AddressFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'EmailField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'PhoneNumberFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesATPRuleSet' => [
                                    'EnableRegexInPath' => true || false,
                                    'LoginPath' => '<string>',
                                    'RequestInspection' => [
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesBotControlRuleSet' => [
                                    'EnableMachineLearning' => true || false,
                                    '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|CUSTOM_KEYS|CONSTANT',
                        'CustomKeys' => [
                            [
                                'Cookie' => [
                                    'Name' => '<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',
                                        ],
                                        // ...
                                    ],
                                ],
                                'ForwardedIP' => [
                                ],
                                'HTTPMethod' => [
                                ],
                                'Header' => [
                                    'Name' => '<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',
                                        ],
                                        // ...
                                    ],
                                ],
                                'IP' => [
                                ],
                                'LabelNamespace' => [
                                    'Namespace' => '<string>',
                                ],
                                'QueryArgument' => [
                                    'Name' => '<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',
                                        ],
                                        // ...
                                    ],
                                ],
                                'QueryString' => [
                                    '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',
                                        ],
                                        // ...
                                    ],
                                ],
                                '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',
                                        ],
                                        // ...
                                    ],
                                ],
                            ],
                            // ...
                        ],
                        'EvaluationWindowSec' => <integer>,
                        '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

RuleGroup
Type: RuleGroup structure

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

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 or RuleGroup 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 of MaxItems requests. If PopulationSize is less than MaxItems, 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 the GetSampledRequests 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

WAFNonexistentItemException:

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.

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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 a DefaultAction 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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>',
        'AssociationConfig' => [
            'RequestBody' => [
                '<AssociatedResourceType>' => [
                    'DefaultSizeInspectionLimit' => 'KB_16|KB_32|KB_48|KB_64',
                ],
                // ...
            ],
        ],
        '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' => [
                            [
                                'AWSManagedRulesACFPRuleSet' => [
                                    'CreationPath' => '<string>',
                                    'EnableRegexInPath' => true || false,
                                    'RegistrationPagePath' => '<string>',
                                    'RequestInspection' => [
                                        'AddressFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'EmailField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'PhoneNumberFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesATPRuleSet' => [
                                    'EnableRegexInPath' => true || false,
                                    'LoginPath' => '<string>',
                                    'RequestInspection' => [
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesBotControlRuleSet' => [
                                    'EnableMachineLearning' => true || false,
                                    '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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|CUSTOM_KEYS|CONSTANT',
                                'CustomKeys' => [
                                    [
                                        'Cookie' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'ForwardedIP' => [
                                        ],
                                        'HTTPMethod' => [
                                        ],
                                        'Header' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'IP' => [
                                        ],
                                        'LabelNamespace' => [
                                            'Namespace' => '<string>',
                                        ],
                                        'QueryArgument' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'QueryString' => [
                                            '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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        '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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                    ],
                                    // ...
                                ],
                                'EvaluationWindowSec' => <integer>,
                                '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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' => [
                            [
                                'AWSManagedRulesACFPRuleSet' => [
                                    'CreationPath' => '<string>',
                                    'EnableRegexInPath' => true || false,
                                    'RegistrationPagePath' => '<string>',
                                    'RequestInspection' => [
                                        'AddressFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'EmailField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'PhoneNumberFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesATPRuleSet' => [
                                    'EnableRegexInPath' => true || false,
                                    'LoginPath' => '<string>',
                                    'RequestInspection' => [
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesBotControlRuleSet' => [
                                    'EnableMachineLearning' => true || false,
                                    '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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|CUSTOM_KEYS|CONSTANT',
                                'CustomKeys' => [
                                    [
                                        'Cookie' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'ForwardedIP' => [
                                        ],
                                        'HTTPMethod' => [
                                        ],
                                        'Header' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'IP' => [
                                        ],
                                        'LabelNamespace' => [
                                            'Namespace' => '<string>',
                                        ],
                                        'QueryArgument' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'QueryString' => [
                                            '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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        '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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                    ],
                                    // ...
                                ],
                                'EvaluationWindowSec' => <integer>,
                                '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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' => [
                            [
                                'AWSManagedRulesACFPRuleSet' => [
                                    'CreationPath' => '<string>',
                                    'EnableRegexInPath' => true || false,
                                    'RegistrationPagePath' => '<string>',
                                    'RequestInspection' => [
                                        'AddressFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'EmailField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'PhoneNumberFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesATPRuleSet' => [
                                    'EnableRegexInPath' => true || false,
                                    'LoginPath' => '<string>',
                                    'RequestInspection' => [
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesBotControlRuleSet' => [
                                    'EnableMachineLearning' => true || false,
                                    '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|CUSTOM_KEYS|CONSTANT',
                        'CustomKeys' => [
                            [
                                'Cookie' => [
                                    'Name' => '<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',
                                        ],
                                        // ...
                                    ],
                                ],
                                'ForwardedIP' => [
                                ],
                                'HTTPMethod' => [
                                ],
                                'Header' => [
                                    'Name' => '<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',
                                        ],
                                        // ...
                                    ],
                                ],
                                'IP' => [
                                ],
                                'LabelNamespace' => [
                                    'Namespace' => '<string>',
                                ],
                                'QueryArgument' => [
                                    'Name' => '<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',
                                        ],
                                        // ...
                                    ],
                                ],
                                'QueryString' => [
                                    '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',
                                        ],
                                        // ...
                                    ],
                                ],
                                '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',
                                        ],
                                        // ...
                                    ],
                                ],
                            ],
                            // ...
                        ],
                        'EvaluationWindowSec' => <integer>,
                        '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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 and the account creation fraud prevention managed rule group AWSManagedRulesACFPRuleSet. 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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

The operation isn't valid.

GetWebACLForResource

$result = $client->getWebACLForResource([/* ... */]);
$promise = $client->getWebACLForResourceAsync([/* ... */]);

Retrieves the WebACL for the specified resource.

This call uses GetWebACL, to verify that your account has permission to access the retrieved web ACL. If you get an error that indicates that your account isn't authorized to perform wafv2:GetWebACL on the resource, that error won't be included in your CloudTrail event history.

For Amazon CloudFront, don't use this call. Instead, call the CloudFront action GetDistributionConfig. For information, see GetDistributionConfig in the Amazon CloudFront API Reference.

Required permissions for customer-managed IAM policies

This call requires permissions that are specific to the protected resource type. For details, see Permissions for GetWebACLForResource in the WAF Developer Guide.

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:partition:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id

  • For an Amazon API Gateway REST API: arn:partition:apigateway:region::/restapis/api-id/stages/stage-name

  • For an AppSync GraphQL API: arn:partition:appsync:region:account-id:apis/GraphQLApiId

  • For an Amazon Cognito user pool: arn:partition:cognito-idp:region:account-id:userpool/user-pool-id

  • For an App Runner service: arn:partition:apprunner:region:account-id:service/apprunner-service-name/apprunner-service-id

  • For an Amazon Web Services Verified Access instance: arn:partition:ec2:region:account-id:verified-access-instance/instance-id

Result Syntax

[
    'WebACL' => [
        'ARN' => '<string>',
        'AssociationConfig' => [
            'RequestBody' => [
                '<AssociatedResourceType>' => [
                    'DefaultSizeInspectionLimit' => 'KB_16|KB_32|KB_48|KB_64',
                ],
                // ...
            ],
        ],
        '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' => [
                            [
                                'AWSManagedRulesACFPRuleSet' => [
                                    'CreationPath' => '<string>',
                                    'EnableRegexInPath' => true || false,
                                    'RegistrationPagePath' => '<string>',
                                    'RequestInspection' => [
                                        'AddressFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'EmailField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'PhoneNumberFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesATPRuleSet' => [
                                    'EnableRegexInPath' => true || false,
                                    'LoginPath' => '<string>',
                                    'RequestInspection' => [
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesBotControlRuleSet' => [
                                    'EnableMachineLearning' => true || false,
                                    '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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|CUSTOM_KEYS|CONSTANT',
                                'CustomKeys' => [
                                    [
                                        'Cookie' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'ForwardedIP' => [
                                        ],
                                        'HTTPMethod' => [
                                        ],
                                        'Header' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'IP' => [
                                        ],
                                        'LabelNamespace' => [
                                            'Namespace' => '<string>',
                                        ],
                                        'QueryArgument' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'QueryString' => [
                                            '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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        '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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                    ],
                                    // ...
                                ],
                                'EvaluationWindowSec' => <integer>,
                                '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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' => [
                            [
                                'AWSManagedRulesACFPRuleSet' => [
                                    'CreationPath' => '<string>',
                                    'EnableRegexInPath' => true || false,
                                    'RegistrationPagePath' => '<string>',
                                    'RequestInspection' => [
                                        'AddressFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'EmailField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'PhoneNumberFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesATPRuleSet' => [
                                    'EnableRegexInPath' => true || false,
                                    'LoginPath' => '<string>',
                                    'RequestInspection' => [
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesBotControlRuleSet' => [
                                    'EnableMachineLearning' => true || false,
                                    '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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|CUSTOM_KEYS|CONSTANT',
                                'CustomKeys' => [
                                    [
                                        'Cookie' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'ForwardedIP' => [
                                        ],
                                        'HTTPMethod' => [
                                        ],
                                        'Header' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'IP' => [
                                        ],
                                        'LabelNamespace' => [
                                            'Namespace' => '<string>',
                                        ],
                                        'QueryArgument' => [
                                            'Name' => '<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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        'QueryString' => [
                                            '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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                        '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',
                                                ],
                                                // ...
                                            ],
                                        ],
                                    ],
                                    // ...
                                ],
                                'EvaluationWindowSec' => <integer>,
                                '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                                    ],
                                    'HeaderOrder' => [
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'Headers' => [
                                        'MatchPattern' => [
                                            'All' => [
                                            ],
                                            'ExcludedHeaders' => ['<string>', ...],
                                            'IncludedHeaders' => ['<string>', ...],
                                        ],
                                        'MatchScope' => 'ALL|KEY|VALUE',
                                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                                    ],
                                    'JA3Fingerprint' => [
                                        'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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' => [
                            [
                                'AWSManagedRulesACFPRuleSet' => [
                                    'CreationPath' => '<string>',
                                    'EnableRegexInPath' => true || false,
                                    'RegistrationPagePath' => '<string>',
                                    'RequestInspection' => [
                                        'AddressFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'EmailField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'PhoneNumberFields' => [
                                            [
                                                'Identifier' => '<string>',
                                            ],
                                            // ...
                                        ],
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesATPRuleSet' => [
                                    'EnableRegexInPath' => true || false,
                                    'LoginPath' => '<string>',
                                    'RequestInspection' => [
                                        'PasswordField' => [
                                            'Identifier' => '<string>',
                                        ],
                                        'PayloadType' => 'JSON|FORM_ENCODED',
                                        'UsernameField' => [
                                            'Identifier' => '<string>',
                                        ],
                                    ],
                                    'ResponseInspection' => [
                                        'BodyContains' => [
                                            'FailureStrings' => ['<string>', ...],
                                            'SuccessStrings' => ['<string>', ...],
                                        ],
                                        'Header' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Name' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'Json' => [
                                            'FailureValues' => ['<string>', ...],
                                            'Identifier' => '<string>',
                                            'SuccessValues' => ['<string>', ...],
                                        ],
                                        'StatusCode' => [
                                            'FailureCodes' => [<integer>, ...],
                                            'SuccessCodes' => [<integer>, ...],
                                        ],
                                    ],
                                ],
                                'AWSManagedRulesBotControlRuleSet' => [
                                    'EnableMachineLearning' => true || false,
                                    '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|CUSTOM_KEYS|CONSTANT',
                        'CustomKeys' => [
                            [
                                'Cookie' => [
                                    'Name' => '<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',
                                        ],
                                        // ...
                                    ],
                                ],
                                'ForwardedIP' => [
                                ],
                                'HTTPMethod' => [
                                ],
                                'Header' => [
                                    'Name' => '<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',
                                        ],
                                        // ...
                                    ],
                                ],
                                'IP' => [
                                ],
                                'LabelNamespace' => [
                                    'Namespace' => '<string>',
                                ],
                                'QueryArgument' => [
                                    'Name' => '<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',
                                        ],
                                        // ...
                                    ],
                                ],
                                'QueryString' => [
                                    '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',
                                        ],
                                        // ...
                                    ],
                                ],
                                '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',
                                        ],
                                        // ...
                                    ],
                                ],
                            ],
                            // ...
                        ],
                        'EvaluationWindowSec' => <integer>,
                        '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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',
                            ],
                            'HeaderOrder' => [
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'Headers' => [
                                'MatchPattern' => [
                                    'All' => [
                                    ],
                                    'ExcludedHeaders' => ['<string>', ...],
                                    'IncludedHeaders' => ['<string>', ...],
                                ],
                                'MatchScope' => 'ALL|KEY|VALUE',
                                'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                            ],
                            'JA3Fingerprint' => [
                                'FallbackBehavior' => '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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFNonexistentItemException:

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.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

The operation isn't valid.

ListAPIKeys

$result = $client->listAPIKeys([/* ... */]);
$promise = $client->listAPIKeysAsync([/* ... */]);

Retrieves a list of the API keys that you've defined for the specified scope.

API keys are required for the integration of the CAPTCHA API in your JavaScript client applications. The API lets you customize the placement and characteristics of the CAPTCHA puzzle for your end users. For more information about the CAPTCHA JavaScript integration, see WAF client application integration in the WAF Developer Guide.

Parameter Syntax

$result = $client->listAPIKeys([
    '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 a NextMarker 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

[
    'APIKeySummaries' => [
        [
            'APIKey' => '<string>',
            'CreationTimestamp' => <DateTime>,
            'TokenDomains' => ['<string>', ...],
            'Version' => <integer>,
        ],
        // ...
    ],
    'ApplicationIntegrationURL' => '<string>',
    'NextMarker' => '<string>',
]

Result Details

Members
APIKeySummaries
Type: Array of APIKeySummary structures

The array of key summaries. If you specified a Limit in your request, this might not be the full list.

ApplicationIntegrationURL
Type: string

The CAPTCHA application integration URL, for use in your JavaScript implementation.

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 a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

The operation isn't valid.

WAFInvalidResourceException:

WAF couldn’t perform the operation because the resource that you requested isn’t valid. Check the resource, and try again.

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 a NextMarker 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 a 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 a NextMarker 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. If you specified a Limit in your request, this might not be the full list.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFInvalidOperationException:

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 a NextMarker 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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

Array of managed rule groups that you can use. If you specified a Limit in your request, this might not be the full list.

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 a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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 a NextMarker 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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. If you specified a Limit in your request, this might not be the full list.

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 a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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>,
    'LogScope' => 'CUSTOMER|SECURITY_LAKE',
    '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.

LogScope
Type: string

The owner of the logging configuration, which must be set to CUSTOMER for the configurations that you manage.

The log scope SECURITY_LAKE indicates a configuration that is managed through Amazon Security Lake. You can use Security Lake to collect log and event data from various sources for normalization, analysis, and management. For information, see Collecting data from Amazon Web Services services in the Amazon Security Lake user guide.

Default: CUSTOMER

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 a NextMarker 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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>', ...],
            'LogScope' => 'CUSTOMER|SECURITY_LAKE',
            'LogType' => 'WAF_LOGS',
            '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',
                    ],
                    'HeaderOrder' => [
                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                    ],
                    'Headers' => [
                        'MatchPattern' => [
                            'All' => [
                            ],
                            'ExcludedHeaders' => ['<string>', ...],
                            'IncludedHeaders' => ['<string>', ...],
                        ],
                        'MatchScope' => 'ALL|KEY|VALUE',
                        'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                    ],
                    'JA3Fingerprint' => [
                        'FallbackBehavior' => '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

Array of logging configurations. If you specified a Limit in your request, this might not be the full list.

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 a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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 a NextMarker 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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. If you specified a Limit in your request, this might not be the full list.

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 a NextMarker value in the response. To retrieve the next batch of objects, provide the marker from the prior call in your next request.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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 a NextMarker 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 a NextMarker 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

The high level information for the available SDK releases. If you specified a Limit in your request, this might not be the full list.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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 a NextMarker 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 a NextMarker 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

Array of regex pattern sets. If you specified a Limit in your request, this might not be the full list.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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.

For Amazon CloudFront, don't use this call. Instead, use the CloudFront call ListDistributionsByWebACLId. For information, see ListDistributionsByWebACLId in the Amazon CloudFront API Reference.

Required permissions for customer-managed IAM policies

This call requires permissions that are specific to the protected resource type. For details, see Permissions for ListResourcesForWebACL in the WAF Developer Guide.

Parameter Syntax

$result = $client->listResourcesForWebACL([
    'ResourceType' => 'APPLICATION_LOAD_BALANCER|API_GATEWAY|APPSYNC|COGNITO_USER_POOL|APP_RUNNER_SERVICE|VERIFIED_ACCESS_INSTANCE',
    '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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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
ResourceArns
Type: Array of strings

The array of Amazon Resource Names (ARNs) of the associated resources.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFNonexistentItemException:

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.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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 a NextMarker 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 a NextMarker 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

Array of rule groups. If you specified a Limit in your request, this might not be the full list.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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 a NextMarker 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 a NextMarker 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. If you specified a Limit in your request, this might not be the full list.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFTagOperationException:

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.

WAFInvalidOperationException:

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 a NextMarker 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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 a NextMarker 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

Array of web ACLs. If you specified a Limit in your request, this might not be the full list.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

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:

  1. Retrieve it by calling GetLoggingConfiguration

  2. Update its settings as needed

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

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

  2. 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
        'LogScope' => 'CUSTOMER|SECURITY_LAKE',
        'LogType' => 'WAF_LOGS',
        '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
                ],
                'HeaderOrder' => [
                    '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
                ],
                'JA3Fingerprint' => [
                    'FallbackBehavior' => '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>', ...],
        'LogScope' => 'CUSTOMER|SECURITY_LAKE',
        'LogType' => 'WAF_LOGS',
        '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',
                ],
                'HeaderOrder' => [
                    'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                ],
                'Headers' => [
                    'MatchPattern' => [
                        'All' => [
                        ],
                        'ExcludedHeaders' => ['<string>', ...],
                        'IncludedHeaders' => ['<string>', ...],
                    ],
                    'MatchScope' => 'ALL|KEY|VALUE',
                    'OversizeHandling' => 'CONTINUE|MATCH|NO_MATCH',
                ],
                'JA3Fingerprint' => [
                    'FallbackBehavior' => '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

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFNonexistentItemException:

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.

WAFOptimisticLockException:

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 previous DeleteServiceLinkedRole request, which can lock the role for 15 minutes or more. If you recently made a call to DeleteServiceLinkedRole, wait at least 15 minutes and try the request again. If you receive this same exception again, you will have to wait additional time until the role is unlocked.

WAFInvalidParameterException:

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

WAFInvalidOperationException:

The operation isn't valid.

WAFLimitsExceededException:

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 like get and update.

LockToken
Required: Yes
Type: string

A token used for optimistic locking. WAF returns a token to your get and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFOptimisticLockException:

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.

WAFInvalidOperationException:

The operation isn't valid.

PutPermissionPolicy

$result = $client->putPermissionPolicy([/* ... */]);
$promise = $client->putPermissionPolicyAsync([/* ... */]);

Use this to share a rule group with other accounts.

This action attaches an IAM policy to the specified resource. 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.

If a rule group has been shared with your account, you can access it through the call GetRuleGroup, and you can reference it in CreateWebACL and UpdateWebACL. Rule groups that are shared with you don't appear in your WAF console rule groups listing.

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.

  • The policy must include specifications for Effect, Action, and Principal.

  • Effect must specify Allow.

  • Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups and may optionally specify wafv2: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

The results for this operation are always empty.

Errors

WAFNonexistentItemException:

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.

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

  • The policy must include specifications for Effect, Action, and Principal.

  • Effect must specify Allow.

  • Action must specify wafv2:CreateWebACL, wafv2:UpdateWebACL, and wafv2:PutFirewallManagerRuleGroups and may optionally specify wafv2: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

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFLimitsExceededException:

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.

WAFNonexistentItemException:

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.

WAFTagOperationException:

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.

WAFInvalidOperationException:

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
ResourceARN
Required: Yes
Type: string

The Amazon Resource Name (ARN) of the resource.

TagKeys
Required: Yes
Type: Array of strings

An array of keys identifying the tags to disassociate from the resource.

Result Syntax

[]

Result Details

The results for this operation are always empty.

Errors

WAFInternalErrorException:

Your request is valid, but WAF couldn’t perform the operation because of a system problem. Retry your request.

WAFInvalidParameterException:

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

WAFNonexistentItemException:

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.

WAFTagOperationException:

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.

WAFInvalidOperationException:

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:

  1. Retrieve it by calling GetIPSet

  2. Update its settings as needed

  3. Provide the complete IP set specification to this call

Temporary inconsistencies during updates

When you create or change a web ACL or other WAF resources, the changes take a small amount of time to propagate to all areas where the resources are stored. The propagation time can be from a few seconds to a number of minutes.

The following are examples of the temporary inconsistencies that you might notice during change propagation:

  • After you create a web ACL, if you try to associate it with a resource, you might get an exception indicating that the web ACL is unavailable.

  • After you add a rule group to a web ACL, the new rule group rules might be in effect in one area where the web ACL is used and not in another.

  • After you change a rule action setting, you might see the old action in some places and the new action in others.

  • After you add an IP address to an IP set that is in use in a blocking rule, the new address might be blocked in one area while still allowed in another.

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 that you want WAF to inspect for in incoming requests. 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:

  • For requests that originated from the IP address 192.0.2.44, specify 192.0.2.44/32.

  • For requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify 192.0.2.0/24.

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

  • For 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 and list requests, to mark the state of the entity at the time of the request. To make changes to the entity associated with the token, you provide the token to operations like update and delete. WAF uses the token to ensure that no changes have been made to the entity since you last retrieved it. If a change has been made, the update fails with a WAFOptimisticLockException. If this happens, perform another get, and use the new token returned by that operation.

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, an Amazon Cognito user pool, an App Runner service, or an Amazon Web Services Verified Access instance.

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: