diff --git a/clients/client-waf-regional/.gitignore b/clients/client-waf-regional/.gitignore new file mode 100644 index 000000000000..b41c05b597c4 --- /dev/null +++ b/clients/client-waf-regional/.gitignore @@ -0,0 +1,14 @@ +/node_modules/ +/build/ +/coverage/ +/docs/ +/types/ +/dist/ +*.tsbuildinfo +*.tgz +*.log +package-lock.json + +*.d.ts +*.js +*.js.map diff --git a/clients/client-waf-regional/.npmignore b/clients/client-waf-regional/.npmignore new file mode 100644 index 000000000000..b7ff81137c4a --- /dev/null +++ b/clients/client-waf-regional/.npmignore @@ -0,0 +1,4 @@ +/coverage/ +/docs/ +tsconfig.test.json +*.tsbuildinfo diff --git a/clients/client-waf-regional/LICENSE b/clients/client-waf-regional/LICENSE new file mode 100644 index 000000000000..b7d2463d8cc0 --- /dev/null +++ b/clients/client-waf-regional/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/clients/client-waf-regional/README.md b/clients/client-waf-regional/README.md new file mode 100644 index 000000000000..103ce0110394 --- /dev/null +++ b/clients/client-waf-regional/README.md @@ -0,0 +1,6 @@ +@aws-sdk/client-waf-regional + +[![NPM version](https://img.shields.io/npm/v/@aws-sdk/client-waf-regional/preview.svg)](https://www.npmjs.com/package/@aws-sdk/client-waf-regional) +[![NPM downloads](https://img.shields.io/npm/dm/@aws-sdk/client-waf-regional.svg)](https://www.npmjs.com/package/@aws-sdk/client-waf-regional) + +For SDK usage, please step to [SDK reademe](https://github.com/aws/aws-sdk-js-v3). diff --git a/clients/client-waf-regional/WAFRegional.ts b/clients/client-waf-regional/WAFRegional.ts new file mode 100644 index 000000000000..3140537097ec --- /dev/null +++ b/clients/client-waf-regional/WAFRegional.ts @@ -0,0 +1,4468 @@ +import { WAFRegionalClient } from "./WAFRegionalClient"; +import { + AssociateWebACLCommand, + AssociateWebACLCommandInput, + AssociateWebACLCommandOutput +} from "./commands/AssociateWebACLCommand"; +import { + CreateByteMatchSetCommand, + CreateByteMatchSetCommandInput, + CreateByteMatchSetCommandOutput +} from "./commands/CreateByteMatchSetCommand"; +import { + CreateGeoMatchSetCommand, + CreateGeoMatchSetCommandInput, + CreateGeoMatchSetCommandOutput +} from "./commands/CreateGeoMatchSetCommand"; +import { + CreateIPSetCommand, + CreateIPSetCommandInput, + CreateIPSetCommandOutput +} from "./commands/CreateIPSetCommand"; +import { + CreateRateBasedRuleCommand, + CreateRateBasedRuleCommandInput, + CreateRateBasedRuleCommandOutput +} from "./commands/CreateRateBasedRuleCommand"; +import { + CreateRegexMatchSetCommand, + CreateRegexMatchSetCommandInput, + CreateRegexMatchSetCommandOutput +} from "./commands/CreateRegexMatchSetCommand"; +import { + CreateRegexPatternSetCommand, + CreateRegexPatternSetCommandInput, + CreateRegexPatternSetCommandOutput +} from "./commands/CreateRegexPatternSetCommand"; +import { + CreateRuleCommand, + CreateRuleCommandInput, + CreateRuleCommandOutput +} from "./commands/CreateRuleCommand"; +import { + CreateRuleGroupCommand, + CreateRuleGroupCommandInput, + CreateRuleGroupCommandOutput +} from "./commands/CreateRuleGroupCommand"; +import { + CreateSizeConstraintSetCommand, + CreateSizeConstraintSetCommandInput, + CreateSizeConstraintSetCommandOutput +} from "./commands/CreateSizeConstraintSetCommand"; +import { + CreateSqlInjectionMatchSetCommand, + CreateSqlInjectionMatchSetCommandInput, + CreateSqlInjectionMatchSetCommandOutput +} from "./commands/CreateSqlInjectionMatchSetCommand"; +import { + CreateWebACLCommand, + CreateWebACLCommandInput, + CreateWebACLCommandOutput +} from "./commands/CreateWebACLCommand"; +import { + CreateXssMatchSetCommand, + CreateXssMatchSetCommandInput, + CreateXssMatchSetCommandOutput +} from "./commands/CreateXssMatchSetCommand"; +import { + DeleteByteMatchSetCommand, + DeleteByteMatchSetCommandInput, + DeleteByteMatchSetCommandOutput +} from "./commands/DeleteByteMatchSetCommand"; +import { + DeleteGeoMatchSetCommand, + DeleteGeoMatchSetCommandInput, + DeleteGeoMatchSetCommandOutput +} from "./commands/DeleteGeoMatchSetCommand"; +import { + DeleteIPSetCommand, + DeleteIPSetCommandInput, + DeleteIPSetCommandOutput +} from "./commands/DeleteIPSetCommand"; +import { + DeleteLoggingConfigurationCommand, + DeleteLoggingConfigurationCommandInput, + DeleteLoggingConfigurationCommandOutput +} from "./commands/DeleteLoggingConfigurationCommand"; +import { + DeletePermissionPolicyCommand, + DeletePermissionPolicyCommandInput, + DeletePermissionPolicyCommandOutput +} from "./commands/DeletePermissionPolicyCommand"; +import { + DeleteRateBasedRuleCommand, + DeleteRateBasedRuleCommandInput, + DeleteRateBasedRuleCommandOutput +} from "./commands/DeleteRateBasedRuleCommand"; +import { + DeleteRegexMatchSetCommand, + DeleteRegexMatchSetCommandInput, + DeleteRegexMatchSetCommandOutput +} from "./commands/DeleteRegexMatchSetCommand"; +import { + DeleteRegexPatternSetCommand, + DeleteRegexPatternSetCommandInput, + DeleteRegexPatternSetCommandOutput +} from "./commands/DeleteRegexPatternSetCommand"; +import { + DeleteRuleCommand, + DeleteRuleCommandInput, + DeleteRuleCommandOutput +} from "./commands/DeleteRuleCommand"; +import { + DeleteRuleGroupCommand, + DeleteRuleGroupCommandInput, + DeleteRuleGroupCommandOutput +} from "./commands/DeleteRuleGroupCommand"; +import { + DeleteSizeConstraintSetCommand, + DeleteSizeConstraintSetCommandInput, + DeleteSizeConstraintSetCommandOutput +} from "./commands/DeleteSizeConstraintSetCommand"; +import { + DeleteSqlInjectionMatchSetCommand, + DeleteSqlInjectionMatchSetCommandInput, + DeleteSqlInjectionMatchSetCommandOutput +} from "./commands/DeleteSqlInjectionMatchSetCommand"; +import { + DeleteWebACLCommand, + DeleteWebACLCommandInput, + DeleteWebACLCommandOutput +} from "./commands/DeleteWebACLCommand"; +import { + DeleteXssMatchSetCommand, + DeleteXssMatchSetCommandInput, + DeleteXssMatchSetCommandOutput +} from "./commands/DeleteXssMatchSetCommand"; +import { + DisassociateWebACLCommand, + DisassociateWebACLCommandInput, + DisassociateWebACLCommandOutput +} from "./commands/DisassociateWebACLCommand"; +import { + GetByteMatchSetCommand, + GetByteMatchSetCommandInput, + GetByteMatchSetCommandOutput +} from "./commands/GetByteMatchSetCommand"; +import { + GetChangeTokenCommand, + GetChangeTokenCommandInput, + GetChangeTokenCommandOutput +} from "./commands/GetChangeTokenCommand"; +import { + GetChangeTokenStatusCommand, + GetChangeTokenStatusCommandInput, + GetChangeTokenStatusCommandOutput +} from "./commands/GetChangeTokenStatusCommand"; +import { + GetGeoMatchSetCommand, + GetGeoMatchSetCommandInput, + GetGeoMatchSetCommandOutput +} from "./commands/GetGeoMatchSetCommand"; +import { + GetIPSetCommand, + GetIPSetCommandInput, + GetIPSetCommandOutput +} from "./commands/GetIPSetCommand"; +import { + GetLoggingConfigurationCommand, + GetLoggingConfigurationCommandInput, + GetLoggingConfigurationCommandOutput +} from "./commands/GetLoggingConfigurationCommand"; +import { + GetPermissionPolicyCommand, + GetPermissionPolicyCommandInput, + GetPermissionPolicyCommandOutput +} from "./commands/GetPermissionPolicyCommand"; +import { + GetRateBasedRuleCommand, + GetRateBasedRuleCommandInput, + GetRateBasedRuleCommandOutput +} from "./commands/GetRateBasedRuleCommand"; +import { + GetRateBasedRuleManagedKeysCommand, + GetRateBasedRuleManagedKeysCommandInput, + GetRateBasedRuleManagedKeysCommandOutput +} from "./commands/GetRateBasedRuleManagedKeysCommand"; +import { + GetRegexMatchSetCommand, + GetRegexMatchSetCommandInput, + GetRegexMatchSetCommandOutput +} from "./commands/GetRegexMatchSetCommand"; +import { + GetRegexPatternSetCommand, + GetRegexPatternSetCommandInput, + GetRegexPatternSetCommandOutput +} from "./commands/GetRegexPatternSetCommand"; +import { + GetRuleCommand, + GetRuleCommandInput, + GetRuleCommandOutput +} from "./commands/GetRuleCommand"; +import { + GetRuleGroupCommand, + GetRuleGroupCommandInput, + GetRuleGroupCommandOutput +} from "./commands/GetRuleGroupCommand"; +import { + GetSampledRequestsCommand, + GetSampledRequestsCommandInput, + GetSampledRequestsCommandOutput +} from "./commands/GetSampledRequestsCommand"; +import { + GetSizeConstraintSetCommand, + GetSizeConstraintSetCommandInput, + GetSizeConstraintSetCommandOutput +} from "./commands/GetSizeConstraintSetCommand"; +import { + GetSqlInjectionMatchSetCommand, + GetSqlInjectionMatchSetCommandInput, + GetSqlInjectionMatchSetCommandOutput +} from "./commands/GetSqlInjectionMatchSetCommand"; +import { + GetWebACLCommand, + GetWebACLCommandInput, + GetWebACLCommandOutput +} from "./commands/GetWebACLCommand"; +import { + GetWebACLForResourceCommand, + GetWebACLForResourceCommandInput, + GetWebACLForResourceCommandOutput +} from "./commands/GetWebACLForResourceCommand"; +import { + GetXssMatchSetCommand, + GetXssMatchSetCommandInput, + GetXssMatchSetCommandOutput +} from "./commands/GetXssMatchSetCommand"; +import { + ListActivatedRulesInRuleGroupCommand, + ListActivatedRulesInRuleGroupCommandInput, + ListActivatedRulesInRuleGroupCommandOutput +} from "./commands/ListActivatedRulesInRuleGroupCommand"; +import { + ListByteMatchSetsCommand, + ListByteMatchSetsCommandInput, + ListByteMatchSetsCommandOutput +} from "./commands/ListByteMatchSetsCommand"; +import { + ListGeoMatchSetsCommand, + ListGeoMatchSetsCommandInput, + ListGeoMatchSetsCommandOutput +} from "./commands/ListGeoMatchSetsCommand"; +import { + ListIPSetsCommand, + ListIPSetsCommandInput, + ListIPSetsCommandOutput +} from "./commands/ListIPSetsCommand"; +import { + ListLoggingConfigurationsCommand, + ListLoggingConfigurationsCommandInput, + ListLoggingConfigurationsCommandOutput +} from "./commands/ListLoggingConfigurationsCommand"; +import { + ListRateBasedRulesCommand, + ListRateBasedRulesCommandInput, + ListRateBasedRulesCommandOutput +} from "./commands/ListRateBasedRulesCommand"; +import { + ListRegexMatchSetsCommand, + ListRegexMatchSetsCommandInput, + ListRegexMatchSetsCommandOutput +} from "./commands/ListRegexMatchSetsCommand"; +import { + ListRegexPatternSetsCommand, + ListRegexPatternSetsCommandInput, + ListRegexPatternSetsCommandOutput +} from "./commands/ListRegexPatternSetsCommand"; +import { + ListResourcesForWebACLCommand, + ListResourcesForWebACLCommandInput, + ListResourcesForWebACLCommandOutput +} from "./commands/ListResourcesForWebACLCommand"; +import { + ListRuleGroupsCommand, + ListRuleGroupsCommandInput, + ListRuleGroupsCommandOutput +} from "./commands/ListRuleGroupsCommand"; +import { + ListRulesCommand, + ListRulesCommandInput, + ListRulesCommandOutput +} from "./commands/ListRulesCommand"; +import { + ListSizeConstraintSetsCommand, + ListSizeConstraintSetsCommandInput, + ListSizeConstraintSetsCommandOutput +} from "./commands/ListSizeConstraintSetsCommand"; +import { + ListSqlInjectionMatchSetsCommand, + ListSqlInjectionMatchSetsCommandInput, + ListSqlInjectionMatchSetsCommandOutput +} from "./commands/ListSqlInjectionMatchSetsCommand"; +import { + ListSubscribedRuleGroupsCommand, + ListSubscribedRuleGroupsCommandInput, + ListSubscribedRuleGroupsCommandOutput +} from "./commands/ListSubscribedRuleGroupsCommand"; +import { + ListTagsForResourceCommand, + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput +} from "./commands/ListTagsForResourceCommand"; +import { + ListWebACLsCommand, + ListWebACLsCommandInput, + ListWebACLsCommandOutput +} from "./commands/ListWebACLsCommand"; +import { + ListXssMatchSetsCommand, + ListXssMatchSetsCommandInput, + ListXssMatchSetsCommandOutput +} from "./commands/ListXssMatchSetsCommand"; +import { + PutLoggingConfigurationCommand, + PutLoggingConfigurationCommandInput, + PutLoggingConfigurationCommandOutput +} from "./commands/PutLoggingConfigurationCommand"; +import { + PutPermissionPolicyCommand, + PutPermissionPolicyCommandInput, + PutPermissionPolicyCommandOutput +} from "./commands/PutPermissionPolicyCommand"; +import { + TagResourceCommand, + TagResourceCommandInput, + TagResourceCommandOutput +} from "./commands/TagResourceCommand"; +import { + UntagResourceCommand, + UntagResourceCommandInput, + UntagResourceCommandOutput +} from "./commands/UntagResourceCommand"; +import { + UpdateByteMatchSetCommand, + UpdateByteMatchSetCommandInput, + UpdateByteMatchSetCommandOutput +} from "./commands/UpdateByteMatchSetCommand"; +import { + UpdateGeoMatchSetCommand, + UpdateGeoMatchSetCommandInput, + UpdateGeoMatchSetCommandOutput +} from "./commands/UpdateGeoMatchSetCommand"; +import { + UpdateIPSetCommand, + UpdateIPSetCommandInput, + UpdateIPSetCommandOutput +} from "./commands/UpdateIPSetCommand"; +import { + UpdateRateBasedRuleCommand, + UpdateRateBasedRuleCommandInput, + UpdateRateBasedRuleCommandOutput +} from "./commands/UpdateRateBasedRuleCommand"; +import { + UpdateRegexMatchSetCommand, + UpdateRegexMatchSetCommandInput, + UpdateRegexMatchSetCommandOutput +} from "./commands/UpdateRegexMatchSetCommand"; +import { + UpdateRegexPatternSetCommand, + UpdateRegexPatternSetCommandInput, + UpdateRegexPatternSetCommandOutput +} from "./commands/UpdateRegexPatternSetCommand"; +import { + UpdateRuleCommand, + UpdateRuleCommandInput, + UpdateRuleCommandOutput +} from "./commands/UpdateRuleCommand"; +import { + UpdateRuleGroupCommand, + UpdateRuleGroupCommandInput, + UpdateRuleGroupCommandOutput +} from "./commands/UpdateRuleGroupCommand"; +import { + UpdateSizeConstraintSetCommand, + UpdateSizeConstraintSetCommandInput, + UpdateSizeConstraintSetCommandOutput +} from "./commands/UpdateSizeConstraintSetCommand"; +import { + UpdateSqlInjectionMatchSetCommand, + UpdateSqlInjectionMatchSetCommandInput, + UpdateSqlInjectionMatchSetCommandOutput +} from "./commands/UpdateSqlInjectionMatchSetCommand"; +import { + UpdateWebACLCommand, + UpdateWebACLCommandInput, + UpdateWebACLCommandOutput +} from "./commands/UpdateWebACLCommand"; +import { + UpdateXssMatchSetCommand, + UpdateXssMatchSetCommandInput, + UpdateXssMatchSetCommandOutput +} from "./commands/UpdateXssMatchSetCommand"; +import { HttpHandlerOptions as __HttpHandlerOptions } from "@aws-sdk/types"; + +/** + * + *

This is the AWS WAF Regional API Reference for using AWS WAF with Elastic Load Balancing (ELB) Application Load Balancers. The AWS WAF actions and data types listed in the reference are available for protecting Application Load Balancers. You can use these actions and data types by means of the endpoints listed in AWS Regions and Endpoints. This guide is for developers who need detailed information about the AWS WAF API actions, data types, and errors. For detailed information about AWS WAF features and an overview of how to use the AWS WAF API, see the + * AWS WAF Developer Guide.

+ * + */ +export class WAFRegional extends WAFRegionalClient { + /** + * + *

Associates a web ACL with a resource, either an application load balancer or Amazon API Gateway stage.

+ * + */ + public associateWebACL( + args: AssociateWebACLCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public associateWebACL( + args: AssociateWebACLCommandInput, + cb: (err: any, data?: AssociateWebACLCommandOutput) => void + ): void; + public associateWebACL( + args: AssociateWebACLCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: AssociateWebACLCommandOutput) => void + ): void; + public associateWebACL( + args: AssociateWebACLCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: AssociateWebACLCommandOutput) => void), + cb?: (err: any, data?: AssociateWebACLCommandOutput) => void + ): Promise | void { + const command = new AssociateWebACLCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Removes a web ACL from the specified resource, either an application load balancer or Amazon API Gateway stage.

+ * + */ + public disassociateWebACL( + args: DisassociateWebACLCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public disassociateWebACL( + args: DisassociateWebACLCommandInput, + cb: (err: any, data?: DisassociateWebACLCommandOutput) => void + ): void; + public disassociateWebACL( + args: DisassociateWebACLCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DisassociateWebACLCommandOutput) => void + ): void; + public disassociateWebACL( + args: DisassociateWebACLCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DisassociateWebACLCommandOutput) => void), + cb?: (err: any, data?: DisassociateWebACLCommandOutput) => void + ): Promise | void { + const command = new DisassociateWebACLCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the web ACL for the specified resource, either an application load balancer or Amazon API Gateway stage.

+ * + */ + public getWebACLForResource( + args: GetWebACLForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getWebACLForResource( + args: GetWebACLForResourceCommandInput, + cb: (err: any, data?: GetWebACLForResourceCommandOutput) => void + ): void; + public getWebACLForResource( + args: GetWebACLForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetWebACLForResourceCommandOutput) => void + ): void; + public getWebACLForResource( + args: GetWebACLForResourceCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetWebACLForResourceCommandOutput) => void), + cb?: (err: any, data?: GetWebACLForResourceCommandOutput) => void + ): Promise | void { + const command = new GetWebACLForResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of resources associated with the specified web ACL.

+ * + */ + public listResourcesForWebACL( + args: ListResourcesForWebACLCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listResourcesForWebACL( + args: ListResourcesForWebACLCommandInput, + cb: (err: any, data?: ListResourcesForWebACLCommandOutput) => void + ): void; + public listResourcesForWebACL( + args: ListResourcesForWebACLCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListResourcesForWebACLCommandOutput) => void + ): void; + public listResourcesForWebACL( + args: ListResourcesForWebACLCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListResourcesForWebACLCommandOutput) => void), + cb?: (err: any, data?: ListResourcesForWebACLCommandOutput) => void + ): Promise | void { + const command = new ListResourcesForWebACLCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates a ByteMatchSet. You then use UpdateByteMatchSet to identify the part of a + * web request that you want AWS WAF to inspect, such as the values of the User-Agent header or the query string. + * For example, you can create a ByteMatchSet that matches any requests with User-Agent headers + * that contain the string BadBot. You can then configure AWS WAF to reject those requests.

+ *

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

+ *
    + *
  1. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateByteMatchSet request.

    + *
  2. + *
  3. + *

    Submit a CreateByteMatchSet request.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateByteMatchSet request.

    + *
  6. + *
  7. + *

    Submit an UpdateByteMatchSet request to specify the part of the request that you want AWS WAF to inspect + * (for example, the header or the URI) and the value that you want AWS WAF to watch for.

    + *
  8. + *
+ *

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

+ * + */ + public createByteMatchSet( + args: CreateByteMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createByteMatchSet( + args: CreateByteMatchSetCommandInput, + cb: (err: any, data?: CreateByteMatchSetCommandOutput) => void + ): void; + public createByteMatchSet( + args: CreateByteMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateByteMatchSetCommandOutput) => void + ): void; + public createByteMatchSet( + args: CreateByteMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateByteMatchSetCommandOutput) => void), + cb?: (err: any, data?: CreateByteMatchSetCommandOutput) => void + ): Promise | void { + const command = new CreateByteMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates an GeoMatchSet, which you use to specify which web requests you want to allow or block based on the country + * that the requests originate from. For example, if you're receiving a lot of requests from one or more countries and you want to block the requests, you can create an GeoMatchSet that contains those countries and then configure AWS WAF to block the requests.

+ *

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

+ *
    + *
  1. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateGeoMatchSet request.

    + *
  2. + *
  3. + *

    Submit a CreateGeoMatchSet request.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateGeoMatchSet request.

    + *
  6. + *
  7. + *

    Submit an UpdateGeoMatchSetSet request to specify the countries that you want AWS WAF to watch for.

    + *
  8. + *
+ *

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

+ * + */ + public createGeoMatchSet( + args: CreateGeoMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createGeoMatchSet( + args: CreateGeoMatchSetCommandInput, + cb: (err: any, data?: CreateGeoMatchSetCommandOutput) => void + ): void; + public createGeoMatchSet( + args: CreateGeoMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateGeoMatchSetCommandOutput) => void + ): void; + public createGeoMatchSet( + args: CreateGeoMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateGeoMatchSetCommandOutput) => void), + cb?: (err: any, data?: CreateGeoMatchSetCommandOutput) => void + ): Promise | void { + const command = new CreateGeoMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates an IPSet, which you use to specify which web requests + * that + * you want to allow or block based on the IP addresses that the requests + * originate from. For example, if you're receiving a lot of requests from one or more + * individual IP addresses or one or more ranges of IP addresses and you want to block the + * requests, you can create an IPSet that contains those IP addresses and then + * configure AWS WAF to block the requests.

+ *

To create and configure an IPSet, perform the following steps:

+ *
    + *
  1. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateIPSet request.

    + *
  2. + *
  3. + *

    Submit a CreateIPSet request.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateIPSet request.

    + *
  6. + *
  7. + *

    Submit an UpdateIPSet request to specify the IP addresses that you want AWS WAF to watch for.

    + *
  8. + *
+ *

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

+ * + */ + public createIPSet( + args: CreateIPSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createIPSet( + args: CreateIPSetCommandInput, + cb: (err: any, data?: CreateIPSetCommandOutput) => void + ): void; + public createIPSet( + args: CreateIPSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateIPSetCommandOutput) => void + ): void; + public createIPSet( + args: CreateIPSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateIPSetCommandOutput) => void), + cb?: (err: any, data?: CreateIPSetCommandOutput) => void + ): Promise | void { + const command = new CreateIPSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates a RateBasedRule. The RateBasedRule contains a + * RateLimit, which specifies the maximum number of requests that AWS WAF allows + * from a specified IP address in a five-minute period. The RateBasedRule also + * contains the IPSet objects, ByteMatchSet objects, and other + * predicates that identify the requests that you want to count or block if these requests + * exceed the RateLimit.

+ *

If you add more than one predicate to a RateBasedRule, a request not + * only must exceed the RateLimit, but it also must match all the + * specifications + * to be counted or blocked. For example, suppose you add the following to a + * RateBasedRule:

+ *
    + *
  • + *

    An IPSet that matches the IP address 192.0.2.44/32 + *

    + *
  • + *
  • + *

    A ByteMatchSet that matches BadBot in the + * User-Agent header

    + *
  • + *
+ *

Further, you specify a RateLimit of 15,000.

+ *

You then add the RateBasedRule to a WebACL and specify that + * you want to block requests that meet the conditions in the rule. For a request to be + * blocked, it must come from the IP address 192.0.2.44 and the + * User-Agent header in the request must contain the value + * BadBot. Further, requests that match these two conditions must be received at + * a rate of more than 15,000 requests every five minutes. If both conditions are met and the + * rate is exceeded, AWS WAF blocks the requests. If the rate drops below 15,000 for a + * five-minute period, AWS WAF no longer blocks the requests.

+ * + *

As a second example, suppose you want to limit requests to a particular page on your site. To do this, you could add the following to a + * RateBasedRule:

+ * + * + *
    + *
  • + *

    A ByteMatchSet with FieldToMatch of URI + *

    + *
  • + *
  • + *

    A PositionalConstraint of STARTS_WITH + *

    + *
  • + *
  • + *

    A TargetString of login + *

    + *
  • + *
+ *

Further, you specify a RateLimit of 15,000.

+ *

By adding this RateBasedRule to a WebACL, you could limit requests to your login page without affecting the rest of your site.

+ * + * + *

To create and configure a RateBasedRule, perform the following + * steps:

+ *
    + *
  1. + *

    Create and update the predicates that you want to include in the rule. For more + * information, see CreateByteMatchSet, CreateIPSet, + * and CreateSqlInjectionMatchSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide + * in the ChangeToken parameter of a CreateRule + * request.

    + *
  4. + *
  5. + *

    Submit a CreateRateBasedRule request.

    + *
  6. + *
  7. + *

    Use GetChangeToken to get the change token that you provide in the + * ChangeToken parameter of an UpdateRule + * request.

    + *
  8. + *
  9. + *

    Submit an UpdateRateBasedRule request to specify the predicates + * that you want to include in the rule.

    + *
  10. + *
  11. + *

    Create and update a WebACL that contains the + * RateBasedRule. For more information, see CreateWebACL.

    + *
  12. + *
+ *

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

+ * + */ + public createRateBasedRule( + args: CreateRateBasedRuleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createRateBasedRule( + args: CreateRateBasedRuleCommandInput, + cb: (err: any, data?: CreateRateBasedRuleCommandOutput) => void + ): void; + public createRateBasedRule( + args: CreateRateBasedRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateRateBasedRuleCommandOutput) => void + ): void; + public createRateBasedRule( + args: CreateRateBasedRuleCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateRateBasedRuleCommandOutput) => void), + cb?: (err: any, data?: CreateRateBasedRuleCommandOutput) => void + ): Promise | void { + const command = new CreateRateBasedRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates a RegexMatchSet. You then use UpdateRegexMatchSet to identify the part of a + * web request that you want AWS WAF to inspect, such as the values of the User-Agent header or the query string. + * For example, you can create a RegexMatchSet that contains a RegexMatchTuple that looks for any requests with User-Agent headers + * that match a RegexPatternSet with pattern B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests.

+ *

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

+ *
    + *
  1. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateRegexMatchSet request.

    + *
  2. + *
  3. + *

    Submit a CreateRegexMatchSet request.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateRegexMatchSet request.

    + *
  6. + *
  7. + *

    Submit an UpdateRegexMatchSet request to specify the part of the request that you want AWS WAF to inspect + * (for example, the header or the URI) and the value, using a RegexPatternSet, that you want AWS WAF to watch for.

    + *
  8. + *
+ *

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

+ * + */ + public createRegexMatchSet( + args: CreateRegexMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createRegexMatchSet( + args: CreateRegexMatchSetCommandInput, + cb: (err: any, data?: CreateRegexMatchSetCommandOutput) => void + ): void; + public createRegexMatchSet( + args: CreateRegexMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateRegexMatchSetCommandOutput) => void + ): void; + public createRegexMatchSet( + args: CreateRegexMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateRegexMatchSetCommandOutput) => void), + cb?: (err: any, data?: CreateRegexMatchSetCommandOutput) => void + ): Promise | void { + const command = new CreateRegexMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

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

+ *

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

+ *
    + *
  1. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateRegexPatternSet request.

    + *
  2. + *
  3. + *

    Submit a CreateRegexPatternSet request.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateRegexPatternSet request.

    + *
  6. + *
  7. + *

    Submit an UpdateRegexPatternSet request to specify the string that you want AWS WAF to watch for.

    + *
  8. + *
+ *

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

+ * + */ + public createRegexPatternSet( + args: CreateRegexPatternSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createRegexPatternSet( + args: CreateRegexPatternSetCommandInput, + cb: (err: any, data?: CreateRegexPatternSetCommandOutput) => void + ): void; + public createRegexPatternSet( + args: CreateRegexPatternSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateRegexPatternSetCommandOutput) => void + ): void; + public createRegexPatternSet( + args: CreateRegexPatternSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateRegexPatternSetCommandOutput) => void), + cb?: (err: any, data?: CreateRegexPatternSetCommandOutput) => void + ): Promise | void { + const command = new CreateRegexPatternSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates a Rule, which contains the IPSet objects, + * ByteMatchSet objects, and other predicates that identify the requests that + * you want to block. If you add more than one predicate to a Rule, a request + * must match all of the specifications to be allowed or blocked. For example, suppose + * that + * you add the following to a Rule:

+ *
    + *
  • + *

    An IPSet that matches the IP address 192.0.2.44/32 + *

    + *
  • + *
  • + *

    A ByteMatchSet that matches BadBot in the User-Agent header

    + *
  • + *
+ *

You then add the Rule to a WebACL and specify that you want to blocks requests that satisfy the Rule. + * For a request to be blocked, it must come from the IP address 192.0.2.44 and the User-Agent header in the request + * must contain the value BadBot.

+ *

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

+ *
    + *
  1. + *

    Create and update the predicates that you want to include in the Rule. For more information, see + * CreateByteMatchSet, CreateIPSet, and CreateSqlInjectionMatchSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateRule request.

    + *
  4. + *
  5. + *

    Submit a CreateRule request.

    + *
  6. + *
  7. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateRule request.

    + *
  8. + *
  9. + *

    Submit an UpdateRule request to specify the predicates that you want to include in the Rule.

    + *
  10. + *
  11. + *

    Create and update a WebACL that contains the Rule. For more information, see CreateWebACL.

    + *
  12. + *
+ *

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

+ * + */ + public createRule( + args: CreateRuleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createRule( + args: CreateRuleCommandInput, + cb: (err: any, data?: CreateRuleCommandOutput) => void + ): void; + public createRule( + args: CreateRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateRuleCommandOutput) => void + ): void; + public createRule( + args: CreateRuleCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateRuleCommandOutput) => void), + cb?: (err: any, data?: CreateRuleCommandOutput) => void + ): Promise | void { + const command = new CreateRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates a RuleGroup. A rule group is a collection of predefined rules that you add to a web ACL. You use UpdateRuleGroup to add rules to the rule group.

+ *

Rule groups are subject to the following limits:

+ *
    + *
  • + *

    Three rule groups per account. You can request an increase to this limit by contacting customer support.

    + *
  • + *
  • + *

    One rule group per web ACL.

    + *
  • + *
  • + *

    Ten rules per rule group.

    + *
  • + *
+ *

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

+ * + */ + public createRuleGroup( + args: CreateRuleGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createRuleGroup( + args: CreateRuleGroupCommandInput, + cb: (err: any, data?: CreateRuleGroupCommandOutput) => void + ): void; + public createRuleGroup( + args: CreateRuleGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateRuleGroupCommandOutput) => void + ): void; + public createRuleGroup( + args: CreateRuleGroupCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateRuleGroupCommandOutput) => void), + cb?: (err: any, data?: CreateRuleGroupCommandOutput) => void + ): Promise | void { + const command = new CreateRuleGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates a SizeConstraintSet. You then use UpdateSizeConstraintSet to identify the part of a + * web request that you want AWS WAF to check for length, such as the length of the User-Agent header or the length of the query string. + * For example, you can create a SizeConstraintSet that matches any requests that have a query string that is longer than 100 bytes. + * You can then configure AWS WAF to reject those requests.

+ *

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

+ *
    + *
  1. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateSizeConstraintSet request.

    + *
  2. + *
  3. + *

    Submit a CreateSizeConstraintSet request.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateSizeConstraintSet request.

    + *
  6. + *
  7. + *

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect + * (for example, the header or the URI) and the value that you want AWS WAF to watch for.

    + *
  8. + *
+ *

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

+ * + */ + public createSizeConstraintSet( + args: CreateSizeConstraintSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createSizeConstraintSet( + args: CreateSizeConstraintSetCommandInput, + cb: (err: any, data?: CreateSizeConstraintSetCommandOutput) => void + ): void; + public createSizeConstraintSet( + args: CreateSizeConstraintSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateSizeConstraintSetCommandOutput) => void + ): void; + public createSizeConstraintSet( + args: CreateSizeConstraintSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateSizeConstraintSetCommandOutput) => void), + cb?: (err: any, data?: CreateSizeConstraintSetCommandOutput) => void + ): Promise | void { + const command = new CreateSizeConstraintSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates a SqlInjectionMatchSet, which you use to allow, block, or count requests that contain snippets of SQL code in a + * specified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

+ *

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

+ *
    + *
  1. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateSqlInjectionMatchSet request.

    + *
  2. + *
  3. + *

    Submit a CreateSqlInjectionMatchSet request.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateSqlInjectionMatchSet request.

    + *
  6. + *
  7. + *

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests in which you want to + * allow, block, or count malicious SQL code.

    + *
  8. + *
+ *

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

+ * + */ + public createSqlInjectionMatchSet( + args: CreateSqlInjectionMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createSqlInjectionMatchSet( + args: CreateSqlInjectionMatchSetCommandInput, + cb: (err: any, data?: CreateSqlInjectionMatchSetCommandOutput) => void + ): void; + public createSqlInjectionMatchSet( + args: CreateSqlInjectionMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateSqlInjectionMatchSetCommandOutput) => void + ): void; + public createSqlInjectionMatchSet( + args: CreateSqlInjectionMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateSqlInjectionMatchSetCommandOutput) => void), + cb?: (err: any, data?: CreateSqlInjectionMatchSetCommandOutput) => void + ): Promise | void { + const command = new CreateSqlInjectionMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates a WebACL, which contains the Rules that identify the CloudFront web requests that you want to allow, block, or count. + * AWS WAF evaluates Rules in order based on the value of Priority for each Rule.

+ *

You also specify a default action, either ALLOW or BLOCK. If a web request doesn't match + * any of the Rules in a WebACL, AWS WAF responds to the request with the default action.

+ *

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

+ *
    + *
  1. + *

    Create and update the ByteMatchSet objects and other predicates that you want to include in Rules. + * For more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, + * CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    + *
  2. + *
  3. + *

    Create and update the Rules that you want to include in the WebACL. For more information, see + * CreateRule and UpdateRule.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateWebACL request.

    + *
  6. + *
  7. + *

    Submit a CreateWebACL request.

    + *
  8. + *
  9. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateWebACL request.

    + *
  10. + *
  11. + *

    Submit an UpdateWebACL request to specify the Rules that you want to include in the WebACL, + * to specify the default action, and to associate the WebACL with a CloudFront distribution.

    + *
  12. + *
+ *

For more information about how to use the AWS WAF API, see the AWS WAF Developer Guide.

+ * + */ + public createWebACL( + args: CreateWebACLCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createWebACL( + args: CreateWebACLCommandInput, + cb: (err: any, data?: CreateWebACLCommandOutput) => void + ): void; + public createWebACL( + args: CreateWebACLCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateWebACLCommandOutput) => void + ): void; + public createWebACL( + args: CreateWebACLCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateWebACLCommandOutput) => void), + cb?: (err: any, data?: CreateWebACLCommandOutput) => void + ): Promise | void { + const command = new CreateWebACLCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Creates an XssMatchSet, which you use to allow, block, or count requests that contain cross-site scripting attacks + * in the specified part of web requests. AWS WAF searches for character sequences that are likely to be malicious strings.

+ *

To create and configure an XssMatchSet, perform the following steps:

+ *
    + *
  1. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * CreateXssMatchSet request.

    + *
  2. + *
  3. + *

    Submit a CreateXssMatchSet request.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateXssMatchSet request.

    + *
  6. + *
  7. + *

    Submit an UpdateXssMatchSet request to specify the parts of web requests in which you want to + * allow, block, or count cross-site scripting attacks.

    + *
  8. + *
+ *

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

+ * + */ + public createXssMatchSet( + args: CreateXssMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public createXssMatchSet( + args: CreateXssMatchSetCommandInput, + cb: (err: any, data?: CreateXssMatchSetCommandOutput) => void + ): void; + public createXssMatchSet( + args: CreateXssMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: CreateXssMatchSetCommandOutput) => void + ): void; + public createXssMatchSet( + args: CreateXssMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: CreateXssMatchSetCommandOutput) => void), + cb?: (err: any, data?: CreateXssMatchSetCommandOutput) => void + ): Promise | void { + const command = new CreateXssMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a ByteMatchSet. You can't delete a ByteMatchSet if it's still used in any Rules + * or if it still includes any ByteMatchTuple objects (any filters).

+ *

If you just want to remove a ByteMatchSet from a Rule, use UpdateRule.

+ *

To permanently delete a ByteMatchSet, perform the following steps:

+ *
    + *
  1. + *

    Update the ByteMatchSet to remove filters, if any. For more information, see UpdateByteMatchSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteByteMatchSet request.

    + *
  4. + *
  5. + *

    Submit a DeleteByteMatchSet request.

    + *
  6. + *
+ * + */ + public deleteByteMatchSet( + args: DeleteByteMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteByteMatchSet( + args: DeleteByteMatchSetCommandInput, + cb: (err: any, data?: DeleteByteMatchSetCommandOutput) => void + ): void; + public deleteByteMatchSet( + args: DeleteByteMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteByteMatchSetCommandOutput) => void + ): void; + public deleteByteMatchSet( + args: DeleteByteMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteByteMatchSetCommandOutput) => void), + cb?: (err: any, data?: DeleteByteMatchSetCommandOutput) => void + ): Promise | void { + const command = new DeleteByteMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a GeoMatchSet. You can't delete a GeoMatchSet if it's still used in any Rules or + * if it still includes any countries.

+ *

If you just want to remove a GeoMatchSet from a Rule, use UpdateRule.

+ *

To permanently delete a GeoMatchSet from AWS WAF, perform the following steps:

+ *
    + *
  1. + *

    Update the GeoMatchSet to remove any countries. For more information, see UpdateGeoMatchSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteGeoMatchSet request.

    + *
  4. + *
  5. + *

    Submit a DeleteGeoMatchSet request.

    + *
  6. + *
+ * + */ + public deleteGeoMatchSet( + args: DeleteGeoMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteGeoMatchSet( + args: DeleteGeoMatchSetCommandInput, + cb: (err: any, data?: DeleteGeoMatchSetCommandOutput) => void + ): void; + public deleteGeoMatchSet( + args: DeleteGeoMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteGeoMatchSetCommandOutput) => void + ): void; + public deleteGeoMatchSet( + args: DeleteGeoMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteGeoMatchSetCommandOutput) => void), + cb?: (err: any, data?: DeleteGeoMatchSetCommandOutput) => void + ): Promise | void { + const command = new DeleteGeoMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes an IPSet. You can't delete an IPSet if it's still used in any Rules or + * if it still includes any IP addresses.

+ *

If you just want to remove an IPSet from a Rule, use UpdateRule.

+ *

To permanently delete an IPSet from AWS WAF, perform the following steps:

+ *
    + *
  1. + *

    Update the IPSet to remove IP address ranges, if any. For more information, see UpdateIPSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteIPSet request.

    + *
  4. + *
  5. + *

    Submit a DeleteIPSet request.

    + *
  6. + *
+ * + */ + public deleteIPSet( + args: DeleteIPSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteIPSet( + args: DeleteIPSetCommandInput, + cb: (err: any, data?: DeleteIPSetCommandOutput) => void + ): void; + public deleteIPSet( + args: DeleteIPSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteIPSetCommandOutput) => void + ): void; + public deleteIPSet( + args: DeleteIPSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteIPSetCommandOutput) => void), + cb?: (err: any, data?: DeleteIPSetCommandOutput) => void + ): Promise | void { + const command = new DeleteIPSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes the LoggingConfiguration from the specified web + * ACL.

+ * + */ + public deleteLoggingConfiguration( + args: DeleteLoggingConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteLoggingConfiguration( + args: DeleteLoggingConfigurationCommandInput, + cb: (err: any, data?: DeleteLoggingConfigurationCommandOutput) => void + ): void; + public deleteLoggingConfiguration( + args: DeleteLoggingConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteLoggingConfigurationCommandOutput) => void + ): void; + public deleteLoggingConfiguration( + args: DeleteLoggingConfigurationCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteLoggingConfigurationCommandOutput) => void), + cb?: (err: any, data?: DeleteLoggingConfigurationCommandOutput) => void + ): Promise | void { + const command = new DeleteLoggingConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes an IAM policy from the specified RuleGroup.

+ *

The user making the request must be the owner of the RuleGroup.

+ * + */ + public deletePermissionPolicy( + args: DeletePermissionPolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deletePermissionPolicy( + args: DeletePermissionPolicyCommandInput, + cb: (err: any, data?: DeletePermissionPolicyCommandOutput) => void + ): void; + public deletePermissionPolicy( + args: DeletePermissionPolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeletePermissionPolicyCommandOutput) => void + ): void; + public deletePermissionPolicy( + args: DeletePermissionPolicyCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeletePermissionPolicyCommandOutput) => void), + cb?: (err: any, data?: DeletePermissionPolicyCommandOutput) => void + ): Promise | void { + const command = new DeletePermissionPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a RateBasedRule. You can't delete a rule if + * it's still used in any WebACL objects or if it still includes any predicates, + * such as ByteMatchSet objects.

+ *

If you just want to remove a rule from a WebACL, use UpdateWebACL.

+ *

To permanently delete a RateBasedRule from AWS WAF, perform the following + * steps:

+ *
    + *
  1. + *

    Update the RateBasedRule to remove predicates, if any. For more + * information, see UpdateRateBasedRule.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide + * in the ChangeToken parameter of a DeleteRateBasedRule + * request.

    + *
  4. + *
  5. + *

    Submit a DeleteRateBasedRule request.

    + *
  6. + *
+ * + */ + public deleteRateBasedRule( + args: DeleteRateBasedRuleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteRateBasedRule( + args: DeleteRateBasedRuleCommandInput, + cb: (err: any, data?: DeleteRateBasedRuleCommandOutput) => void + ): void; + public deleteRateBasedRule( + args: DeleteRateBasedRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRateBasedRuleCommandOutput) => void + ): void; + public deleteRateBasedRule( + args: DeleteRateBasedRuleCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteRateBasedRuleCommandOutput) => void), + cb?: (err: any, data?: DeleteRateBasedRuleCommandOutput) => void + ): Promise | void { + const command = new DeleteRateBasedRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a RegexMatchSet. You can't delete a RegexMatchSet if it's still used in any Rules + * or if it still includes any RegexMatchTuples objects (any filters).

+ *

If you just want to remove a RegexMatchSet from a Rule, use UpdateRule.

+ *

To permanently delete a RegexMatchSet, perform the following steps:

+ *
    + *
  1. + *

    Update the RegexMatchSet to remove filters, if any. For more information, see UpdateRegexMatchSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteRegexMatchSet request.

    + *
  4. + *
  5. + *

    Submit a DeleteRegexMatchSet request.

    + *
  6. + *
+ * + */ + public deleteRegexMatchSet( + args: DeleteRegexMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteRegexMatchSet( + args: DeleteRegexMatchSetCommandInput, + cb: (err: any, data?: DeleteRegexMatchSetCommandOutput) => void + ): void; + public deleteRegexMatchSet( + args: DeleteRegexMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRegexMatchSetCommandOutput) => void + ): void; + public deleteRegexMatchSet( + args: DeleteRegexMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteRegexMatchSetCommandOutput) => void), + cb?: (err: any, data?: DeleteRegexMatchSetCommandOutput) => void + ): Promise | void { + const command = new DeleteRegexMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a RegexPatternSet. You can't delete a RegexPatternSet if it's still used in any RegexMatchSet + * or if the RegexPatternSet is not empty.

+ * + */ + public deleteRegexPatternSet( + args: DeleteRegexPatternSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteRegexPatternSet( + args: DeleteRegexPatternSetCommandInput, + cb: (err: any, data?: DeleteRegexPatternSetCommandOutput) => void + ): void; + public deleteRegexPatternSet( + args: DeleteRegexPatternSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRegexPatternSetCommandOutput) => void + ): void; + public deleteRegexPatternSet( + args: DeleteRegexPatternSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteRegexPatternSetCommandOutput) => void), + cb?: (err: any, data?: DeleteRegexPatternSetCommandOutput) => void + ): Promise | void { + const command = new DeleteRegexPatternSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a Rule. You can't delete a Rule if it's still used in any WebACL + * objects or if it still includes any predicates, such as ByteMatchSet objects.

+ *

If you just want to remove a Rule from a WebACL, use UpdateWebACL.

+ *

To permanently delete a Rule from AWS WAF, perform the following steps:

+ *
    + *
  1. + *

    Update the Rule to remove predicates, if any. For more information, see UpdateRule.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteRule request.

    + *
  4. + *
  5. + *

    Submit a DeleteRule request.

    + *
  6. + *
+ * + */ + public deleteRule( + args: DeleteRuleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteRule( + args: DeleteRuleCommandInput, + cb: (err: any, data?: DeleteRuleCommandOutput) => void + ): void; + public deleteRule( + args: DeleteRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRuleCommandOutput) => void + ): void; + public deleteRule( + args: DeleteRuleCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteRuleCommandOutput) => void), + cb?: (err: any, data?: DeleteRuleCommandOutput) => void + ): Promise | void { + const command = new DeleteRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a RuleGroup. You can't delete a RuleGroup if it's still used in any WebACL + * objects or if it still includes any rules.

+ *

If you just want to remove a RuleGroup from a WebACL, use UpdateWebACL.

+ *

To permanently delete a RuleGroup from AWS WAF, perform the following steps:

+ *
    + *
  1. + *

    Update the RuleGroup to remove rules, if any. For more information, see UpdateRuleGroup.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteRuleGroup request.

    + *
  4. + *
  5. + *

    Submit a DeleteRuleGroup request.

    + *
  6. + *
+ * + */ + public deleteRuleGroup( + args: DeleteRuleGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteRuleGroup( + args: DeleteRuleGroupCommandInput, + cb: (err: any, data?: DeleteRuleGroupCommandOutput) => void + ): void; + public deleteRuleGroup( + args: DeleteRuleGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteRuleGroupCommandOutput) => void + ): void; + public deleteRuleGroup( + args: DeleteRuleGroupCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteRuleGroupCommandOutput) => void), + cb?: (err: any, data?: DeleteRuleGroupCommandOutput) => void + ): Promise | void { + const command = new DeleteRuleGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a SizeConstraintSet. You can't delete a SizeConstraintSet if it's still used in any Rules + * or if it still includes any SizeConstraint objects (any filters).

+ *

If you just want to remove a SizeConstraintSet from a Rule, use UpdateRule.

+ *

To permanently delete a SizeConstraintSet, perform the following steps:

+ *
    + *
  1. + *

    Update the SizeConstraintSet to remove filters, if any. For more information, see UpdateSizeConstraintSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteSizeConstraintSet request.

    + *
  4. + *
  5. + *

    Submit a DeleteSizeConstraintSet request.

    + *
  6. + *
+ * + */ + public deleteSizeConstraintSet( + args: DeleteSizeConstraintSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteSizeConstraintSet( + args: DeleteSizeConstraintSetCommandInput, + cb: (err: any, data?: DeleteSizeConstraintSetCommandOutput) => void + ): void; + public deleteSizeConstraintSet( + args: DeleteSizeConstraintSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteSizeConstraintSetCommandOutput) => void + ): void; + public deleteSizeConstraintSet( + args: DeleteSizeConstraintSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteSizeConstraintSetCommandOutput) => void), + cb?: (err: any, data?: DeleteSizeConstraintSetCommandOutput) => void + ): Promise | void { + const command = new DeleteSizeConstraintSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a SqlInjectionMatchSet. You can't delete a SqlInjectionMatchSet if it's + * still used in any Rules or if it still contains any SqlInjectionMatchTuple objects.

+ *

If you just want to remove a SqlInjectionMatchSet from a Rule, use UpdateRule.

+ *

To permanently delete a SqlInjectionMatchSet from AWS WAF, perform the following steps:

+ *
    + *
  1. + *

    Update the SqlInjectionMatchSet to remove filters, if any. For more information, see + * UpdateSqlInjectionMatchSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteSqlInjectionMatchSet request.

    + *
  4. + *
  5. + *

    Submit a DeleteSqlInjectionMatchSet request.

    + *
  6. + *
+ * + */ + public deleteSqlInjectionMatchSet( + args: DeleteSqlInjectionMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteSqlInjectionMatchSet( + args: DeleteSqlInjectionMatchSetCommandInput, + cb: (err: any, data?: DeleteSqlInjectionMatchSetCommandOutput) => void + ): void; + public deleteSqlInjectionMatchSet( + args: DeleteSqlInjectionMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteSqlInjectionMatchSetCommandOutput) => void + ): void; + public deleteSqlInjectionMatchSet( + args: DeleteSqlInjectionMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteSqlInjectionMatchSetCommandOutput) => void), + cb?: (err: any, data?: DeleteSqlInjectionMatchSetCommandOutput) => void + ): Promise | void { + const command = new DeleteSqlInjectionMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes a WebACL. You can't delete a WebACL if it still contains any Rules.

+ *

To delete a WebACL, perform the following steps:

+ *
    + *
  1. + *

    Update the WebACL to remove Rules, if any. For more information, see UpdateWebACL.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteWebACL request.

    + *
  4. + *
  5. + *

    Submit a DeleteWebACL request.

    + *
  6. + *
+ * + */ + public deleteWebACL( + args: DeleteWebACLCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteWebACL( + args: DeleteWebACLCommandInput, + cb: (err: any, data?: DeleteWebACLCommandOutput) => void + ): void; + public deleteWebACL( + args: DeleteWebACLCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteWebACLCommandOutput) => void + ): void; + public deleteWebACL( + args: DeleteWebACLCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteWebACLCommandOutput) => void), + cb?: (err: any, data?: DeleteWebACLCommandOutput) => void + ): Promise | void { + const command = new DeleteWebACLCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Permanently deletes an XssMatchSet. You can't delete an XssMatchSet if it's + * still used in any Rules or if it still contains any XssMatchTuple objects.

+ *

If you just want to remove an XssMatchSet from a Rule, use UpdateRule.

+ *

To permanently delete an XssMatchSet from AWS WAF, perform the following steps:

+ *
    + *
  1. + *

    Update the XssMatchSet to remove filters, if any. For more information, see + * UpdateXssMatchSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of a + * DeleteXssMatchSet request.

    + *
  4. + *
  5. + *

    Submit a DeleteXssMatchSet request.

    + *
  6. + *
+ * + */ + public deleteXssMatchSet( + args: DeleteXssMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public deleteXssMatchSet( + args: DeleteXssMatchSetCommandInput, + cb: (err: any, data?: DeleteXssMatchSetCommandOutput) => void + ): void; + public deleteXssMatchSet( + args: DeleteXssMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: DeleteXssMatchSetCommandOutput) => void + ): void; + public deleteXssMatchSet( + args: DeleteXssMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: DeleteXssMatchSetCommandOutput) => void), + cb?: (err: any, data?: DeleteXssMatchSetCommandOutput) => void + ): Promise | void { + const command = new DeleteXssMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the ByteMatchSet specified by ByteMatchSetId.

+ * + */ + public getByteMatchSet( + args: GetByteMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getByteMatchSet( + args: GetByteMatchSetCommandInput, + cb: (err: any, data?: GetByteMatchSetCommandOutput) => void + ): void; + public getByteMatchSet( + args: GetByteMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetByteMatchSetCommandOutput) => void + ): void; + public getByteMatchSet( + args: GetByteMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetByteMatchSetCommandOutput) => void), + cb?: (err: any, data?: GetByteMatchSetCommandOutput) => void + ): Promise | void { + const command = new GetByteMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

When you want to create, update, or delete AWS WAF objects, get a change token and include the change token in the create, update, or delete request. Change tokens ensure that your application doesn't submit conflicting requests to AWS WAF.

+ *

Each create, update, or delete request must use a unique change token. If your application submits a GetChangeToken request + * and then submits a second GetChangeToken request before submitting a create, update, or delete request, the second + * GetChangeToken request returns the same value as the first GetChangeToken request.

+ *

When you use a change token in a create, update, or delete request, the status of the change token changes to PENDING, + * which indicates that AWS WAF is propagating the change to all AWS WAF servers. Use GetChangeTokenStatus to determine the + * status of your change token.

+ * + */ + public getChangeToken( + args: GetChangeTokenCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getChangeToken( + args: GetChangeTokenCommandInput, + cb: (err: any, data?: GetChangeTokenCommandOutput) => void + ): void; + public getChangeToken( + args: GetChangeTokenCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetChangeTokenCommandOutput) => void + ): void; + public getChangeToken( + args: GetChangeTokenCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetChangeTokenCommandOutput) => void), + cb?: (err: any, data?: GetChangeTokenCommandOutput) => void + ): Promise | void { + const command = new GetChangeTokenCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the status of a ChangeToken that you got by calling GetChangeToken. ChangeTokenStatus is + * one of the following values:

+ *
    + *
  • + *

    + * PROVISIONED: You requested the change token by calling GetChangeToken, but you haven't used it yet + * in a call to create, update, or delete an AWS WAF object.

    + *
  • + *
  • + *

    + * PENDING: AWS WAF is propagating the create, update, or delete request to all AWS WAF servers.

    + *
  • + *
  • + *

    + * INSYNC: Propagation is complete.

    + *
  • + *
+ * + */ + public getChangeTokenStatus( + args: GetChangeTokenStatusCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getChangeTokenStatus( + args: GetChangeTokenStatusCommandInput, + cb: (err: any, data?: GetChangeTokenStatusCommandOutput) => void + ): void; + public getChangeTokenStatus( + args: GetChangeTokenStatusCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetChangeTokenStatusCommandOutput) => void + ): void; + public getChangeTokenStatus( + args: GetChangeTokenStatusCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetChangeTokenStatusCommandOutput) => void), + cb?: (err: any, data?: GetChangeTokenStatusCommandOutput) => void + ): Promise | void { + const command = new GetChangeTokenStatusCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the GeoMatchSet that is specified by GeoMatchSetId.

+ * + */ + public getGeoMatchSet( + args: GetGeoMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getGeoMatchSet( + args: GetGeoMatchSetCommandInput, + cb: (err: any, data?: GetGeoMatchSetCommandOutput) => void + ): void; + public getGeoMatchSet( + args: GetGeoMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetGeoMatchSetCommandOutput) => void + ): void; + public getGeoMatchSet( + args: GetGeoMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetGeoMatchSetCommandOutput) => void), + cb?: (err: any, data?: GetGeoMatchSetCommandOutput) => void + ): Promise | void { + const command = new GetGeoMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the IPSet that is specified by IPSetId.

+ * + */ + public getIPSet( + args: GetIPSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getIPSet( + args: GetIPSetCommandInput, + cb: (err: any, data?: GetIPSetCommandOutput) => void + ): void; + public getIPSet( + args: GetIPSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetIPSetCommandOutput) => void + ): void; + public getIPSet( + args: GetIPSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetIPSetCommandOutput) => void), + cb?: (err: any, data?: GetIPSetCommandOutput) => void + ): Promise | void { + const command = new GetIPSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the LoggingConfiguration for the specified web ACL.

+ * + */ + public getLoggingConfiguration( + args: GetLoggingConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getLoggingConfiguration( + args: GetLoggingConfigurationCommandInput, + cb: (err: any, data?: GetLoggingConfigurationCommandOutput) => void + ): void; + public getLoggingConfiguration( + args: GetLoggingConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetLoggingConfigurationCommandOutput) => void + ): void; + public getLoggingConfiguration( + args: GetLoggingConfigurationCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetLoggingConfigurationCommandOutput) => void), + cb?: (err: any, data?: GetLoggingConfigurationCommandOutput) => void + ): Promise | void { + const command = new GetLoggingConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the IAM policy attached to the RuleGroup.

+ * + */ + public getPermissionPolicy( + args: GetPermissionPolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getPermissionPolicy( + args: GetPermissionPolicyCommandInput, + cb: (err: any, data?: GetPermissionPolicyCommandOutput) => void + ): void; + public getPermissionPolicy( + args: GetPermissionPolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetPermissionPolicyCommandOutput) => void + ): void; + public getPermissionPolicy( + args: GetPermissionPolicyCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetPermissionPolicyCommandOutput) => void), + cb?: (err: any, data?: GetPermissionPolicyCommandOutput) => void + ): Promise | void { + const command = new GetPermissionPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the RateBasedRule that is specified by the + * RuleId that you included in the GetRateBasedRule + * request.

+ * + */ + public getRateBasedRule( + args: GetRateBasedRuleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getRateBasedRule( + args: GetRateBasedRuleCommandInput, + cb: (err: any, data?: GetRateBasedRuleCommandOutput) => void + ): void; + public getRateBasedRule( + args: GetRateBasedRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRateBasedRuleCommandOutput) => void + ): void; + public getRateBasedRule( + args: GetRateBasedRuleCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetRateBasedRuleCommandOutput) => void), + cb?: (err: any, data?: GetRateBasedRuleCommandOutput) => void + ): Promise | void { + const command = new GetRateBasedRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of IP addresses currently being blocked by the RateBasedRule that is specified by the RuleId. The maximum + * number of managed keys that will be blocked is 10,000. If more than 10,000 addresses exceed + * the rate limit, the 10,000 addresses with the highest rates will be blocked.

+ * + */ + public getRateBasedRuleManagedKeys( + args: GetRateBasedRuleManagedKeysCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getRateBasedRuleManagedKeys( + args: GetRateBasedRuleManagedKeysCommandInput, + cb: (err: any, data?: GetRateBasedRuleManagedKeysCommandOutput) => void + ): void; + public getRateBasedRuleManagedKeys( + args: GetRateBasedRuleManagedKeysCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRateBasedRuleManagedKeysCommandOutput) => void + ): void; + public getRateBasedRuleManagedKeys( + args: GetRateBasedRuleManagedKeysCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetRateBasedRuleManagedKeysCommandOutput) => void), + cb?: (err: any, data?: GetRateBasedRuleManagedKeysCommandOutput) => void + ): Promise | void { + const command = new GetRateBasedRuleManagedKeysCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the RegexMatchSet specified by RegexMatchSetId.

+ * + */ + public getRegexMatchSet( + args: GetRegexMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getRegexMatchSet( + args: GetRegexMatchSetCommandInput, + cb: (err: any, data?: GetRegexMatchSetCommandOutput) => void + ): void; + public getRegexMatchSet( + args: GetRegexMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRegexMatchSetCommandOutput) => void + ): void; + public getRegexMatchSet( + args: GetRegexMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetRegexMatchSetCommandOutput) => void), + cb?: (err: any, data?: GetRegexMatchSetCommandOutput) => void + ): Promise | void { + const command = new GetRegexMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the RegexPatternSet specified by RegexPatternSetId.

+ * + */ + public getRegexPatternSet( + args: GetRegexPatternSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getRegexPatternSet( + args: GetRegexPatternSetCommandInput, + cb: (err: any, data?: GetRegexPatternSetCommandOutput) => void + ): void; + public getRegexPatternSet( + args: GetRegexPatternSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRegexPatternSetCommandOutput) => void + ): void; + public getRegexPatternSet( + args: GetRegexPatternSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetRegexPatternSetCommandOutput) => void), + cb?: (err: any, data?: GetRegexPatternSetCommandOutput) => void + ): Promise | void { + const command = new GetRegexPatternSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the Rule that is specified by the RuleId that you included in the GetRule request.

+ * + */ + public getRule( + args: GetRuleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getRule( + args: GetRuleCommandInput, + cb: (err: any, data?: GetRuleCommandOutput) => void + ): void; + public getRule( + args: GetRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRuleCommandOutput) => void + ): void; + public getRule( + args: GetRuleCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetRuleCommandOutput) => void), + cb?: (err: any, data?: GetRuleCommandOutput) => void + ): Promise | void { + const command = new GetRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the RuleGroup that is specified by the RuleGroupId that you included in the GetRuleGroup request.

+ *

To view the rules in a rule group, use ListActivatedRulesInRuleGroup.

+ * + */ + public getRuleGroup( + args: GetRuleGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getRuleGroup( + args: GetRuleGroupCommandInput, + cb: (err: any, data?: GetRuleGroupCommandOutput) => void + ): void; + public getRuleGroup( + args: GetRuleGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetRuleGroupCommandOutput) => void + ): void; + public getRuleGroup( + args: GetRuleGroupCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetRuleGroupCommandOutput) => void), + cb?: (err: any, data?: GetRuleGroupCommandOutput) => void + ): Promise | void { + const command = new GetRuleGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Gets detailed information about a specified number of requests--a sample--that AWS WAF randomly selects from among the first 5,000 requests that your AWS resource received during a time range that you choose. You can specify a sample size of up to 500 requests, and you can specify any time range in the previous three hours.

+ *

+ * GetSampledRequests returns a time range, which is usually the time range that you specified. However, if your resource + * (such as 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 AWS WAF selected the requests in the sample.

+ * + */ + public getSampledRequests( + args: GetSampledRequestsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getSampledRequests( + args: GetSampledRequestsCommandInput, + cb: (err: any, data?: GetSampledRequestsCommandOutput) => void + ): void; + public getSampledRequests( + args: GetSampledRequestsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSampledRequestsCommandOutput) => void + ): void; + public getSampledRequests( + args: GetSampledRequestsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetSampledRequestsCommandOutput) => void), + cb?: (err: any, data?: GetSampledRequestsCommandOutput) => void + ): Promise | void { + const command = new GetSampledRequestsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the SizeConstraintSet specified by SizeConstraintSetId.

+ * + */ + public getSizeConstraintSet( + args: GetSizeConstraintSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getSizeConstraintSet( + args: GetSizeConstraintSetCommandInput, + cb: (err: any, data?: GetSizeConstraintSetCommandOutput) => void + ): void; + public getSizeConstraintSet( + args: GetSizeConstraintSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSizeConstraintSetCommandOutput) => void + ): void; + public getSizeConstraintSet( + args: GetSizeConstraintSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetSizeConstraintSetCommandOutput) => void), + cb?: (err: any, data?: GetSizeConstraintSetCommandOutput) => void + ): Promise | void { + const command = new GetSizeConstraintSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the SqlInjectionMatchSet that is specified by SqlInjectionMatchSetId.

+ * + */ + public getSqlInjectionMatchSet( + args: GetSqlInjectionMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getSqlInjectionMatchSet( + args: GetSqlInjectionMatchSetCommandInput, + cb: (err: any, data?: GetSqlInjectionMatchSetCommandOutput) => void + ): void; + public getSqlInjectionMatchSet( + args: GetSqlInjectionMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetSqlInjectionMatchSetCommandOutput) => void + ): void; + public getSqlInjectionMatchSet( + args: GetSqlInjectionMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetSqlInjectionMatchSetCommandOutput) => void), + cb?: (err: any, data?: GetSqlInjectionMatchSetCommandOutput) => void + ): Promise | void { + const command = new GetSqlInjectionMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the WebACL that is specified by WebACLId.

+ * + */ + public getWebACL( + args: GetWebACLCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getWebACL( + args: GetWebACLCommandInput, + cb: (err: any, data?: GetWebACLCommandOutput) => void + ): void; + public getWebACL( + args: GetWebACLCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetWebACLCommandOutput) => void + ): void; + public getWebACL( + args: GetWebACLCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetWebACLCommandOutput) => void), + cb?: (err: any, data?: GetWebACLCommandOutput) => void + ): Promise | void { + const command = new GetWebACLCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns the XssMatchSet that is specified by XssMatchSetId.

+ * + */ + public getXssMatchSet( + args: GetXssMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public getXssMatchSet( + args: GetXssMatchSetCommandInput, + cb: (err: any, data?: GetXssMatchSetCommandOutput) => void + ): void; + public getXssMatchSet( + args: GetXssMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: GetXssMatchSetCommandOutput) => void + ): void; + public getXssMatchSet( + args: GetXssMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: GetXssMatchSetCommandOutput) => void), + cb?: (err: any, data?: GetXssMatchSetCommandOutput) => void + ): Promise | void { + const command = new GetXssMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of ActivatedRule objects.

+ * + */ + public listActivatedRulesInRuleGroup( + args: ListActivatedRulesInRuleGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listActivatedRulesInRuleGroup( + args: ListActivatedRulesInRuleGroupCommandInput, + cb: (err: any, data?: ListActivatedRulesInRuleGroupCommandOutput) => void + ): void; + public listActivatedRulesInRuleGroup( + args: ListActivatedRulesInRuleGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListActivatedRulesInRuleGroupCommandOutput) => void + ): void; + public listActivatedRulesInRuleGroup( + args: ListActivatedRulesInRuleGroupCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListActivatedRulesInRuleGroupCommandOutput) => void), + cb?: (err: any, data?: ListActivatedRulesInRuleGroupCommandOutput) => void + ): Promise | void { + const command = new ListActivatedRulesInRuleGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of ByteMatchSetSummary objects.

+ * + */ + public listByteMatchSets( + args: ListByteMatchSetsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listByteMatchSets( + args: ListByteMatchSetsCommandInput, + cb: (err: any, data?: ListByteMatchSetsCommandOutput) => void + ): void; + public listByteMatchSets( + args: ListByteMatchSetsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListByteMatchSetsCommandOutput) => void + ): void; + public listByteMatchSets( + args: ListByteMatchSetsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListByteMatchSetsCommandOutput) => void), + cb?: (err: any, data?: ListByteMatchSetsCommandOutput) => void + ): Promise | void { + const command = new ListByteMatchSetsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of GeoMatchSetSummary objects in the response.

+ * + */ + public listGeoMatchSets( + args: ListGeoMatchSetsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listGeoMatchSets( + args: ListGeoMatchSetsCommandInput, + cb: (err: any, data?: ListGeoMatchSetsCommandOutput) => void + ): void; + public listGeoMatchSets( + args: ListGeoMatchSetsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListGeoMatchSetsCommandOutput) => void + ): void; + public listGeoMatchSets( + args: ListGeoMatchSetsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListGeoMatchSetsCommandOutput) => void), + cb?: (err: any, data?: ListGeoMatchSetsCommandOutput) => void + ): Promise | void { + const command = new ListGeoMatchSetsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of IPSetSummary objects in the response.

+ * + */ + public listIPSets( + args: ListIPSetsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listIPSets( + args: ListIPSetsCommandInput, + cb: (err: any, data?: ListIPSetsCommandOutput) => void + ): void; + public listIPSets( + args: ListIPSetsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListIPSetsCommandOutput) => void + ): void; + public listIPSets( + args: ListIPSetsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListIPSetsCommandOutput) => void), + cb?: (err: any, data?: ListIPSetsCommandOutput) => void + ): Promise | void { + const command = new ListIPSetsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of LoggingConfiguration objects.

+ * + */ + public listLoggingConfigurations( + args: ListLoggingConfigurationsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listLoggingConfigurations( + args: ListLoggingConfigurationsCommandInput, + cb: (err: any, data?: ListLoggingConfigurationsCommandOutput) => void + ): void; + public listLoggingConfigurations( + args: ListLoggingConfigurationsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListLoggingConfigurationsCommandOutput) => void + ): void; + public listLoggingConfigurations( + args: ListLoggingConfigurationsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListLoggingConfigurationsCommandOutput) => void), + cb?: (err: any, data?: ListLoggingConfigurationsCommandOutput) => void + ): Promise | void { + const command = new ListLoggingConfigurationsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of RuleSummary objects.

+ * + */ + public listRateBasedRules( + args: ListRateBasedRulesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listRateBasedRules( + args: ListRateBasedRulesCommandInput, + cb: (err: any, data?: ListRateBasedRulesCommandOutput) => void + ): void; + public listRateBasedRules( + args: ListRateBasedRulesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListRateBasedRulesCommandOutput) => void + ): void; + public listRateBasedRules( + args: ListRateBasedRulesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListRateBasedRulesCommandOutput) => void), + cb?: (err: any, data?: ListRateBasedRulesCommandOutput) => void + ): Promise | void { + const command = new ListRateBasedRulesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of RegexMatchSetSummary objects.

+ * + */ + public listRegexMatchSets( + args: ListRegexMatchSetsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listRegexMatchSets( + args: ListRegexMatchSetsCommandInput, + cb: (err: any, data?: ListRegexMatchSetsCommandOutput) => void + ): void; + public listRegexMatchSets( + args: ListRegexMatchSetsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListRegexMatchSetsCommandOutput) => void + ): void; + public listRegexMatchSets( + args: ListRegexMatchSetsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListRegexMatchSetsCommandOutput) => void), + cb?: (err: any, data?: ListRegexMatchSetsCommandOutput) => void + ): Promise | void { + const command = new ListRegexMatchSetsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of RegexPatternSetSummary objects.

+ * + */ + public listRegexPatternSets( + args: ListRegexPatternSetsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listRegexPatternSets( + args: ListRegexPatternSetsCommandInput, + cb: (err: any, data?: ListRegexPatternSetsCommandOutput) => void + ): void; + public listRegexPatternSets( + args: ListRegexPatternSetsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListRegexPatternSetsCommandOutput) => void + ): void; + public listRegexPatternSets( + args: ListRegexPatternSetsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListRegexPatternSetsCommandOutput) => void), + cb?: (err: any, data?: ListRegexPatternSetsCommandOutput) => void + ): Promise | void { + const command = new ListRegexPatternSetsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of RuleGroup objects.

+ * + */ + public listRuleGroups( + args: ListRuleGroupsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listRuleGroups( + args: ListRuleGroupsCommandInput, + cb: (err: any, data?: ListRuleGroupsCommandOutput) => void + ): void; + public listRuleGroups( + args: ListRuleGroupsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListRuleGroupsCommandOutput) => void + ): void; + public listRuleGroups( + args: ListRuleGroupsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListRuleGroupsCommandOutput) => void), + cb?: (err: any, data?: ListRuleGroupsCommandOutput) => void + ): Promise | void { + const command = new ListRuleGroupsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of RuleSummary objects.

+ * + */ + public listRules( + args: ListRulesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listRules( + args: ListRulesCommandInput, + cb: (err: any, data?: ListRulesCommandOutput) => void + ): void; + public listRules( + args: ListRulesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListRulesCommandOutput) => void + ): void; + public listRules( + args: ListRulesCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListRulesCommandOutput) => void), + cb?: (err: any, data?: ListRulesCommandOutput) => void + ): Promise | void { + const command = new ListRulesCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of SizeConstraintSetSummary objects.

+ * + */ + public listSizeConstraintSets( + args: ListSizeConstraintSetsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listSizeConstraintSets( + args: ListSizeConstraintSetsCommandInput, + cb: (err: any, data?: ListSizeConstraintSetsCommandOutput) => void + ): void; + public listSizeConstraintSets( + args: ListSizeConstraintSetsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSizeConstraintSetsCommandOutput) => void + ): void; + public listSizeConstraintSets( + args: ListSizeConstraintSetsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListSizeConstraintSetsCommandOutput) => void), + cb?: (err: any, data?: ListSizeConstraintSetsCommandOutput) => void + ): Promise | void { + const command = new ListSizeConstraintSetsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of SqlInjectionMatchSet objects.

+ * + */ + public listSqlInjectionMatchSets( + args: ListSqlInjectionMatchSetsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listSqlInjectionMatchSets( + args: ListSqlInjectionMatchSetsCommandInput, + cb: (err: any, data?: ListSqlInjectionMatchSetsCommandOutput) => void + ): void; + public listSqlInjectionMatchSets( + args: ListSqlInjectionMatchSetsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSqlInjectionMatchSetsCommandOutput) => void + ): void; + public listSqlInjectionMatchSets( + args: ListSqlInjectionMatchSetsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListSqlInjectionMatchSetsCommandOutput) => void), + cb?: (err: any, data?: ListSqlInjectionMatchSetsCommandOutput) => void + ): Promise | void { + const command = new ListSqlInjectionMatchSetsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of RuleGroup objects that you are subscribed to.

+ * + */ + public listSubscribedRuleGroups( + args: ListSubscribedRuleGroupsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listSubscribedRuleGroups( + args: ListSubscribedRuleGroupsCommandInput, + cb: (err: any, data?: ListSubscribedRuleGroupsCommandOutput) => void + ): void; + public listSubscribedRuleGroups( + args: ListSubscribedRuleGroupsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListSubscribedRuleGroupsCommandOutput) => void + ): void; + public listSubscribedRuleGroups( + args: ListSubscribedRuleGroupsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListSubscribedRuleGroupsCommandOutput) => void), + cb?: (err: any, data?: ListSubscribedRuleGroupsCommandOutput) => void + ): Promise | void { + const command = new ListSubscribedRuleGroupsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): void; + public listTagsForResource( + args: ListTagsForResourceCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListTagsForResourceCommandOutput) => void), + cb?: (err: any, data?: ListTagsForResourceCommandOutput) => void + ): Promise | void { + const command = new ListTagsForResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of WebACLSummary objects in the response.

+ * + */ + public listWebACLs( + args: ListWebACLsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listWebACLs( + args: ListWebACLsCommandInput, + cb: (err: any, data?: ListWebACLsCommandOutput) => void + ): void; + public listWebACLs( + args: ListWebACLsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListWebACLsCommandOutput) => void + ): void; + public listWebACLs( + args: ListWebACLsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListWebACLsCommandOutput) => void), + cb?: (err: any, data?: ListWebACLsCommandOutput) => void + ): Promise | void { + const command = new ListWebACLsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Returns an array of XssMatchSet objects.

+ * + */ + public listXssMatchSets( + args: ListXssMatchSetsCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public listXssMatchSets( + args: ListXssMatchSetsCommandInput, + cb: (err: any, data?: ListXssMatchSetsCommandOutput) => void + ): void; + public listXssMatchSets( + args: ListXssMatchSetsCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: ListXssMatchSetsCommandOutput) => void + ): void; + public listXssMatchSets( + args: ListXssMatchSetsCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: ListXssMatchSetsCommandOutput) => void), + cb?: (err: any, data?: ListXssMatchSetsCommandOutput) => void + ): Promise | void { + const command = new ListXssMatchSetsCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Associates a LoggingConfiguration with a specified web ACL.

+ *

You can access information about all traffic that AWS WAF inspects using the following + * steps:

+ *
    + *
  1. + *

    Create an Amazon Kinesis Data + * Firehose.

    + *

    Create the data firehose with a PUT source and in the region that you are operating. However, if you are capturing logs for Amazon CloudFront, always create the firehose in US East (N. Virginia).

    + * + *

    Do not create the data firehose using a Kinesis stream as your source.

    + *
    + *
  2. + *
  3. + *

    Associate that firehose to your web ACL using a PutLoggingConfiguration request.

    + *
  4. + *
+ * + *

When you successfully enable logging using a PutLoggingConfiguration request, AWS WAF will create a service linked role with the necessary permissions to write logs to the Amazon Kinesis Data Firehose. For more information, see Logging Web ACL Traffic Information in the AWS WAF Developer Guide.

+ * + */ + public putLoggingConfiguration( + args: PutLoggingConfigurationCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putLoggingConfiguration( + args: PutLoggingConfigurationCommandInput, + cb: (err: any, data?: PutLoggingConfigurationCommandOutput) => void + ): void; + public putLoggingConfiguration( + args: PutLoggingConfigurationCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutLoggingConfigurationCommandOutput) => void + ): void; + public putLoggingConfiguration( + args: PutLoggingConfigurationCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: PutLoggingConfigurationCommandOutput) => void), + cb?: (err: any, data?: PutLoggingConfigurationCommandOutput) => void + ): Promise | void { + const command = new PutLoggingConfigurationCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Attaches a IAM policy to the specified resource. The only supported use for this action is to share a RuleGroup across accounts.

+ *

The PutPermissionPolicy is subject to the following restrictions:

+ *
    + *
  • + *

    You can attach only one policy with each PutPermissionPolicy request.

    + *
  • + *
  • + *

    The policy must include an Effect, Action and Principal.

    + *
  • + *
  • + * + *

    + * Effect must specify Allow.

    + *
  • + *
  • + *

    The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard actions in the policy will be rejected.

    + *
  • + *
  • + *

    The policy cannot include a Resource parameter.

    + *
  • + *
  • + *

    The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup must exist in the same region.

    + *
  • + *
  • + *

    The user making the request must be the owner of the RuleGroup.

    + *
  • + *
  • + *

    Your policy must be composed using IAM Policy version 2012-10-17.

    + *
  • + *
+ *

For more information, see IAM Policies.

+ * + *

An example of a valid policy parameter is shown in the Examples section below.

+ * + * + */ + public putPermissionPolicy( + args: PutPermissionPolicyCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public putPermissionPolicy( + args: PutPermissionPolicyCommandInput, + cb: (err: any, data?: PutPermissionPolicyCommandOutput) => void + ): void; + public putPermissionPolicy( + args: PutPermissionPolicyCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: PutPermissionPolicyCommandOutput) => void + ): void; + public putPermissionPolicy( + args: PutPermissionPolicyCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: PutPermissionPolicyCommandOutput) => void), + cb?: (err: any, data?: PutPermissionPolicyCommandOutput) => void + ): Promise | void { + const command = new PutPermissionPolicyCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + public tagResource( + args: TagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public tagResource( + args: TagResourceCommandInput, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: TagResourceCommandOutput) => void + ): void; + public tagResource( + args: TagResourceCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: TagResourceCommandOutput) => void), + cb?: (err: any, data?: TagResourceCommandOutput) => void + ): Promise | void { + const command = new TagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + public untagResource( + args: UntagResourceCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public untagResource( + args: UntagResourceCommandInput, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UntagResourceCommandOutput) => void + ): void; + public untagResource( + args: UntagResourceCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UntagResourceCommandOutput) => void), + cb?: (err: any, data?: UntagResourceCommandOutput) => void + ): Promise | void { + const command = new UntagResourceCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes ByteMatchTuple objects (filters) in a ByteMatchSet. For each ByteMatchTuple object, + * you specify the following values:

+ *
    + *
  • + *

    Whether to insert or delete the object from the array. If you want to change a ByteMatchSetUpdate object, + * you delete the existing object and add a new one.

    + *
  • + *
  • + *

    The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header.

    + *
  • + *
  • + *

    The bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to look for. For more information, including how you specify + * the values for the AWS WAF API and the AWS CLI or SDKs, see TargetString in the ByteMatchTuple data type.

    + *
  • + *
  • + *

    Where to look, such as at the beginning or the end of a query string.

    + *
  • + *
  • + *

    Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string.

    + *
  • + *
+ *

For example, you can add a ByteMatchSetUpdate object that matches web requests in which User-Agent headers contain + * the string BadBot. You can then configure AWS WAF to block those requests.

+ *

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

+ *
    + *
  1. + *

    Create a ByteMatchSet. For more information, see CreateByteMatchSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateByteMatchSet request.

    + *
  4. + *
  5. + *

    Submit an UpdateByteMatchSet request to specify the part of the request that you want AWS WAF to inspect + * (for example, the header or the URI) and the value that you want AWS WAF to watch for.

    + *
  6. + *
+ *

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

+ * + */ + public updateByteMatchSet( + args: UpdateByteMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateByteMatchSet( + args: UpdateByteMatchSetCommandInput, + cb: (err: any, data?: UpdateByteMatchSetCommandOutput) => void + ): void; + public updateByteMatchSet( + args: UpdateByteMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateByteMatchSetCommandOutput) => void + ): void; + public updateByteMatchSet( + args: UpdateByteMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateByteMatchSetCommandOutput) => void), + cb?: (err: any, data?: UpdateByteMatchSetCommandOutput) => void + ): Promise | void { + const command = new UpdateByteMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes GeoMatchConstraint objects in an GeoMatchSet. For each GeoMatchConstraint object, + * you specify the following values:

+ *
    + *
  • + *

    Whether to insert or delete the object from the array. If you want to change an GeoMatchConstraint object, you delete the existing object and add a new one.

    + *
  • + *
  • + *

    The Type. The only valid value for Type is Country.

    + *
  • + *
  • + *

    The Value, which is a two character code for the country to add to the GeoMatchConstraint object. Valid codes are listed in GeoMatchConstraint$Value.

    + *
  • + *
+ * + *

To create and configure an GeoMatchSet, perform the following steps:

+ *
    + *
  1. + *

    Submit a CreateGeoMatchSet request.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateGeoMatchSet request.

    + *
  4. + *
  5. + *

    Submit an UpdateGeoMatchSet request to specify the country that you want AWS WAF to watch for.

    + *
  6. + *
+ *

When you update an GeoMatchSet, you specify the country that you want to add and/or the country that you want to delete. + * If you want to change a country, you delete the existing country and add the new one.

+ *

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

+ * + */ + public updateGeoMatchSet( + args: UpdateGeoMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateGeoMatchSet( + args: UpdateGeoMatchSetCommandInput, + cb: (err: any, data?: UpdateGeoMatchSetCommandOutput) => void + ): void; + public updateGeoMatchSet( + args: UpdateGeoMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateGeoMatchSetCommandOutput) => void + ): void; + public updateGeoMatchSet( + args: UpdateGeoMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateGeoMatchSetCommandOutput) => void), + cb?: (err: any, data?: UpdateGeoMatchSetCommandOutput) => void + ): Promise | void { + const command = new UpdateGeoMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes IPSetDescriptor objects in an + * IPSet. For each IPSetDescriptor object, you specify the following + * values:

+ *
    + *
  • + *

    Whether to insert or delete the object from the array. If you want to change an + * IPSetDescriptor object, you delete the existing object and add a new + * one.

    + *
  • + *
  • + *

    The IP address version, IPv4 or IPv6.

    + *
  • + *
  • + *

    The IP address in CIDR notation, for example, 192.0.2.0/24 (for + * the range of IP addresses from 192.0.2.0 to 192.0.2.255) or + * 192.0.2.44/32 (for the individual IP address + * 192.0.2.44).

    + *
  • + *
+ *

AWS WAF supports IPv4 address ranges: /8 and any range between /16 through /32. AWS + * WAF supports IPv6 address ranges: /24, /32, /48, /56, /64, and /128. For more + * information about CIDR notation, see the Wikipedia entry Classless + * Inter-Domain Routing.

+ *

IPv6 addresses can be represented using any of the following formats:

+ *
    + *
  • + *

    1111:0000:0000:0000:0000:0000:0000:0111/128

    + *
  • + *
  • + *

    1111:0:0:0:0:0:0:0111/128

    + *
  • + *
  • + *

    1111::0111/128

    + *
  • + *
  • + *

    1111::111/128

    + *
  • + *
+ *

You use an IPSet to specify which web requests you want to allow or + * block based on the IP addresses that the requests originated from. For example, if you're + * receiving a lot of requests from one or a small number of IP addresses and you want to + * block the requests, you can create an IPSet that specifies those IP addresses, + * and then configure AWS WAF to block the requests.

+ *

To create and configure an IPSet, perform the following steps:

+ *
    + *
  1. + *

    Submit a CreateIPSet request.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide + * in the ChangeToken parameter of an UpdateIPSet + * request.

    + *
  4. + *
  5. + *

    Submit an UpdateIPSet request to specify the IP addresses that you + * want AWS WAF to watch for.

    + *
  6. + *
+ *

When you update an IPSet, you specify the IP addresses that you want to + * add and/or the IP addresses that you want to delete. If you want to change an IP address, + * you delete the existing IP address and add the new one.

+ *

You can insert a maximum of 1000 addresses in a single + * request.

+ *

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

+ * + */ + public updateIPSet( + args: UpdateIPSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateIPSet( + args: UpdateIPSetCommandInput, + cb: (err: any, data?: UpdateIPSetCommandOutput) => void + ): void; + public updateIPSet( + args: UpdateIPSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateIPSetCommandOutput) => void + ): void; + public updateIPSet( + args: UpdateIPSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateIPSetCommandOutput) => void), + cb?: (err: any, data?: UpdateIPSetCommandOutput) => void + ): Promise | void { + const command = new UpdateIPSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes Predicate objects in a rule and updates the + * RateLimit in the rule.

+ *

Each Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests + * that you want to block or count. The RateLimit specifies the number of + * requests every five minutes that triggers the rule.

+ *

If you add more than one predicate to a RateBasedRule, a request must + * match all the predicates and exceed the RateLimit to be counted or blocked. + * For example, suppose you add the following to a RateBasedRule:

+ *
    + *
  • + *

    An IPSet that matches the IP address 192.0.2.44/32 + *

    + *
  • + *
  • + *

    A ByteMatchSet that matches BadBot in the + * User-Agent header

    + *
  • + *
+ *

Further, you specify a + * RateLimit of 15,000.

+ *

You then add the RateBasedRule to a WebACL and specify that + * you want to block requests that satisfy the rule. For a request to be blocked, it must come + * from the IP address 192.0.2.44 and the User-Agent header + * in the request must contain the value BadBot. Further, requests that match + * these two conditions much be received at a rate of more than 15,000 every five minutes. If + * the rate drops below this limit, AWS WAF no longer blocks the requests.

+ * + *

As a second example, suppose you want to limit requests to a particular page on your site. To do this, you could add the following to a + * RateBasedRule:

+ * + * + *
    + *
  • + *

    A ByteMatchSet with FieldToMatch of URI + *

    + *
  • + *
  • + *

    A PositionalConstraint of STARTS_WITH + *

    + *
  • + *
  • + *

    A TargetString of login + *

    + *
  • + *
+ *

Further, you specify a RateLimit of 15,000.

+ *

By adding this RateBasedRule to a WebACL, you could limit requests to your login page without affecting the rest of your site.

+ * + */ + public updateRateBasedRule( + args: UpdateRateBasedRuleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateRateBasedRule( + args: UpdateRateBasedRuleCommandInput, + cb: (err: any, data?: UpdateRateBasedRuleCommandOutput) => void + ): void; + public updateRateBasedRule( + args: UpdateRateBasedRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateRateBasedRuleCommandOutput) => void + ): void; + public updateRateBasedRule( + args: UpdateRateBasedRuleCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateRateBasedRuleCommandOutput) => void), + cb?: (err: any, data?: UpdateRateBasedRuleCommandOutput) => void + ): Promise | void { + const command = new UpdateRateBasedRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes RegexMatchTuple objects (filters) in a RegexMatchSet. For each RegexMatchSetUpdate object, + * you specify the following values:

+ *
    + *
  • + *

    Whether to insert or delete the object from the array. If you want to change a RegexMatchSetUpdate object, + * you delete the existing object and add a new one.

    + *
  • + *
  • + *

    The part of a web request that you want AWS WAF to inspectupdate, such as a query string or the value of the User-Agent header.

    + *
  • + *
  • + *

    The identifier of the pattern (a regular expression) that you want AWS WAF to look for. For more information, see RegexPatternSet.

    + *
  • + *
  • + *

    Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string.

    + *
  • + *
+ *

For example, you can create a RegexPatternSet that matches any requests with User-Agent headers + * that contain the string B[a@]dB[o0]t. You can then configure AWS WAF to reject those requests.

+ *

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

+ *
    + *
  1. + *

    Create a RegexMatchSet. For more information, see CreateRegexMatchSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateRegexMatchSet request.

    + *
  4. + *
  5. + *

    Submit an UpdateRegexMatchSet request to specify the part of the request that you want AWS WAF to inspect + * (for example, the header or the URI) and the identifier of the RegexPatternSet that contain the regular expression patters you want AWS WAF to watch for.

    + *
  6. + *
+ *

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

+ * + */ + public updateRegexMatchSet( + args: UpdateRegexMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateRegexMatchSet( + args: UpdateRegexMatchSetCommandInput, + cb: (err: any, data?: UpdateRegexMatchSetCommandOutput) => void + ): void; + public updateRegexMatchSet( + args: UpdateRegexMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateRegexMatchSetCommandOutput) => void + ): void; + public updateRegexMatchSet( + args: UpdateRegexMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateRegexMatchSetCommandOutput) => void), + cb?: (err: any, data?: UpdateRegexMatchSetCommandOutput) => void + ): Promise | void { + const command = new UpdateRegexMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes RegexPatternString objects in a RegexPatternSet. For each RegexPatternString object, + * you specify the following values:

+ *
    + *
  • + *

    Whether to insert or delete the RegexPatternString.

    + *
  • + *
  • + *

    The regular expression pattern that you want to insert or delete. For more information, see RegexPatternSet.

    + *
  • + *
+ *

For example, you can create a RegexPatternString such as B[a@]dB[o0]t. AWS WAF will match this RegexPatternString to:

+ *
    + *
  • + *

    BadBot

    + *
  • + *
  • + *

    BadB0t

    + *
  • + *
  • + *

    B@dBot

    + *
  • + *
  • + *

    B@dB0t

    + *
  • + *
+ *

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

+ *
    + *
  1. + *

    Create a RegexPatternSet. For more information, see CreateRegexPatternSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateRegexPatternSet request.

    + *
  4. + *
  5. + *

    Submit an UpdateRegexPatternSet request to specify the regular expression pattern that you want AWS WAF to watch for.

    + *
  6. + *
+ *

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

+ * + */ + public updateRegexPatternSet( + args: UpdateRegexPatternSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateRegexPatternSet( + args: UpdateRegexPatternSetCommandInput, + cb: (err: any, data?: UpdateRegexPatternSetCommandOutput) => void + ): void; + public updateRegexPatternSet( + args: UpdateRegexPatternSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateRegexPatternSetCommandOutput) => void + ): void; + public updateRegexPatternSet( + args: UpdateRegexPatternSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateRegexPatternSetCommandOutput) => void), + cb?: (err: any, data?: UpdateRegexPatternSetCommandOutput) => void + ): Promise | void { + const command = new UpdateRegexPatternSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes Predicate objects in a Rule. Each + * Predicate object identifies a predicate, such as a ByteMatchSet or an IPSet, that specifies the web requests + * that you want to allow, block, or count. If you add more than one predicate to a + * Rule, a request must match all of the specifications to be allowed, + * blocked, or counted. For example, suppose + * that + * you add the following to a Rule:

+ *
    + *
  • + *

    A ByteMatchSet that matches the value BadBot in the User-Agent header

    + *
  • + *
  • + *

    An IPSet that matches the IP address 192.0.2.44 + *

    + *
  • + *
+ *

You then add the Rule to a WebACL and specify that you want to block requests that satisfy the Rule. + * For a request to be blocked, the User-Agent header in the request must contain the value BadBot + * and the request must originate from the IP address 192.0.2.44.

+ *

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

+ *
    + *
  1. + *

    Create and update the predicates that you want to include in the Rule.

    + *
  2. + *
  3. + *

    Create the Rule. See CreateRule.

    + *
  4. + *
  5. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateRule request.

    + *
  6. + *
  7. + *

    Submit an UpdateRule request to add predicates to the Rule.

    + *
  8. + *
  9. + *

    Create and update a WebACL that contains the Rule. See CreateWebACL.

    + *
  10. + *
+ *

If you want to replace one ByteMatchSet or IPSet with another, you delete the existing one and + * add the new one.

+ *

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

+ * + */ + public updateRule( + args: UpdateRuleCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateRule( + args: UpdateRuleCommandInput, + cb: (err: any, data?: UpdateRuleCommandOutput) => void + ): void; + public updateRule( + args: UpdateRuleCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateRuleCommandOutput) => void + ): void; + public updateRule( + args: UpdateRuleCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateRuleCommandOutput) => void), + cb?: (err: any, data?: UpdateRuleCommandOutput) => void + ): Promise | void { + const command = new UpdateRuleCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes ActivatedRule objects in a RuleGroup.

+ *

You can only insert REGULAR rules into a rule group.

+ *

You can have a maximum of ten rules per rule group.

+ * + * + *

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

+ *
    + *
  1. + *

    Create and update the Rules that you want to include in the RuleGroup. See CreateRule.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateRuleGroup request.

    + *
  4. + *
  5. + *

    Submit an UpdateRuleGroup request to add Rules to the RuleGroup.

    + *
  6. + *
  7. + *

    Create and update a WebACL that contains the RuleGroup. See CreateWebACL.

    + *
  8. + *
+ *

If you want to replace one Rule with another, you delete the existing one and + * add the new one.

+ *

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

+ * + */ + public updateRuleGroup( + args: UpdateRuleGroupCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateRuleGroup( + args: UpdateRuleGroupCommandInput, + cb: (err: any, data?: UpdateRuleGroupCommandOutput) => void + ): void; + public updateRuleGroup( + args: UpdateRuleGroupCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateRuleGroupCommandOutput) => void + ): void; + public updateRuleGroup( + args: UpdateRuleGroupCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateRuleGroupCommandOutput) => void), + cb?: (err: any, data?: UpdateRuleGroupCommandOutput) => void + ): Promise | void { + const command = new UpdateRuleGroupCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes SizeConstraint objects (filters) in a SizeConstraintSet. For each SizeConstraint object, + * you specify the following values:

+ *
    + *
  • + *

    Whether to insert or delete the object from the array. If you want to change a SizeConstraintSetUpdate object, + * you delete the existing object and add a new one.

    + *
  • + *
  • + *

    The part of a web request that you want AWS WAF to evaluate, such as the length of a query string or the length of the + * User-Agent header.

    + *
  • + *
  • + *

    Whether to perform any transformations on the request, such as converting it to lowercase, before checking its length. + * Note that transformations of the request body are not supported because the AWS resource forwards only the first 8192 bytes + * of your request to AWS WAF.

    + *

    You can only specify a single type of TextTransformation.

    + *
  • + *
  • + *

    A ComparisonOperator used for evaluating the selected part of the request against the specified Size, such as + * equals, greater than, less than, and so on.

    + *
  • + *
  • + *

    The length, in bytes, that you want AWS WAF to watch for in selected part of the request. The length is computed after applying the transformation.

    + *
  • + *
+ *

For example, you can add a SizeConstraintSetUpdate object that matches web requests in which the length of the + * User-Agent header is greater than 100 bytes. You can then configure AWS WAF to block those requests.

+ *

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

+ *
    + *
  1. + *

    Create a SizeConstraintSet. For more information, see CreateSizeConstraintSet.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateSizeConstraintSet request.

    + *
  4. + *
  5. + *

    Submit an UpdateSizeConstraintSet request to specify the part of the request that you want AWS WAF to inspect + * (for example, the header or the URI) and the value that you want AWS WAF to watch for.

    + *
  6. + *
+ *

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

+ * + */ + public updateSizeConstraintSet( + args: UpdateSizeConstraintSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateSizeConstraintSet( + args: UpdateSizeConstraintSetCommandInput, + cb: (err: any, data?: UpdateSizeConstraintSetCommandOutput) => void + ): void; + public updateSizeConstraintSet( + args: UpdateSizeConstraintSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateSizeConstraintSetCommandOutput) => void + ): void; + public updateSizeConstraintSet( + args: UpdateSizeConstraintSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateSizeConstraintSetCommandOutput) => void), + cb?: (err: any, data?: UpdateSizeConstraintSetCommandOutput) => void + ): Promise | void { + const command = new UpdateSizeConstraintSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes SqlInjectionMatchTuple objects (filters) in a SqlInjectionMatchSet. + * For each SqlInjectionMatchTuple object, you specify the following values:

+ *
    + *
  • + *

    + * Action: Whether to insert the object into or delete the object from the array. To change a + * SqlInjectionMatchTuple, you delete the existing object and add a new one.

    + *
  • + *
  • + *

    + * FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, + * the name of the header or parameter.

    + *
  • + *
  • + *

    + * TextTransformation: Which text transformation, if any, to perform on the web request before + * inspecting the request for snippets of malicious SQL code.

    + *

    You can only specify a single type of TextTransformation.

    + *
  • + *
+ *

You use SqlInjectionMatchSet objects to specify which CloudFront + * requests that + * you want to allow, block, or count. For example, if you're receiving + * requests that contain snippets of SQL code in the query string and you want to block the + * requests, you can create a SqlInjectionMatchSet with the applicable settings, + * and then configure AWS WAF to block the requests.

+ *

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

+ *
    + *
  1. + *

    Submit a CreateSqlInjectionMatchSet request.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateIPSet request.

    + *
  4. + *
  5. + *

    Submit an UpdateSqlInjectionMatchSet request to specify the parts of web requests that you want AWS WAF to + * inspect for snippets of SQL code.

    + *
  6. + *
+ *

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

+ * + */ + public updateSqlInjectionMatchSet( + args: UpdateSqlInjectionMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateSqlInjectionMatchSet( + args: UpdateSqlInjectionMatchSetCommandInput, + cb: (err: any, data?: UpdateSqlInjectionMatchSetCommandOutput) => void + ): void; + public updateSqlInjectionMatchSet( + args: UpdateSqlInjectionMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateSqlInjectionMatchSetCommandOutput) => void + ): void; + public updateSqlInjectionMatchSet( + args: UpdateSqlInjectionMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateSqlInjectionMatchSetCommandOutput) => void), + cb?: (err: any, data?: UpdateSqlInjectionMatchSetCommandOutput) => void + ): Promise | void { + const command = new UpdateSqlInjectionMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes ActivatedRule objects in a WebACL. Each Rule identifies + * web requests that you want to allow, block, or count. When you update a WebACL, you specify the following values:

+ *
    + *
  • + *

    A default action for the WebACL, either ALLOW or BLOCK. + * AWS WAF performs the default action if a request doesn't match the criteria in any of the Rules in a WebACL.

    + *
  • + *
  • + *

    The Rules that you want to add + * or + * delete. If you want to replace one Rule with another, you delete the + * existing Rule and add the new one.

    + *
  • + *
  • + *

    For each Rule, whether you want AWS WAF to allow requests, block requests, or count requests that match + * the conditions in the Rule.

    + *
  • + *
  • + *

    The order in which you want AWS WAF to evaluate the Rules in a + * WebACL. If you add more than one Rule to a + * WebACL, AWS WAF evaluates each request against the Rules + * in order based on the value of Priority. (The Rule that has + * the lowest value for Priority is evaluated first.) When a web request + * matches all + * the + * predicates (such as ByteMatchSets and IPSets) in a + * Rule, AWS WAF immediately takes the corresponding action, allow or + * block, and doesn't evaluate the request against the remaining Rules in + * the WebACL, if any.

    + *
  • + *
+ * + *

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

+ *
    + *
  1. + *

    Create and update the predicates that you want to include in Rules. + * For more information, see CreateByteMatchSet, UpdateByteMatchSet, CreateIPSet, UpdateIPSet, + * CreateSqlInjectionMatchSet, and UpdateSqlInjectionMatchSet.

    + *
  2. + *
  3. + *

    Create and update the Rules that you want to include in the WebACL. For more information, see + * CreateRule and UpdateRule.

    + *
  4. + *
  5. + *

    Create a WebACL. See CreateWebACL.

    + *
  6. + *
  7. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateWebACL request.

    + *
  8. + *
  9. + *

    Submit an UpdateWebACL request to specify the Rules + * that you want to include in the WebACL, to specify the default action, + * and to associate the WebACL with a CloudFront distribution.

    + *

    The ActivatedRule can be a rule group. If you specify a rule group + * as your + * ActivatedRule, + * you can exclude specific rules from that rule group.

    + *

    If you already have a rule group associated with a web ACL and want to submit + * an UpdateWebACL request to exclude certain rules from that rule group, + * you must first remove the rule group from the web ACL, the re-insert it again, + * specifying the excluded rules. + * For details, + * see + * ActivatedRule$ExcludedRules. + *

    + *
  10. + *
+ *

Be aware that if you try to add a RATE_BASED rule to a web ACL without setting the rule type when first creating the rule, the UpdateWebACL request will fail because the request tries to add a REGULAR rule (the default rule type) with the specified ID, which does not exist.

+ *

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

+ * + */ + public updateWebACL( + args: UpdateWebACLCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateWebACL( + args: UpdateWebACLCommandInput, + cb: (err: any, data?: UpdateWebACLCommandOutput) => void + ): void; + public updateWebACL( + args: UpdateWebACLCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateWebACLCommandOutput) => void + ): void; + public updateWebACL( + args: UpdateWebACLCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateWebACLCommandOutput) => void), + cb?: (err: any, data?: UpdateWebACLCommandOutput) => void + ): Promise | void { + const command = new UpdateWebACLCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } + + /** + * + *

Inserts or deletes XssMatchTuple objects (filters) in an XssMatchSet. + * For each XssMatchTuple object, you specify the following values:

+ *
    + *
  • + *

    + * Action: Whether to insert the object into or delete the object from the + * array. To change an + * XssMatchTuple, you delete the existing object and add a new + * one.

    + *
  • + *
  • + *

    + * FieldToMatch: The part of web requests that you want AWS WAF to inspect and, if you want AWS WAF to inspect a header or custom query parameter, + * the name of the header or parameter.

    + *
  • + *
  • + *

    + * TextTransformation: Which text transformation, if any, to perform on the web request before + * inspecting the request for cross-site scripting attacks.

    + *

    You can only specify a single type of TextTransformation.

    + *
  • + *
+ *

You use XssMatchSet objects to specify which CloudFront requests + * that + * you want to allow, block, or count. For example, if you're receiving + * requests that contain cross-site scripting attacks in the request body and you want to + * block the requests, you can create an XssMatchSet with the applicable + * settings, and then configure AWS WAF to block the requests.

+ *

To create and configure an XssMatchSet, perform the following steps:

+ *
    + *
  1. + *

    Submit a CreateXssMatchSet request.

    + *
  2. + *
  3. + *

    Use GetChangeToken to get the change token that you provide in the ChangeToken parameter of an + * UpdateIPSet request.

    + *
  4. + *
  5. + *

    Submit an UpdateXssMatchSet request to specify the parts of web requests that you want AWS WAF to + * inspect for cross-site scripting attacks.

    + *
  6. + *
+ *

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

+ * + */ + public updateXssMatchSet( + args: UpdateXssMatchSetCommandInput, + options?: __HttpHandlerOptions + ): Promise; + public updateXssMatchSet( + args: UpdateXssMatchSetCommandInput, + cb: (err: any, data?: UpdateXssMatchSetCommandOutput) => void + ): void; + public updateXssMatchSet( + args: UpdateXssMatchSetCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: UpdateXssMatchSetCommandOutput) => void + ): void; + public updateXssMatchSet( + args: UpdateXssMatchSetCommandInput, + optionsOrCb?: + | __HttpHandlerOptions + | ((err: any, data?: UpdateXssMatchSetCommandOutput) => void), + cb?: (err: any, data?: UpdateXssMatchSetCommandOutput) => void + ): Promise | void { + const command = new UpdateXssMatchSetCommand(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); + } else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expect http options but get ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); + } else { + return this.send(command, optionsOrCb); + } + } +} diff --git a/clients/client-waf-regional/WAFRegionalClient.ts b/clients/client-waf-regional/WAFRegionalClient.ts new file mode 100644 index 000000000000..1c4716928256 --- /dev/null +++ b/clients/client-waf-regional/WAFRegionalClient.ts @@ -0,0 +1,515 @@ +import { + AssociateWebACLRequest, + AssociateWebACLResponse, + CreateByteMatchSetRequest, + CreateByteMatchSetResponse, + CreateGeoMatchSetRequest, + CreateGeoMatchSetResponse, + CreateIPSetRequest, + CreateIPSetResponse, + CreateRateBasedRuleRequest, + CreateRateBasedRuleResponse, + CreateRegexMatchSetRequest, + CreateRegexMatchSetResponse, + CreateRegexPatternSetRequest, + CreateRegexPatternSetResponse, + CreateRuleGroupRequest, + CreateRuleGroupResponse, + CreateRuleRequest, + CreateRuleResponse, + CreateSizeConstraintSetRequest, + CreateSizeConstraintSetResponse, + CreateSqlInjectionMatchSetRequest, + CreateSqlInjectionMatchSetResponse, + CreateWebACLRequest, + CreateWebACLResponse, + CreateXssMatchSetRequest, + CreateXssMatchSetResponse, + DeleteByteMatchSetRequest, + DeleteByteMatchSetResponse, + DeleteGeoMatchSetRequest, + DeleteGeoMatchSetResponse, + DeleteIPSetRequest, + DeleteIPSetResponse, + DeleteLoggingConfigurationRequest, + DeleteLoggingConfigurationResponse, + DeletePermissionPolicyRequest, + DeletePermissionPolicyResponse, + DeleteRateBasedRuleRequest, + DeleteRateBasedRuleResponse, + DeleteRegexMatchSetRequest, + DeleteRegexMatchSetResponse, + DeleteRegexPatternSetRequest, + DeleteRegexPatternSetResponse, + DeleteRuleGroupRequest, + DeleteRuleGroupResponse, + DeleteRuleRequest, + DeleteRuleResponse, + DeleteSizeConstraintSetRequest, + DeleteSizeConstraintSetResponse, + DeleteSqlInjectionMatchSetRequest, + DeleteSqlInjectionMatchSetResponse, + DeleteWebACLRequest, + DeleteWebACLResponse, + DeleteXssMatchSetRequest, + DeleteXssMatchSetResponse, + DisassociateWebACLRequest, + DisassociateWebACLResponse, + GetByteMatchSetRequest, + GetByteMatchSetResponse, + GetChangeTokenRequest, + GetChangeTokenResponse, + GetChangeTokenStatusRequest, + GetChangeTokenStatusResponse, + GetGeoMatchSetRequest, + GetGeoMatchSetResponse, + GetIPSetRequest, + GetIPSetResponse, + GetLoggingConfigurationRequest, + GetLoggingConfigurationResponse, + GetPermissionPolicyRequest, + GetPermissionPolicyResponse, + GetRateBasedRuleManagedKeysRequest, + GetRateBasedRuleManagedKeysResponse, + GetRateBasedRuleRequest, + GetRateBasedRuleResponse, + GetRegexMatchSetRequest, + GetRegexMatchSetResponse, + GetRegexPatternSetRequest, + GetRegexPatternSetResponse, + GetRuleGroupRequest, + GetRuleGroupResponse, + GetRuleRequest, + GetRuleResponse, + GetSampledRequestsRequest, + GetSampledRequestsResponse, + GetSizeConstraintSetRequest, + GetSizeConstraintSetResponse, + GetSqlInjectionMatchSetRequest, + GetSqlInjectionMatchSetResponse, + GetWebACLForResourceRequest, + GetWebACLForResourceResponse, + GetWebACLRequest, + GetWebACLResponse, + GetXssMatchSetRequest, + GetXssMatchSetResponse, + ListActivatedRulesInRuleGroupRequest, + ListActivatedRulesInRuleGroupResponse, + ListByteMatchSetsRequest, + ListByteMatchSetsResponse, + ListGeoMatchSetsRequest, + ListGeoMatchSetsResponse, + ListIPSetsRequest, + ListIPSetsResponse, + ListLoggingConfigurationsRequest, + ListLoggingConfigurationsResponse, + ListRateBasedRulesRequest, + ListRateBasedRulesResponse, + ListRegexMatchSetsRequest, + ListRegexMatchSetsResponse, + ListRegexPatternSetsRequest, + ListRegexPatternSetsResponse, + ListResourcesForWebACLRequest, + ListResourcesForWebACLResponse, + ListRuleGroupsRequest, + ListRuleGroupsResponse, + ListRulesRequest, + ListRulesResponse, + ListSizeConstraintSetsRequest, + ListSizeConstraintSetsResponse, + ListSqlInjectionMatchSetsRequest, + ListSqlInjectionMatchSetsResponse, + ListSubscribedRuleGroupsRequest, + ListSubscribedRuleGroupsResponse, + ListTagsForResourceRequest, + ListTagsForResourceResponse, + ListWebACLsRequest, + ListWebACLsResponse, + ListXssMatchSetsRequest, + ListXssMatchSetsResponse, + PutLoggingConfigurationRequest, + PutLoggingConfigurationResponse, + PutPermissionPolicyRequest, + PutPermissionPolicyResponse, + TagResourceRequest, + TagResourceResponse, + UntagResourceRequest, + UntagResourceResponse, + UpdateByteMatchSetRequest, + UpdateByteMatchSetResponse, + UpdateGeoMatchSetRequest, + UpdateGeoMatchSetResponse, + UpdateIPSetRequest, + UpdateIPSetResponse, + UpdateRateBasedRuleRequest, + UpdateRateBasedRuleResponse, + UpdateRegexMatchSetRequest, + UpdateRegexMatchSetResponse, + UpdateRegexPatternSetRequest, + UpdateRegexPatternSetResponse, + UpdateRuleGroupRequest, + UpdateRuleGroupResponse, + UpdateRuleRequest, + UpdateRuleResponse, + UpdateSizeConstraintSetRequest, + UpdateSizeConstraintSetResponse, + UpdateSqlInjectionMatchSetRequest, + UpdateSqlInjectionMatchSetResponse, + UpdateWebACLRequest, + UpdateWebACLResponse, + UpdateXssMatchSetRequest, + UpdateXssMatchSetResponse +} from "./models/index"; +import { ClientDefaultValues as __ClientDefaultValues } from "./runtimeConfig"; +import { + EndpointsInputConfig, + EndpointsResolvedConfig, + RegionInputConfig, + RegionResolvedConfig, + resolveEndpointsConfig, + resolveRegionConfig +} from "@aws-sdk/config-resolver"; +import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length"; +import { + HostHeaderInputConfig, + HostHeaderResolvedConfig, + getHostHeaderPlugin, + resolveHostHeaderConfig +} from "@aws-sdk/middleware-host-header"; +import { + RetryInputConfig, + RetryResolvedConfig, + getRetryPlugin, + resolveRetryConfig +} from "@aws-sdk/middleware-retry"; +import { + AwsAuthInputConfig, + AwsAuthResolvedConfig, + getAwsAuthPlugin, + resolveAwsAuthConfig +} from "@aws-sdk/middleware-signing"; +import { + UserAgentInputConfig, + UserAgentResolvedConfig, + getUserAgentPlugin, + resolveUserAgentConfig +} from "@aws-sdk/middleware-user-agent"; +import { HttpHandler as __HttpHandler } from "@aws-sdk/protocol-http"; +import { + Client as __Client, + SmithyConfiguration as __SmithyConfiguration, + SmithyResolvedConfiguration as __SmithyResolvedConfiguration +} from "@aws-sdk/smithy-client"; +import { + RegionInfoProvider, + Credentials as __Credentials, + Decoder as __Decoder, + Encoder as __Encoder, + HashConstructor as __HashConstructor, + HttpHandlerOptions as __HttpHandlerOptions, + Provider as __Provider, + StreamCollector as __StreamCollector, + UrlParser as __UrlParser +} from "@aws-sdk/types"; + +export type ServiceInputTypes = + | AssociateWebACLRequest + | CreateByteMatchSetRequest + | CreateGeoMatchSetRequest + | CreateIPSetRequest + | CreateRateBasedRuleRequest + | CreateRegexMatchSetRequest + | CreateRegexPatternSetRequest + | CreateRuleGroupRequest + | CreateRuleRequest + | CreateSizeConstraintSetRequest + | CreateSqlInjectionMatchSetRequest + | CreateWebACLRequest + | CreateXssMatchSetRequest + | DeleteByteMatchSetRequest + | DeleteGeoMatchSetRequest + | DeleteIPSetRequest + | DeleteLoggingConfigurationRequest + | DeletePermissionPolicyRequest + | DeleteRateBasedRuleRequest + | DeleteRegexMatchSetRequest + | DeleteRegexPatternSetRequest + | DeleteRuleGroupRequest + | DeleteRuleRequest + | DeleteSizeConstraintSetRequest + | DeleteSqlInjectionMatchSetRequest + | DeleteWebACLRequest + | DeleteXssMatchSetRequest + | DisassociateWebACLRequest + | GetByteMatchSetRequest + | GetChangeTokenRequest + | GetChangeTokenStatusRequest + | GetGeoMatchSetRequest + | GetIPSetRequest + | GetLoggingConfigurationRequest + | GetPermissionPolicyRequest + | GetRateBasedRuleManagedKeysRequest + | GetRateBasedRuleRequest + | GetRegexMatchSetRequest + | GetRegexPatternSetRequest + | GetRuleGroupRequest + | GetRuleRequest + | GetSampledRequestsRequest + | GetSizeConstraintSetRequest + | GetSqlInjectionMatchSetRequest + | GetWebACLForResourceRequest + | GetWebACLRequest + | GetXssMatchSetRequest + | ListActivatedRulesInRuleGroupRequest + | ListByteMatchSetsRequest + | ListGeoMatchSetsRequest + | ListIPSetsRequest + | ListLoggingConfigurationsRequest + | ListRateBasedRulesRequest + | ListRegexMatchSetsRequest + | ListRegexPatternSetsRequest + | ListResourcesForWebACLRequest + | ListRuleGroupsRequest + | ListRulesRequest + | ListSizeConstraintSetsRequest + | ListSqlInjectionMatchSetsRequest + | ListSubscribedRuleGroupsRequest + | ListTagsForResourceRequest + | ListWebACLsRequest + | ListXssMatchSetsRequest + | PutLoggingConfigurationRequest + | PutPermissionPolicyRequest + | TagResourceRequest + | UntagResourceRequest + | UpdateByteMatchSetRequest + | UpdateGeoMatchSetRequest + | UpdateIPSetRequest + | UpdateRateBasedRuleRequest + | UpdateRegexMatchSetRequest + | UpdateRegexPatternSetRequest + | UpdateRuleGroupRequest + | UpdateRuleRequest + | UpdateSizeConstraintSetRequest + | UpdateSqlInjectionMatchSetRequest + | UpdateWebACLRequest + | UpdateXssMatchSetRequest; + +export type ServiceOutputTypes = + | AssociateWebACLResponse + | CreateByteMatchSetResponse + | CreateGeoMatchSetResponse + | CreateIPSetResponse + | CreateRateBasedRuleResponse + | CreateRegexMatchSetResponse + | CreateRegexPatternSetResponse + | CreateRuleGroupResponse + | CreateRuleResponse + | CreateSizeConstraintSetResponse + | CreateSqlInjectionMatchSetResponse + | CreateWebACLResponse + | CreateXssMatchSetResponse + | DeleteByteMatchSetResponse + | DeleteGeoMatchSetResponse + | DeleteIPSetResponse + | DeleteLoggingConfigurationResponse + | DeletePermissionPolicyResponse + | DeleteRateBasedRuleResponse + | DeleteRegexMatchSetResponse + | DeleteRegexPatternSetResponse + | DeleteRuleGroupResponse + | DeleteRuleResponse + | DeleteSizeConstraintSetResponse + | DeleteSqlInjectionMatchSetResponse + | DeleteWebACLResponse + | DeleteXssMatchSetResponse + | DisassociateWebACLResponse + | GetByteMatchSetResponse + | GetChangeTokenResponse + | GetChangeTokenStatusResponse + | GetGeoMatchSetResponse + | GetIPSetResponse + | GetLoggingConfigurationResponse + | GetPermissionPolicyResponse + | GetRateBasedRuleManagedKeysResponse + | GetRateBasedRuleResponse + | GetRegexMatchSetResponse + | GetRegexPatternSetResponse + | GetRuleGroupResponse + | GetRuleResponse + | GetSampledRequestsResponse + | GetSizeConstraintSetResponse + | GetSqlInjectionMatchSetResponse + | GetWebACLForResourceResponse + | GetWebACLResponse + | GetXssMatchSetResponse + | ListActivatedRulesInRuleGroupResponse + | ListByteMatchSetsResponse + | ListGeoMatchSetsResponse + | ListIPSetsResponse + | ListLoggingConfigurationsResponse + | ListRateBasedRulesResponse + | ListRegexMatchSetsResponse + | ListRegexPatternSetsResponse + | ListResourcesForWebACLResponse + | ListRuleGroupsResponse + | ListRulesResponse + | ListSizeConstraintSetsResponse + | ListSqlInjectionMatchSetsResponse + | ListSubscribedRuleGroupsResponse + | ListTagsForResourceResponse + | ListWebACLsResponse + | ListXssMatchSetsResponse + | PutLoggingConfigurationResponse + | PutPermissionPolicyResponse + | TagResourceResponse + | UntagResourceResponse + | UpdateByteMatchSetResponse + | UpdateGeoMatchSetResponse + | UpdateIPSetResponse + | UpdateRateBasedRuleResponse + | UpdateRegexMatchSetResponse + | UpdateRegexPatternSetResponse + | UpdateRuleGroupResponse + | UpdateRuleResponse + | UpdateSizeConstraintSetResponse + | UpdateSqlInjectionMatchSetResponse + | UpdateWebACLResponse + | UpdateXssMatchSetResponse; + +export interface ClientDefaults + extends Partial<__SmithyResolvedConfiguration<__HttpHandlerOptions>> { + /** + * The HTTP handler to use. Fetch in browser and Https in Nodejs. + */ + requestHandler?: __HttpHandler; + + /** + * A constructor for a class implementing the @aws-sdk/types.Hash interface + * that computes the SHA-256 HMAC or checksum of a string or binary buffer. + */ + sha256?: __HashConstructor; + + /** + * The function that will be used to convert strings into HTTP endpoints. + */ + urlParser?: __UrlParser; + + /** + * A function that can calculate the length of a request body. + */ + bodyLengthChecker?: (body: any) => number | undefined; + + /** + * A function that converts a stream into an array of bytes. + */ + streamCollector?: __StreamCollector; + + /** + * The function that will be used to convert a base64-encoded string to a byte array + */ + base64Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a base64-encoded string + */ + base64Encoder?: __Encoder; + + /** + * The function that will be used to convert a UTF8-encoded string to a byte array + */ + utf8Decoder?: __Decoder; + + /** + * The function that will be used to convert binary data to a UTF-8 encoded string + */ + utf8Encoder?: __Encoder; + + /** + * The string that will be used to populate default value in 'User-Agent' header + */ + defaultUserAgent?: string; + + /** + * The runtime environment + */ + runtime?: string; + + /** + * The service name with which to sign requests. + */ + signingName?: string; + + /** + * Default credentials provider; Not available in browser runtime + */ + credentialDefaultProvider?: (input: any) => __Provider<__Credentials>; + + /** + * Provider function that return promise of a region string + */ + regionDefaultProvider?: (input: any) => __Provider; + + /** + * Fetch related hostname, signing name or signing region with given region. + */ + regionInfoProvider?: RegionInfoProvider; +} + +export type WAFRegionalClientConfig = Partial< + __SmithyConfiguration<__HttpHandlerOptions> +> & + ClientDefaults & + RegionInputConfig & + EndpointsInputConfig & + AwsAuthInputConfig & + RetryInputConfig & + UserAgentInputConfig & + HostHeaderInputConfig; + +export type WAFRegionalClientResolvedConfig = __SmithyResolvedConfiguration< + __HttpHandlerOptions +> & + Required & + RegionResolvedConfig & + EndpointsResolvedConfig & + AwsAuthResolvedConfig & + RetryResolvedConfig & + UserAgentResolvedConfig & + HostHeaderResolvedConfig; + +/** + * + *

This is the AWS WAF Regional API Reference for using AWS WAF with Elastic Load Balancing (ELB) Application Load Balancers. The AWS WAF actions and data types listed in the reference are available for protecting Application Load Balancers. You can use these actions and data types by means of the endpoints listed in AWS Regions and Endpoints. This guide is for developers who need detailed information about the AWS WAF API actions, data types, and errors. For detailed information about AWS WAF features and an overview of how to use the AWS WAF API, see the + * AWS WAF Developer Guide.

+ * + */ +export class WAFRegionalClient extends __Client< + __HttpHandlerOptions, + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +> { + readonly config: WAFRegionalClientResolvedConfig; + + constructor(configuration: WAFRegionalClientConfig) { + let _config_0 = { + ...__ClientDefaultValues, + ...configuration + }; + let _config_1 = resolveRegionConfig(_config_0); + let _config_2 = resolveEndpointsConfig(_config_1); + let _config_3 = resolveAwsAuthConfig(_config_2); + let _config_4 = resolveRetryConfig(_config_3); + let _config_5 = resolveUserAgentConfig(_config_4); + let _config_6 = resolveHostHeaderConfig(_config_5); + super(_config_6); + this.config = _config_6; + this.middlewareStack.use(getAwsAuthPlugin(this.config)); + this.middlewareStack.use(getRetryPlugin(this.config)); + this.middlewareStack.use(getUserAgentPlugin(this.config)); + this.middlewareStack.use(getContentLengthPlugin(this.config)); + this.middlewareStack.use(getHostHeaderPlugin(this.config)); + } + + destroy(): void {} +} diff --git a/clients/client-waf-regional/commands/AssociateWebACLCommand.ts b/clients/client-waf-regional/commands/AssociateWebACLCommand.ts new file mode 100644 index 000000000000..01a195b80a89 --- /dev/null +++ b/clients/client-waf-regional/commands/AssociateWebACLCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + AssociateWebACLRequest, + AssociateWebACLResponse +} from "../models/index"; +import { + deserializeAws_json1_1AssociateWebACLCommand, + serializeAws_json1_1AssociateWebACLCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type AssociateWebACLCommandInput = AssociateWebACLRequest; +export type AssociateWebACLCommandOutput = AssociateWebACLResponse; + +export class AssociateWebACLCommand extends $Command< + AssociateWebACLCommandInput, + AssociateWebACLCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: AssociateWebACLCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: AssociateWebACLCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1AssociateWebACLCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1AssociateWebACLCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateByteMatchSetCommand.ts b/clients/client-waf-regional/commands/CreateByteMatchSetCommand.ts new file mode 100644 index 000000000000..bd3258241fc4 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateByteMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + CreateByteMatchSetRequest, + CreateByteMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1CreateByteMatchSetCommand, + serializeAws_json1_1CreateByteMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateByteMatchSetCommandInput = CreateByteMatchSetRequest; +export type CreateByteMatchSetCommandOutput = CreateByteMatchSetResponse; + +export class CreateByteMatchSetCommand extends $Command< + CreateByteMatchSetCommandInput, + CreateByteMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateByteMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateByteMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateByteMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateByteMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateGeoMatchSetCommand.ts b/clients/client-waf-regional/commands/CreateGeoMatchSetCommand.ts new file mode 100644 index 000000000000..64ec0101f1ec --- /dev/null +++ b/clients/client-waf-regional/commands/CreateGeoMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + CreateGeoMatchSetRequest, + CreateGeoMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1CreateGeoMatchSetCommand, + serializeAws_json1_1CreateGeoMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateGeoMatchSetCommandInput = CreateGeoMatchSetRequest; +export type CreateGeoMatchSetCommandOutput = CreateGeoMatchSetResponse; + +export class CreateGeoMatchSetCommand extends $Command< + CreateGeoMatchSetCommandInput, + CreateGeoMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateGeoMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateGeoMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateGeoMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateGeoMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateIPSetCommand.ts b/clients/client-waf-regional/commands/CreateIPSetCommand.ts new file mode 100644 index 000000000000..9b6ac7eb9d15 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateIPSetCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { CreateIPSetRequest, CreateIPSetResponse } from "../models/index"; +import { + deserializeAws_json1_1CreateIPSetCommand, + serializeAws_json1_1CreateIPSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateIPSetCommandInput = CreateIPSetRequest; +export type CreateIPSetCommandOutput = CreateIPSetResponse; + +export class CreateIPSetCommand extends $Command< + CreateIPSetCommandInput, + CreateIPSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateIPSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateIPSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateIPSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateIPSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateRateBasedRuleCommand.ts b/clients/client-waf-regional/commands/CreateRateBasedRuleCommand.ts new file mode 100644 index 000000000000..b6126e3eb3a2 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateRateBasedRuleCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + CreateRateBasedRuleRequest, + CreateRateBasedRuleResponse +} from "../models/index"; +import { + deserializeAws_json1_1CreateRateBasedRuleCommand, + serializeAws_json1_1CreateRateBasedRuleCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateRateBasedRuleCommandInput = CreateRateBasedRuleRequest; +export type CreateRateBasedRuleCommandOutput = CreateRateBasedRuleResponse; + +export class CreateRateBasedRuleCommand extends $Command< + CreateRateBasedRuleCommandInput, + CreateRateBasedRuleCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateRateBasedRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateRateBasedRuleCommandInput, + CreateRateBasedRuleCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateRateBasedRuleCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateRateBasedRuleCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateRateBasedRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateRegexMatchSetCommand.ts b/clients/client-waf-regional/commands/CreateRegexMatchSetCommand.ts new file mode 100644 index 000000000000..dea0bf0f1d5b --- /dev/null +++ b/clients/client-waf-regional/commands/CreateRegexMatchSetCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + CreateRegexMatchSetRequest, + CreateRegexMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1CreateRegexMatchSetCommand, + serializeAws_json1_1CreateRegexMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateRegexMatchSetCommandInput = CreateRegexMatchSetRequest; +export type CreateRegexMatchSetCommandOutput = CreateRegexMatchSetResponse; + +export class CreateRegexMatchSetCommand extends $Command< + CreateRegexMatchSetCommandInput, + CreateRegexMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateRegexMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateRegexMatchSetCommandInput, + CreateRegexMatchSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateRegexMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateRegexMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateRegexMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateRegexPatternSetCommand.ts b/clients/client-waf-regional/commands/CreateRegexPatternSetCommand.ts new file mode 100644 index 000000000000..1a00102ace30 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateRegexPatternSetCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + CreateRegexPatternSetRequest, + CreateRegexPatternSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1CreateRegexPatternSetCommand, + serializeAws_json1_1CreateRegexPatternSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateRegexPatternSetCommandInput = CreateRegexPatternSetRequest; +export type CreateRegexPatternSetCommandOutput = CreateRegexPatternSetResponse; + +export class CreateRegexPatternSetCommand extends $Command< + CreateRegexPatternSetCommandInput, + CreateRegexPatternSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateRegexPatternSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateRegexPatternSetCommandInput, + CreateRegexPatternSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateRegexPatternSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateRegexPatternSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateRegexPatternSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateRuleCommand.ts b/clients/client-waf-regional/commands/CreateRuleCommand.ts new file mode 100644 index 000000000000..7d4012d6d112 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateRuleCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { CreateRuleRequest, CreateRuleResponse } from "../models/index"; +import { + deserializeAws_json1_1CreateRuleCommand, + serializeAws_json1_1CreateRuleCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateRuleCommandInput = CreateRuleRequest; +export type CreateRuleCommandOutput = CreateRuleResponse; + +export class CreateRuleCommand extends $Command< + CreateRuleCommandInput, + CreateRuleCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateRuleCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateRuleCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateRuleGroupCommand.ts b/clients/client-waf-regional/commands/CreateRuleGroupCommand.ts new file mode 100644 index 000000000000..80bfc42bea80 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateRuleGroupCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + CreateRuleGroupRequest, + CreateRuleGroupResponse +} from "../models/index"; +import { + deserializeAws_json1_1CreateRuleGroupCommand, + serializeAws_json1_1CreateRuleGroupCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateRuleGroupCommandInput = CreateRuleGroupRequest; +export type CreateRuleGroupCommandOutput = CreateRuleGroupResponse; + +export class CreateRuleGroupCommand extends $Command< + CreateRuleGroupCommandInput, + CreateRuleGroupCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateRuleGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateRuleGroupCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateRuleGroupCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateRuleGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateSizeConstraintSetCommand.ts b/clients/client-waf-regional/commands/CreateSizeConstraintSetCommand.ts new file mode 100644 index 000000000000..49d2a9855b11 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateSizeConstraintSetCommand.ts @@ -0,0 +1,90 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + CreateSizeConstraintSetRequest, + CreateSizeConstraintSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1CreateSizeConstraintSetCommand, + serializeAws_json1_1CreateSizeConstraintSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateSizeConstraintSetCommandInput = CreateSizeConstraintSetRequest; +export type CreateSizeConstraintSetCommandOutput = CreateSizeConstraintSetResponse; + +export class CreateSizeConstraintSetCommand extends $Command< + CreateSizeConstraintSetCommandInput, + CreateSizeConstraintSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateSizeConstraintSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateSizeConstraintSetCommandInput, + CreateSizeConstraintSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateSizeConstraintSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateSizeConstraintSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateSizeConstraintSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateSqlInjectionMatchSetCommand.ts b/clients/client-waf-regional/commands/CreateSqlInjectionMatchSetCommand.ts new file mode 100644 index 000000000000..0286ea820b79 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateSqlInjectionMatchSetCommand.ts @@ -0,0 +1,93 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + CreateSqlInjectionMatchSetRequest, + CreateSqlInjectionMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1CreateSqlInjectionMatchSetCommand, + serializeAws_json1_1CreateSqlInjectionMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateSqlInjectionMatchSetCommandInput = CreateSqlInjectionMatchSetRequest; +export type CreateSqlInjectionMatchSetCommandOutput = CreateSqlInjectionMatchSetResponse; + +export class CreateSqlInjectionMatchSetCommand extends $Command< + CreateSqlInjectionMatchSetCommandInput, + CreateSqlInjectionMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateSqlInjectionMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + CreateSqlInjectionMatchSetCommandInput, + CreateSqlInjectionMatchSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateSqlInjectionMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateSqlInjectionMatchSetCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateSqlInjectionMatchSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateWebACLCommand.ts b/clients/client-waf-regional/commands/CreateWebACLCommand.ts new file mode 100644 index 000000000000..ec3d95bb7f79 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateWebACLCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { CreateWebACLRequest, CreateWebACLResponse } from "../models/index"; +import { + deserializeAws_json1_1CreateWebACLCommand, + serializeAws_json1_1CreateWebACLCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateWebACLCommandInput = CreateWebACLRequest; +export type CreateWebACLCommandOutput = CreateWebACLResponse; + +export class CreateWebACLCommand extends $Command< + CreateWebACLCommandInput, + CreateWebACLCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateWebACLCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateWebACLCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateWebACLCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateWebACLCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/CreateXssMatchSetCommand.ts b/clients/client-waf-regional/commands/CreateXssMatchSetCommand.ts new file mode 100644 index 000000000000..d4b3c18456a9 --- /dev/null +++ b/clients/client-waf-regional/commands/CreateXssMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + CreateXssMatchSetRequest, + CreateXssMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1CreateXssMatchSetCommand, + serializeAws_json1_1CreateXssMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type CreateXssMatchSetCommandInput = CreateXssMatchSetRequest; +export type CreateXssMatchSetCommandOutput = CreateXssMatchSetResponse; + +export class CreateXssMatchSetCommand extends $Command< + CreateXssMatchSetCommandInput, + CreateXssMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: CreateXssMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: CreateXssMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1CreateXssMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1CreateXssMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteByteMatchSetCommand.ts b/clients/client-waf-regional/commands/DeleteByteMatchSetCommand.ts new file mode 100644 index 000000000000..7ed7408e1be2 --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteByteMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteByteMatchSetRequest, + DeleteByteMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteByteMatchSetCommand, + serializeAws_json1_1DeleteByteMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteByteMatchSetCommandInput = DeleteByteMatchSetRequest; +export type DeleteByteMatchSetCommandOutput = DeleteByteMatchSetResponse; + +export class DeleteByteMatchSetCommand extends $Command< + DeleteByteMatchSetCommandInput, + DeleteByteMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteByteMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteByteMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteByteMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteByteMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteGeoMatchSetCommand.ts b/clients/client-waf-regional/commands/DeleteGeoMatchSetCommand.ts new file mode 100644 index 000000000000..c606bd985956 --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteGeoMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteGeoMatchSetRequest, + DeleteGeoMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteGeoMatchSetCommand, + serializeAws_json1_1DeleteGeoMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteGeoMatchSetCommandInput = DeleteGeoMatchSetRequest; +export type DeleteGeoMatchSetCommandOutput = DeleteGeoMatchSetResponse; + +export class DeleteGeoMatchSetCommand extends $Command< + DeleteGeoMatchSetCommandInput, + DeleteGeoMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteGeoMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteGeoMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteGeoMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteGeoMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteIPSetCommand.ts b/clients/client-waf-regional/commands/DeleteIPSetCommand.ts new file mode 100644 index 000000000000..36cea7b30fe3 --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteIPSetCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { DeleteIPSetRequest, DeleteIPSetResponse } from "../models/index"; +import { + deserializeAws_json1_1DeleteIPSetCommand, + serializeAws_json1_1DeleteIPSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteIPSetCommandInput = DeleteIPSetRequest; +export type DeleteIPSetCommandOutput = DeleteIPSetResponse; + +export class DeleteIPSetCommand extends $Command< + DeleteIPSetCommandInput, + DeleteIPSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteIPSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteIPSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteIPSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteIPSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteLoggingConfigurationCommand.ts b/clients/client-waf-regional/commands/DeleteLoggingConfigurationCommand.ts new file mode 100644 index 000000000000..07083a51d71b --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteLoggingConfigurationCommand.ts @@ -0,0 +1,93 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteLoggingConfigurationRequest, + DeleteLoggingConfigurationResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteLoggingConfigurationCommand, + serializeAws_json1_1DeleteLoggingConfigurationCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteLoggingConfigurationCommandInput = DeleteLoggingConfigurationRequest; +export type DeleteLoggingConfigurationCommandOutput = DeleteLoggingConfigurationResponse; + +export class DeleteLoggingConfigurationCommand extends $Command< + DeleteLoggingConfigurationCommandInput, + DeleteLoggingConfigurationCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteLoggingConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteLoggingConfigurationCommandInput, + DeleteLoggingConfigurationCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteLoggingConfigurationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteLoggingConfigurationCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteLoggingConfigurationCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeletePermissionPolicyCommand.ts b/clients/client-waf-regional/commands/DeletePermissionPolicyCommand.ts new file mode 100644 index 000000000000..6bdc90ef1606 --- /dev/null +++ b/clients/client-waf-regional/commands/DeletePermissionPolicyCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeletePermissionPolicyRequest, + DeletePermissionPolicyResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeletePermissionPolicyCommand, + serializeAws_json1_1DeletePermissionPolicyCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeletePermissionPolicyCommandInput = DeletePermissionPolicyRequest; +export type DeletePermissionPolicyCommandOutput = DeletePermissionPolicyResponse; + +export class DeletePermissionPolicyCommand extends $Command< + DeletePermissionPolicyCommandInput, + DeletePermissionPolicyCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeletePermissionPolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeletePermissionPolicyCommandInput, + DeletePermissionPolicyCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeletePermissionPolicyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeletePermissionPolicyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeletePermissionPolicyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteRateBasedRuleCommand.ts b/clients/client-waf-regional/commands/DeleteRateBasedRuleCommand.ts new file mode 100644 index 000000000000..19a98dbd114f --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteRateBasedRuleCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteRateBasedRuleRequest, + DeleteRateBasedRuleResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteRateBasedRuleCommand, + serializeAws_json1_1DeleteRateBasedRuleCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteRateBasedRuleCommandInput = DeleteRateBasedRuleRequest; +export type DeleteRateBasedRuleCommandOutput = DeleteRateBasedRuleResponse; + +export class DeleteRateBasedRuleCommand extends $Command< + DeleteRateBasedRuleCommandInput, + DeleteRateBasedRuleCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteRateBasedRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteRateBasedRuleCommandInput, + DeleteRateBasedRuleCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteRateBasedRuleCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteRateBasedRuleCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteRateBasedRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteRegexMatchSetCommand.ts b/clients/client-waf-regional/commands/DeleteRegexMatchSetCommand.ts new file mode 100644 index 000000000000..7b336fcbdb49 --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteRegexMatchSetCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteRegexMatchSetRequest, + DeleteRegexMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteRegexMatchSetCommand, + serializeAws_json1_1DeleteRegexMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteRegexMatchSetCommandInput = DeleteRegexMatchSetRequest; +export type DeleteRegexMatchSetCommandOutput = DeleteRegexMatchSetResponse; + +export class DeleteRegexMatchSetCommand extends $Command< + DeleteRegexMatchSetCommandInput, + DeleteRegexMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteRegexMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteRegexMatchSetCommandInput, + DeleteRegexMatchSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteRegexMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteRegexMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteRegexMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteRegexPatternSetCommand.ts b/clients/client-waf-regional/commands/DeleteRegexPatternSetCommand.ts new file mode 100644 index 000000000000..56a1fc5a84ff --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteRegexPatternSetCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteRegexPatternSetRequest, + DeleteRegexPatternSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteRegexPatternSetCommand, + serializeAws_json1_1DeleteRegexPatternSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteRegexPatternSetCommandInput = DeleteRegexPatternSetRequest; +export type DeleteRegexPatternSetCommandOutput = DeleteRegexPatternSetResponse; + +export class DeleteRegexPatternSetCommand extends $Command< + DeleteRegexPatternSetCommandInput, + DeleteRegexPatternSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteRegexPatternSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteRegexPatternSetCommandInput, + DeleteRegexPatternSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteRegexPatternSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteRegexPatternSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteRegexPatternSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteRuleCommand.ts b/clients/client-waf-regional/commands/DeleteRuleCommand.ts new file mode 100644 index 000000000000..aaa976a97509 --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteRuleCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { DeleteRuleRequest, DeleteRuleResponse } from "../models/index"; +import { + deserializeAws_json1_1DeleteRuleCommand, + serializeAws_json1_1DeleteRuleCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteRuleCommandInput = DeleteRuleRequest; +export type DeleteRuleCommandOutput = DeleteRuleResponse; + +export class DeleteRuleCommand extends $Command< + DeleteRuleCommandInput, + DeleteRuleCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteRuleCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteRuleCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteRuleGroupCommand.ts b/clients/client-waf-regional/commands/DeleteRuleGroupCommand.ts new file mode 100644 index 000000000000..9a2acf96d920 --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteRuleGroupCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteRuleGroupRequest, + DeleteRuleGroupResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteRuleGroupCommand, + serializeAws_json1_1DeleteRuleGroupCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteRuleGroupCommandInput = DeleteRuleGroupRequest; +export type DeleteRuleGroupCommandOutput = DeleteRuleGroupResponse; + +export class DeleteRuleGroupCommand extends $Command< + DeleteRuleGroupCommandInput, + DeleteRuleGroupCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteRuleGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteRuleGroupCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteRuleGroupCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteRuleGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteSizeConstraintSetCommand.ts b/clients/client-waf-regional/commands/DeleteSizeConstraintSetCommand.ts new file mode 100644 index 000000000000..d38da8833051 --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteSizeConstraintSetCommand.ts @@ -0,0 +1,90 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteSizeConstraintSetRequest, + DeleteSizeConstraintSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteSizeConstraintSetCommand, + serializeAws_json1_1DeleteSizeConstraintSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteSizeConstraintSetCommandInput = DeleteSizeConstraintSetRequest; +export type DeleteSizeConstraintSetCommandOutput = DeleteSizeConstraintSetResponse; + +export class DeleteSizeConstraintSetCommand extends $Command< + DeleteSizeConstraintSetCommandInput, + DeleteSizeConstraintSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteSizeConstraintSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteSizeConstraintSetCommandInput, + DeleteSizeConstraintSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteSizeConstraintSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteSizeConstraintSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteSizeConstraintSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteSqlInjectionMatchSetCommand.ts b/clients/client-waf-regional/commands/DeleteSqlInjectionMatchSetCommand.ts new file mode 100644 index 000000000000..27da96b9460d --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteSqlInjectionMatchSetCommand.ts @@ -0,0 +1,93 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteSqlInjectionMatchSetRequest, + DeleteSqlInjectionMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteSqlInjectionMatchSetCommand, + serializeAws_json1_1DeleteSqlInjectionMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteSqlInjectionMatchSetCommandInput = DeleteSqlInjectionMatchSetRequest; +export type DeleteSqlInjectionMatchSetCommandOutput = DeleteSqlInjectionMatchSetResponse; + +export class DeleteSqlInjectionMatchSetCommand extends $Command< + DeleteSqlInjectionMatchSetCommandInput, + DeleteSqlInjectionMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteSqlInjectionMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + DeleteSqlInjectionMatchSetCommandInput, + DeleteSqlInjectionMatchSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteSqlInjectionMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteSqlInjectionMatchSetCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteSqlInjectionMatchSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteWebACLCommand.ts b/clients/client-waf-regional/commands/DeleteWebACLCommand.ts new file mode 100644 index 000000000000..ddf8dd09d8b8 --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteWebACLCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { DeleteWebACLRequest, DeleteWebACLResponse } from "../models/index"; +import { + deserializeAws_json1_1DeleteWebACLCommand, + serializeAws_json1_1DeleteWebACLCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteWebACLCommandInput = DeleteWebACLRequest; +export type DeleteWebACLCommandOutput = DeleteWebACLResponse; + +export class DeleteWebACLCommand extends $Command< + DeleteWebACLCommandInput, + DeleteWebACLCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteWebACLCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteWebACLCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteWebACLCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteWebACLCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DeleteXssMatchSetCommand.ts b/clients/client-waf-regional/commands/DeleteXssMatchSetCommand.ts new file mode 100644 index 000000000000..ac927671b343 --- /dev/null +++ b/clients/client-waf-regional/commands/DeleteXssMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DeleteXssMatchSetRequest, + DeleteXssMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1DeleteXssMatchSetCommand, + serializeAws_json1_1DeleteXssMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DeleteXssMatchSetCommandInput = DeleteXssMatchSetRequest; +export type DeleteXssMatchSetCommandOutput = DeleteXssMatchSetResponse; + +export class DeleteXssMatchSetCommand extends $Command< + DeleteXssMatchSetCommandInput, + DeleteXssMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DeleteXssMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DeleteXssMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DeleteXssMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DeleteXssMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/DisassociateWebACLCommand.ts b/clients/client-waf-regional/commands/DisassociateWebACLCommand.ts new file mode 100644 index 000000000000..70c902370244 --- /dev/null +++ b/clients/client-waf-regional/commands/DisassociateWebACLCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + DisassociateWebACLRequest, + DisassociateWebACLResponse +} from "../models/index"; +import { + deserializeAws_json1_1DisassociateWebACLCommand, + serializeAws_json1_1DisassociateWebACLCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type DisassociateWebACLCommandInput = DisassociateWebACLRequest; +export type DisassociateWebACLCommandOutput = DisassociateWebACLResponse; + +export class DisassociateWebACLCommand extends $Command< + DisassociateWebACLCommandInput, + DisassociateWebACLCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: DisassociateWebACLCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: DisassociateWebACLCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1DisassociateWebACLCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1DisassociateWebACLCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetByteMatchSetCommand.ts b/clients/client-waf-regional/commands/GetByteMatchSetCommand.ts new file mode 100644 index 000000000000..d6e8f2db7d11 --- /dev/null +++ b/clients/client-waf-regional/commands/GetByteMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetByteMatchSetRequest, + GetByteMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetByteMatchSetCommand, + serializeAws_json1_1GetByteMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetByteMatchSetCommandInput = GetByteMatchSetRequest; +export type GetByteMatchSetCommandOutput = GetByteMatchSetResponse; + +export class GetByteMatchSetCommand extends $Command< + GetByteMatchSetCommandInput, + GetByteMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetByteMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetByteMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetByteMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetByteMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetChangeTokenCommand.ts b/clients/client-waf-regional/commands/GetChangeTokenCommand.ts new file mode 100644 index 000000000000..0f2cb44cc25c --- /dev/null +++ b/clients/client-waf-regional/commands/GetChangeTokenCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { GetChangeTokenRequest, GetChangeTokenResponse } from "../models/index"; +import { + deserializeAws_json1_1GetChangeTokenCommand, + serializeAws_json1_1GetChangeTokenCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetChangeTokenCommandInput = GetChangeTokenRequest; +export type GetChangeTokenCommandOutput = GetChangeTokenResponse; + +export class GetChangeTokenCommand extends $Command< + GetChangeTokenCommandInput, + GetChangeTokenCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetChangeTokenCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetChangeTokenCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetChangeTokenCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetChangeTokenCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetChangeTokenStatusCommand.ts b/clients/client-waf-regional/commands/GetChangeTokenStatusCommand.ts new file mode 100644 index 000000000000..9bd31fe4087f --- /dev/null +++ b/clients/client-waf-regional/commands/GetChangeTokenStatusCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetChangeTokenStatusRequest, + GetChangeTokenStatusResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetChangeTokenStatusCommand, + serializeAws_json1_1GetChangeTokenStatusCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetChangeTokenStatusCommandInput = GetChangeTokenStatusRequest; +export type GetChangeTokenStatusCommandOutput = GetChangeTokenStatusResponse; + +export class GetChangeTokenStatusCommand extends $Command< + GetChangeTokenStatusCommandInput, + GetChangeTokenStatusCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetChangeTokenStatusCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetChangeTokenStatusCommandInput, + GetChangeTokenStatusCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetChangeTokenStatusCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetChangeTokenStatusCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetChangeTokenStatusCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetGeoMatchSetCommand.ts b/clients/client-waf-regional/commands/GetGeoMatchSetCommand.ts new file mode 100644 index 000000000000..046657d7ddb1 --- /dev/null +++ b/clients/client-waf-regional/commands/GetGeoMatchSetCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { GetGeoMatchSetRequest, GetGeoMatchSetResponse } from "../models/index"; +import { + deserializeAws_json1_1GetGeoMatchSetCommand, + serializeAws_json1_1GetGeoMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetGeoMatchSetCommandInput = GetGeoMatchSetRequest; +export type GetGeoMatchSetCommandOutput = GetGeoMatchSetResponse; + +export class GetGeoMatchSetCommand extends $Command< + GetGeoMatchSetCommandInput, + GetGeoMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetGeoMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetGeoMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetGeoMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetGeoMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetIPSetCommand.ts b/clients/client-waf-regional/commands/GetIPSetCommand.ts new file mode 100644 index 000000000000..ac5c3947a502 --- /dev/null +++ b/clients/client-waf-regional/commands/GetIPSetCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { GetIPSetRequest, GetIPSetResponse } from "../models/index"; +import { + deserializeAws_json1_1GetIPSetCommand, + serializeAws_json1_1GetIPSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetIPSetCommandInput = GetIPSetRequest; +export type GetIPSetCommandOutput = GetIPSetResponse; + +export class GetIPSetCommand extends $Command< + GetIPSetCommandInput, + GetIPSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetIPSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetIPSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetIPSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetIPSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetLoggingConfigurationCommand.ts b/clients/client-waf-regional/commands/GetLoggingConfigurationCommand.ts new file mode 100644 index 000000000000..8be392fe6670 --- /dev/null +++ b/clients/client-waf-regional/commands/GetLoggingConfigurationCommand.ts @@ -0,0 +1,90 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetLoggingConfigurationRequest, + GetLoggingConfigurationResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetLoggingConfigurationCommand, + serializeAws_json1_1GetLoggingConfigurationCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetLoggingConfigurationCommandInput = GetLoggingConfigurationRequest; +export type GetLoggingConfigurationCommandOutput = GetLoggingConfigurationResponse; + +export class GetLoggingConfigurationCommand extends $Command< + GetLoggingConfigurationCommandInput, + GetLoggingConfigurationCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetLoggingConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetLoggingConfigurationCommandInput, + GetLoggingConfigurationCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetLoggingConfigurationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetLoggingConfigurationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetLoggingConfigurationCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetPermissionPolicyCommand.ts b/clients/client-waf-regional/commands/GetPermissionPolicyCommand.ts new file mode 100644 index 000000000000..2b0f0679ecf1 --- /dev/null +++ b/clients/client-waf-regional/commands/GetPermissionPolicyCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetPermissionPolicyRequest, + GetPermissionPolicyResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetPermissionPolicyCommand, + serializeAws_json1_1GetPermissionPolicyCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetPermissionPolicyCommandInput = GetPermissionPolicyRequest; +export type GetPermissionPolicyCommandOutput = GetPermissionPolicyResponse; + +export class GetPermissionPolicyCommand extends $Command< + GetPermissionPolicyCommandInput, + GetPermissionPolicyCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetPermissionPolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetPermissionPolicyCommandInput, + GetPermissionPolicyCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetPermissionPolicyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetPermissionPolicyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetPermissionPolicyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetRateBasedRuleCommand.ts b/clients/client-waf-regional/commands/GetRateBasedRuleCommand.ts new file mode 100644 index 000000000000..3452be6fd7f6 --- /dev/null +++ b/clients/client-waf-regional/commands/GetRateBasedRuleCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetRateBasedRuleRequest, + GetRateBasedRuleResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetRateBasedRuleCommand, + serializeAws_json1_1GetRateBasedRuleCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetRateBasedRuleCommandInput = GetRateBasedRuleRequest; +export type GetRateBasedRuleCommandOutput = GetRateBasedRuleResponse; + +export class GetRateBasedRuleCommand extends $Command< + GetRateBasedRuleCommandInput, + GetRateBasedRuleCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRateBasedRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRateBasedRuleCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetRateBasedRuleCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetRateBasedRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetRateBasedRuleManagedKeysCommand.ts b/clients/client-waf-regional/commands/GetRateBasedRuleManagedKeysCommand.ts new file mode 100644 index 000000000000..c1d14341eea0 --- /dev/null +++ b/clients/client-waf-regional/commands/GetRateBasedRuleManagedKeysCommand.ts @@ -0,0 +1,93 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetRateBasedRuleManagedKeysRequest, + GetRateBasedRuleManagedKeysResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetRateBasedRuleManagedKeysCommand, + serializeAws_json1_1GetRateBasedRuleManagedKeysCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetRateBasedRuleManagedKeysCommandInput = GetRateBasedRuleManagedKeysRequest; +export type GetRateBasedRuleManagedKeysCommandOutput = GetRateBasedRuleManagedKeysResponse; + +export class GetRateBasedRuleManagedKeysCommand extends $Command< + GetRateBasedRuleManagedKeysCommandInput, + GetRateBasedRuleManagedKeysCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRateBasedRuleManagedKeysCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetRateBasedRuleManagedKeysCommandInput, + GetRateBasedRuleManagedKeysCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRateBasedRuleManagedKeysCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetRateBasedRuleManagedKeysCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetRateBasedRuleManagedKeysCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetRegexMatchSetCommand.ts b/clients/client-waf-regional/commands/GetRegexMatchSetCommand.ts new file mode 100644 index 000000000000..85f5d3722c1f --- /dev/null +++ b/clients/client-waf-regional/commands/GetRegexMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetRegexMatchSetRequest, + GetRegexMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetRegexMatchSetCommand, + serializeAws_json1_1GetRegexMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetRegexMatchSetCommandInput = GetRegexMatchSetRequest; +export type GetRegexMatchSetCommandOutput = GetRegexMatchSetResponse; + +export class GetRegexMatchSetCommand extends $Command< + GetRegexMatchSetCommandInput, + GetRegexMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRegexMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRegexMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetRegexMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetRegexMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetRegexPatternSetCommand.ts b/clients/client-waf-regional/commands/GetRegexPatternSetCommand.ts new file mode 100644 index 000000000000..76d7d5a9b838 --- /dev/null +++ b/clients/client-waf-regional/commands/GetRegexPatternSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetRegexPatternSetRequest, + GetRegexPatternSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetRegexPatternSetCommand, + serializeAws_json1_1GetRegexPatternSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetRegexPatternSetCommandInput = GetRegexPatternSetRequest; +export type GetRegexPatternSetCommandOutput = GetRegexPatternSetResponse; + +export class GetRegexPatternSetCommand extends $Command< + GetRegexPatternSetCommandInput, + GetRegexPatternSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRegexPatternSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRegexPatternSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetRegexPatternSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetRegexPatternSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetRuleCommand.ts b/clients/client-waf-regional/commands/GetRuleCommand.ts new file mode 100644 index 000000000000..1142fefddf99 --- /dev/null +++ b/clients/client-waf-regional/commands/GetRuleCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { GetRuleRequest, GetRuleResponse } from "../models/index"; +import { + deserializeAws_json1_1GetRuleCommand, + serializeAws_json1_1GetRuleCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetRuleCommandInput = GetRuleRequest; +export type GetRuleCommandOutput = GetRuleResponse; + +export class GetRuleCommand extends $Command< + GetRuleCommandInput, + GetRuleCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRuleCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetRuleCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetRuleGroupCommand.ts b/clients/client-waf-regional/commands/GetRuleGroupCommand.ts new file mode 100644 index 000000000000..ac70e678d83a --- /dev/null +++ b/clients/client-waf-regional/commands/GetRuleGroupCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { GetRuleGroupRequest, GetRuleGroupResponse } from "../models/index"; +import { + deserializeAws_json1_1GetRuleGroupCommand, + serializeAws_json1_1GetRuleGroupCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetRuleGroupCommandInput = GetRuleGroupRequest; +export type GetRuleGroupCommandOutput = GetRuleGroupResponse; + +export class GetRuleGroupCommand extends $Command< + GetRuleGroupCommandInput, + GetRuleGroupCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetRuleGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetRuleGroupCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetRuleGroupCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetRuleGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetSampledRequestsCommand.ts b/clients/client-waf-regional/commands/GetSampledRequestsCommand.ts new file mode 100644 index 000000000000..9e1a4341a989 --- /dev/null +++ b/clients/client-waf-regional/commands/GetSampledRequestsCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetSampledRequestsRequest, + GetSampledRequestsResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetSampledRequestsCommand, + serializeAws_json1_1GetSampledRequestsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetSampledRequestsCommandInput = GetSampledRequestsRequest; +export type GetSampledRequestsCommandOutput = GetSampledRequestsResponse; + +export class GetSampledRequestsCommand extends $Command< + GetSampledRequestsCommandInput, + GetSampledRequestsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetSampledRequestsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetSampledRequestsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetSampledRequestsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetSampledRequestsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetSizeConstraintSetCommand.ts b/clients/client-waf-regional/commands/GetSizeConstraintSetCommand.ts new file mode 100644 index 000000000000..356f7c0a9c5e --- /dev/null +++ b/clients/client-waf-regional/commands/GetSizeConstraintSetCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetSizeConstraintSetRequest, + GetSizeConstraintSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetSizeConstraintSetCommand, + serializeAws_json1_1GetSizeConstraintSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetSizeConstraintSetCommandInput = GetSizeConstraintSetRequest; +export type GetSizeConstraintSetCommandOutput = GetSizeConstraintSetResponse; + +export class GetSizeConstraintSetCommand extends $Command< + GetSizeConstraintSetCommandInput, + GetSizeConstraintSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetSizeConstraintSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetSizeConstraintSetCommandInput, + GetSizeConstraintSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetSizeConstraintSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetSizeConstraintSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetSizeConstraintSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetSqlInjectionMatchSetCommand.ts b/clients/client-waf-regional/commands/GetSqlInjectionMatchSetCommand.ts new file mode 100644 index 000000000000..1385e7bbc447 --- /dev/null +++ b/clients/client-waf-regional/commands/GetSqlInjectionMatchSetCommand.ts @@ -0,0 +1,90 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetSqlInjectionMatchSetRequest, + GetSqlInjectionMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetSqlInjectionMatchSetCommand, + serializeAws_json1_1GetSqlInjectionMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetSqlInjectionMatchSetCommandInput = GetSqlInjectionMatchSetRequest; +export type GetSqlInjectionMatchSetCommandOutput = GetSqlInjectionMatchSetResponse; + +export class GetSqlInjectionMatchSetCommand extends $Command< + GetSqlInjectionMatchSetCommandInput, + GetSqlInjectionMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetSqlInjectionMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetSqlInjectionMatchSetCommandInput, + GetSqlInjectionMatchSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetSqlInjectionMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetSqlInjectionMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetSqlInjectionMatchSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetWebACLCommand.ts b/clients/client-waf-regional/commands/GetWebACLCommand.ts new file mode 100644 index 000000000000..699d3001a8ca --- /dev/null +++ b/clients/client-waf-regional/commands/GetWebACLCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { GetWebACLRequest, GetWebACLResponse } from "../models/index"; +import { + deserializeAws_json1_1GetWebACLCommand, + serializeAws_json1_1GetWebACLCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetWebACLCommandInput = GetWebACLRequest; +export type GetWebACLCommandOutput = GetWebACLResponse; + +export class GetWebACLCommand extends $Command< + GetWebACLCommandInput, + GetWebACLCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetWebACLCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetWebACLCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetWebACLCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetWebACLCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetWebACLForResourceCommand.ts b/clients/client-waf-regional/commands/GetWebACLForResourceCommand.ts new file mode 100644 index 000000000000..817c9d7e5571 --- /dev/null +++ b/clients/client-waf-regional/commands/GetWebACLForResourceCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + GetWebACLForResourceRequest, + GetWebACLForResourceResponse +} from "../models/index"; +import { + deserializeAws_json1_1GetWebACLForResourceCommand, + serializeAws_json1_1GetWebACLForResourceCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetWebACLForResourceCommandInput = GetWebACLForResourceRequest; +export type GetWebACLForResourceCommandOutput = GetWebACLForResourceResponse; + +export class GetWebACLForResourceCommand extends $Command< + GetWebACLForResourceCommandInput, + GetWebACLForResourceCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetWebACLForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + GetWebACLForResourceCommandInput, + GetWebACLForResourceCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetWebACLForResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetWebACLForResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetWebACLForResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/GetXssMatchSetCommand.ts b/clients/client-waf-regional/commands/GetXssMatchSetCommand.ts new file mode 100644 index 000000000000..82ede38cd3d6 --- /dev/null +++ b/clients/client-waf-regional/commands/GetXssMatchSetCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { GetXssMatchSetRequest, GetXssMatchSetResponse } from "../models/index"; +import { + deserializeAws_json1_1GetXssMatchSetCommand, + serializeAws_json1_1GetXssMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type GetXssMatchSetCommandInput = GetXssMatchSetRequest; +export type GetXssMatchSetCommandOutput = GetXssMatchSetResponse; + +export class GetXssMatchSetCommand extends $Command< + GetXssMatchSetCommandInput, + GetXssMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: GetXssMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: GetXssMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1GetXssMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1GetXssMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListActivatedRulesInRuleGroupCommand.ts b/clients/client-waf-regional/commands/ListActivatedRulesInRuleGroupCommand.ts new file mode 100644 index 000000000000..2a755df06e71 --- /dev/null +++ b/clients/client-waf-regional/commands/ListActivatedRulesInRuleGroupCommand.ts @@ -0,0 +1,93 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListActivatedRulesInRuleGroupRequest, + ListActivatedRulesInRuleGroupResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListActivatedRulesInRuleGroupCommand, + serializeAws_json1_1ListActivatedRulesInRuleGroupCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListActivatedRulesInRuleGroupCommandInput = ListActivatedRulesInRuleGroupRequest; +export type ListActivatedRulesInRuleGroupCommandOutput = ListActivatedRulesInRuleGroupResponse; + +export class ListActivatedRulesInRuleGroupCommand extends $Command< + ListActivatedRulesInRuleGroupCommandInput, + ListActivatedRulesInRuleGroupCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListActivatedRulesInRuleGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListActivatedRulesInRuleGroupCommandInput, + ListActivatedRulesInRuleGroupCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListActivatedRulesInRuleGroupCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListActivatedRulesInRuleGroupCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListActivatedRulesInRuleGroupCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListByteMatchSetsCommand.ts b/clients/client-waf-regional/commands/ListByteMatchSetsCommand.ts new file mode 100644 index 000000000000..0785380f0c89 --- /dev/null +++ b/clients/client-waf-regional/commands/ListByteMatchSetsCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListByteMatchSetsRequest, + ListByteMatchSetsResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListByteMatchSetsCommand, + serializeAws_json1_1ListByteMatchSetsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListByteMatchSetsCommandInput = ListByteMatchSetsRequest; +export type ListByteMatchSetsCommandOutput = ListByteMatchSetsResponse; + +export class ListByteMatchSetsCommand extends $Command< + ListByteMatchSetsCommandInput, + ListByteMatchSetsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListByteMatchSetsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListByteMatchSetsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListByteMatchSetsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListByteMatchSetsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListGeoMatchSetsCommand.ts b/clients/client-waf-regional/commands/ListGeoMatchSetsCommand.ts new file mode 100644 index 000000000000..1590df8f79ca --- /dev/null +++ b/clients/client-waf-regional/commands/ListGeoMatchSetsCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListGeoMatchSetsRequest, + ListGeoMatchSetsResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListGeoMatchSetsCommand, + serializeAws_json1_1ListGeoMatchSetsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListGeoMatchSetsCommandInput = ListGeoMatchSetsRequest; +export type ListGeoMatchSetsCommandOutput = ListGeoMatchSetsResponse; + +export class ListGeoMatchSetsCommand extends $Command< + ListGeoMatchSetsCommandInput, + ListGeoMatchSetsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListGeoMatchSetsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListGeoMatchSetsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListGeoMatchSetsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListGeoMatchSetsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListIPSetsCommand.ts b/clients/client-waf-regional/commands/ListIPSetsCommand.ts new file mode 100644 index 000000000000..b579fa55c950 --- /dev/null +++ b/clients/client-waf-regional/commands/ListIPSetsCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { ListIPSetsRequest, ListIPSetsResponse } from "../models/index"; +import { + deserializeAws_json1_1ListIPSetsCommand, + serializeAws_json1_1ListIPSetsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListIPSetsCommandInput = ListIPSetsRequest; +export type ListIPSetsCommandOutput = ListIPSetsResponse; + +export class ListIPSetsCommand extends $Command< + ListIPSetsCommandInput, + ListIPSetsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListIPSetsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListIPSetsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListIPSetsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListIPSetsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListLoggingConfigurationsCommand.ts b/clients/client-waf-regional/commands/ListLoggingConfigurationsCommand.ts new file mode 100644 index 000000000000..56fbf890fa32 --- /dev/null +++ b/clients/client-waf-regional/commands/ListLoggingConfigurationsCommand.ts @@ -0,0 +1,90 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListLoggingConfigurationsRequest, + ListLoggingConfigurationsResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListLoggingConfigurationsCommand, + serializeAws_json1_1ListLoggingConfigurationsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListLoggingConfigurationsCommandInput = ListLoggingConfigurationsRequest; +export type ListLoggingConfigurationsCommandOutput = ListLoggingConfigurationsResponse; + +export class ListLoggingConfigurationsCommand extends $Command< + ListLoggingConfigurationsCommandInput, + ListLoggingConfigurationsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListLoggingConfigurationsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListLoggingConfigurationsCommandInput, + ListLoggingConfigurationsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListLoggingConfigurationsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListLoggingConfigurationsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListLoggingConfigurationsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListRateBasedRulesCommand.ts b/clients/client-waf-regional/commands/ListRateBasedRulesCommand.ts new file mode 100644 index 000000000000..afbf489fabec --- /dev/null +++ b/clients/client-waf-regional/commands/ListRateBasedRulesCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListRateBasedRulesRequest, + ListRateBasedRulesResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListRateBasedRulesCommand, + serializeAws_json1_1ListRateBasedRulesCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListRateBasedRulesCommandInput = ListRateBasedRulesRequest; +export type ListRateBasedRulesCommandOutput = ListRateBasedRulesResponse; + +export class ListRateBasedRulesCommand extends $Command< + ListRateBasedRulesCommandInput, + ListRateBasedRulesCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListRateBasedRulesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListRateBasedRulesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListRateBasedRulesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListRateBasedRulesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListRegexMatchSetsCommand.ts b/clients/client-waf-regional/commands/ListRegexMatchSetsCommand.ts new file mode 100644 index 000000000000..b81d21a8be8f --- /dev/null +++ b/clients/client-waf-regional/commands/ListRegexMatchSetsCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListRegexMatchSetsRequest, + ListRegexMatchSetsResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListRegexMatchSetsCommand, + serializeAws_json1_1ListRegexMatchSetsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListRegexMatchSetsCommandInput = ListRegexMatchSetsRequest; +export type ListRegexMatchSetsCommandOutput = ListRegexMatchSetsResponse; + +export class ListRegexMatchSetsCommand extends $Command< + ListRegexMatchSetsCommandInput, + ListRegexMatchSetsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListRegexMatchSetsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListRegexMatchSetsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListRegexMatchSetsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListRegexMatchSetsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListRegexPatternSetsCommand.ts b/clients/client-waf-regional/commands/ListRegexPatternSetsCommand.ts new file mode 100644 index 000000000000..fabf353f3723 --- /dev/null +++ b/clients/client-waf-regional/commands/ListRegexPatternSetsCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListRegexPatternSetsRequest, + ListRegexPatternSetsResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListRegexPatternSetsCommand, + serializeAws_json1_1ListRegexPatternSetsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListRegexPatternSetsCommandInput = ListRegexPatternSetsRequest; +export type ListRegexPatternSetsCommandOutput = ListRegexPatternSetsResponse; + +export class ListRegexPatternSetsCommand extends $Command< + ListRegexPatternSetsCommandInput, + ListRegexPatternSetsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListRegexPatternSetsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListRegexPatternSetsCommandInput, + ListRegexPatternSetsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListRegexPatternSetsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListRegexPatternSetsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListRegexPatternSetsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListResourcesForWebACLCommand.ts b/clients/client-waf-regional/commands/ListResourcesForWebACLCommand.ts new file mode 100644 index 000000000000..03af9240eabc --- /dev/null +++ b/clients/client-waf-regional/commands/ListResourcesForWebACLCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListResourcesForWebACLRequest, + ListResourcesForWebACLResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListResourcesForWebACLCommand, + serializeAws_json1_1ListResourcesForWebACLCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListResourcesForWebACLCommandInput = ListResourcesForWebACLRequest; +export type ListResourcesForWebACLCommandOutput = ListResourcesForWebACLResponse; + +export class ListResourcesForWebACLCommand extends $Command< + ListResourcesForWebACLCommandInput, + ListResourcesForWebACLCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListResourcesForWebACLCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListResourcesForWebACLCommandInput, + ListResourcesForWebACLCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListResourcesForWebACLCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListResourcesForWebACLCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListResourcesForWebACLCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListRuleGroupsCommand.ts b/clients/client-waf-regional/commands/ListRuleGroupsCommand.ts new file mode 100644 index 000000000000..53709d729635 --- /dev/null +++ b/clients/client-waf-regional/commands/ListRuleGroupsCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { ListRuleGroupsRequest, ListRuleGroupsResponse } from "../models/index"; +import { + deserializeAws_json1_1ListRuleGroupsCommand, + serializeAws_json1_1ListRuleGroupsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListRuleGroupsCommandInput = ListRuleGroupsRequest; +export type ListRuleGroupsCommandOutput = ListRuleGroupsResponse; + +export class ListRuleGroupsCommand extends $Command< + ListRuleGroupsCommandInput, + ListRuleGroupsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListRuleGroupsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListRuleGroupsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListRuleGroupsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListRuleGroupsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListRulesCommand.ts b/clients/client-waf-regional/commands/ListRulesCommand.ts new file mode 100644 index 000000000000..c28b611e27fb --- /dev/null +++ b/clients/client-waf-regional/commands/ListRulesCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { ListRulesRequest, ListRulesResponse } from "../models/index"; +import { + deserializeAws_json1_1ListRulesCommand, + serializeAws_json1_1ListRulesCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListRulesCommandInput = ListRulesRequest; +export type ListRulesCommandOutput = ListRulesResponse; + +export class ListRulesCommand extends $Command< + ListRulesCommandInput, + ListRulesCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListRulesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListRulesCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListRulesCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListRulesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListSizeConstraintSetsCommand.ts b/clients/client-waf-regional/commands/ListSizeConstraintSetsCommand.ts new file mode 100644 index 000000000000..798895a8027c --- /dev/null +++ b/clients/client-waf-regional/commands/ListSizeConstraintSetsCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListSizeConstraintSetsRequest, + ListSizeConstraintSetsResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListSizeConstraintSetsCommand, + serializeAws_json1_1ListSizeConstraintSetsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListSizeConstraintSetsCommandInput = ListSizeConstraintSetsRequest; +export type ListSizeConstraintSetsCommandOutput = ListSizeConstraintSetsResponse; + +export class ListSizeConstraintSetsCommand extends $Command< + ListSizeConstraintSetsCommandInput, + ListSizeConstraintSetsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListSizeConstraintSetsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListSizeConstraintSetsCommandInput, + ListSizeConstraintSetsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListSizeConstraintSetsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListSizeConstraintSetsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListSizeConstraintSetsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListSqlInjectionMatchSetsCommand.ts b/clients/client-waf-regional/commands/ListSqlInjectionMatchSetsCommand.ts new file mode 100644 index 000000000000..26a600e1fd58 --- /dev/null +++ b/clients/client-waf-regional/commands/ListSqlInjectionMatchSetsCommand.ts @@ -0,0 +1,90 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListSqlInjectionMatchSetsRequest, + ListSqlInjectionMatchSetsResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListSqlInjectionMatchSetsCommand, + serializeAws_json1_1ListSqlInjectionMatchSetsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListSqlInjectionMatchSetsCommandInput = ListSqlInjectionMatchSetsRequest; +export type ListSqlInjectionMatchSetsCommandOutput = ListSqlInjectionMatchSetsResponse; + +export class ListSqlInjectionMatchSetsCommand extends $Command< + ListSqlInjectionMatchSetsCommandInput, + ListSqlInjectionMatchSetsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListSqlInjectionMatchSetsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListSqlInjectionMatchSetsCommandInput, + ListSqlInjectionMatchSetsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListSqlInjectionMatchSetsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListSqlInjectionMatchSetsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListSqlInjectionMatchSetsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListSubscribedRuleGroupsCommand.ts b/clients/client-waf-regional/commands/ListSubscribedRuleGroupsCommand.ts new file mode 100644 index 000000000000..636175a93ac6 --- /dev/null +++ b/clients/client-waf-regional/commands/ListSubscribedRuleGroupsCommand.ts @@ -0,0 +1,90 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListSubscribedRuleGroupsRequest, + ListSubscribedRuleGroupsResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListSubscribedRuleGroupsCommand, + serializeAws_json1_1ListSubscribedRuleGroupsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListSubscribedRuleGroupsCommandInput = ListSubscribedRuleGroupsRequest; +export type ListSubscribedRuleGroupsCommandOutput = ListSubscribedRuleGroupsResponse; + +export class ListSubscribedRuleGroupsCommand extends $Command< + ListSubscribedRuleGroupsCommandInput, + ListSubscribedRuleGroupsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListSubscribedRuleGroupsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListSubscribedRuleGroupsCommandInput, + ListSubscribedRuleGroupsCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListSubscribedRuleGroupsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListSubscribedRuleGroupsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListSubscribedRuleGroupsCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListTagsForResourceCommand.ts b/clients/client-waf-regional/commands/ListTagsForResourceCommand.ts new file mode 100644 index 000000000000..c21d69752241 --- /dev/null +++ b/clients/client-waf-regional/commands/ListTagsForResourceCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListTagsForResourceRequest, + ListTagsForResourceResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListTagsForResourceCommand, + serializeAws_json1_1ListTagsForResourceCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListTagsForResourceCommandInput = ListTagsForResourceRequest; +export type ListTagsForResourceCommandOutput = ListTagsForResourceResponse; + +export class ListTagsForResourceCommand extends $Command< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListTagsForResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListTagsForResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListTagsForResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListTagsForResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListWebACLsCommand.ts b/clients/client-waf-regional/commands/ListWebACLsCommand.ts new file mode 100644 index 000000000000..8b65e2668c2e --- /dev/null +++ b/clients/client-waf-regional/commands/ListWebACLsCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { ListWebACLsRequest, ListWebACLsResponse } from "../models/index"; +import { + deserializeAws_json1_1ListWebACLsCommand, + serializeAws_json1_1ListWebACLsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListWebACLsCommandInput = ListWebACLsRequest; +export type ListWebACLsCommandOutput = ListWebACLsResponse; + +export class ListWebACLsCommand extends $Command< + ListWebACLsCommandInput, + ListWebACLsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListWebACLsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListWebACLsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListWebACLsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListWebACLsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/ListXssMatchSetsCommand.ts b/clients/client-waf-regional/commands/ListXssMatchSetsCommand.ts new file mode 100644 index 000000000000..905c6a40981f --- /dev/null +++ b/clients/client-waf-regional/commands/ListXssMatchSetsCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + ListXssMatchSetsRequest, + ListXssMatchSetsResponse +} from "../models/index"; +import { + deserializeAws_json1_1ListXssMatchSetsCommand, + serializeAws_json1_1ListXssMatchSetsCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type ListXssMatchSetsCommandInput = ListXssMatchSetsRequest; +export type ListXssMatchSetsCommandOutput = ListXssMatchSetsResponse; + +export class ListXssMatchSetsCommand extends $Command< + ListXssMatchSetsCommandInput, + ListXssMatchSetsCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: ListXssMatchSetsCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: ListXssMatchSetsCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1ListXssMatchSetsCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1ListXssMatchSetsCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/PutLoggingConfigurationCommand.ts b/clients/client-waf-regional/commands/PutLoggingConfigurationCommand.ts new file mode 100644 index 000000000000..2325150490d9 --- /dev/null +++ b/clients/client-waf-regional/commands/PutLoggingConfigurationCommand.ts @@ -0,0 +1,90 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + PutLoggingConfigurationRequest, + PutLoggingConfigurationResponse +} from "../models/index"; +import { + deserializeAws_json1_1PutLoggingConfigurationCommand, + serializeAws_json1_1PutLoggingConfigurationCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutLoggingConfigurationCommandInput = PutLoggingConfigurationRequest; +export type PutLoggingConfigurationCommandOutput = PutLoggingConfigurationResponse; + +export class PutLoggingConfigurationCommand extends $Command< + PutLoggingConfigurationCommandInput, + PutLoggingConfigurationCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutLoggingConfigurationCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutLoggingConfigurationCommandInput, + PutLoggingConfigurationCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutLoggingConfigurationCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1PutLoggingConfigurationCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1PutLoggingConfigurationCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/PutPermissionPolicyCommand.ts b/clients/client-waf-regional/commands/PutPermissionPolicyCommand.ts new file mode 100644 index 000000000000..b378cffb9ef0 --- /dev/null +++ b/clients/client-waf-regional/commands/PutPermissionPolicyCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + PutPermissionPolicyRequest, + PutPermissionPolicyResponse +} from "../models/index"; +import { + deserializeAws_json1_1PutPermissionPolicyCommand, + serializeAws_json1_1PutPermissionPolicyCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type PutPermissionPolicyCommandInput = PutPermissionPolicyRequest; +export type PutPermissionPolicyCommandOutput = PutPermissionPolicyResponse; + +export class PutPermissionPolicyCommand extends $Command< + PutPermissionPolicyCommandInput, + PutPermissionPolicyCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: PutPermissionPolicyCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + PutPermissionPolicyCommandInput, + PutPermissionPolicyCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: PutPermissionPolicyCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1PutPermissionPolicyCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1PutPermissionPolicyCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/TagResourceCommand.ts b/clients/client-waf-regional/commands/TagResourceCommand.ts new file mode 100644 index 000000000000..c2af76b75300 --- /dev/null +++ b/clients/client-waf-regional/commands/TagResourceCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { TagResourceRequest, TagResourceResponse } from "../models/index"; +import { + deserializeAws_json1_1TagResourceCommand, + serializeAws_json1_1TagResourceCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type TagResourceCommandInput = TagResourceRequest; +export type TagResourceCommandOutput = TagResourceResponse; + +export class TagResourceCommand extends $Command< + TagResourceCommandInput, + TagResourceCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: TagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: TagResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1TagResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1TagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UntagResourceCommand.ts b/clients/client-waf-regional/commands/UntagResourceCommand.ts new file mode 100644 index 000000000000..64d06e69c165 --- /dev/null +++ b/clients/client-waf-regional/commands/UntagResourceCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { UntagResourceRequest, UntagResourceResponse } from "../models/index"; +import { + deserializeAws_json1_1UntagResourceCommand, + serializeAws_json1_1UntagResourceCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UntagResourceCommandInput = UntagResourceRequest; +export type UntagResourceCommandOutput = UntagResourceResponse; + +export class UntagResourceCommand extends $Command< + UntagResourceCommandInput, + UntagResourceCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UntagResourceCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UntagResourceCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UntagResourceCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UntagResourceCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateByteMatchSetCommand.ts b/clients/client-waf-regional/commands/UpdateByteMatchSetCommand.ts new file mode 100644 index 000000000000..2336cfdc0fb4 --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateByteMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + UpdateByteMatchSetRequest, + UpdateByteMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1UpdateByteMatchSetCommand, + serializeAws_json1_1UpdateByteMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateByteMatchSetCommandInput = UpdateByteMatchSetRequest; +export type UpdateByteMatchSetCommandOutput = UpdateByteMatchSetResponse; + +export class UpdateByteMatchSetCommand extends $Command< + UpdateByteMatchSetCommandInput, + UpdateByteMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateByteMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateByteMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateByteMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateByteMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateGeoMatchSetCommand.ts b/clients/client-waf-regional/commands/UpdateGeoMatchSetCommand.ts new file mode 100644 index 000000000000..359ce2ae51df --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateGeoMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + UpdateGeoMatchSetRequest, + UpdateGeoMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1UpdateGeoMatchSetCommand, + serializeAws_json1_1UpdateGeoMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateGeoMatchSetCommandInput = UpdateGeoMatchSetRequest; +export type UpdateGeoMatchSetCommandOutput = UpdateGeoMatchSetResponse; + +export class UpdateGeoMatchSetCommand extends $Command< + UpdateGeoMatchSetCommandInput, + UpdateGeoMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateGeoMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateGeoMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateGeoMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateGeoMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateIPSetCommand.ts b/clients/client-waf-regional/commands/UpdateIPSetCommand.ts new file mode 100644 index 000000000000..90019af47d92 --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateIPSetCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { UpdateIPSetRequest, UpdateIPSetResponse } from "../models/index"; +import { + deserializeAws_json1_1UpdateIPSetCommand, + serializeAws_json1_1UpdateIPSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateIPSetCommandInput = UpdateIPSetRequest; +export type UpdateIPSetCommandOutput = UpdateIPSetResponse; + +export class UpdateIPSetCommand extends $Command< + UpdateIPSetCommandInput, + UpdateIPSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateIPSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateIPSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateIPSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateIPSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateRateBasedRuleCommand.ts b/clients/client-waf-regional/commands/UpdateRateBasedRuleCommand.ts new file mode 100644 index 000000000000..fd97fdd9b6a9 --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateRateBasedRuleCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + UpdateRateBasedRuleRequest, + UpdateRateBasedRuleResponse +} from "../models/index"; +import { + deserializeAws_json1_1UpdateRateBasedRuleCommand, + serializeAws_json1_1UpdateRateBasedRuleCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateRateBasedRuleCommandInput = UpdateRateBasedRuleRequest; +export type UpdateRateBasedRuleCommandOutput = UpdateRateBasedRuleResponse; + +export class UpdateRateBasedRuleCommand extends $Command< + UpdateRateBasedRuleCommandInput, + UpdateRateBasedRuleCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateRateBasedRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + UpdateRateBasedRuleCommandInput, + UpdateRateBasedRuleCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateRateBasedRuleCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateRateBasedRuleCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateRateBasedRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateRegexMatchSetCommand.ts b/clients/client-waf-regional/commands/UpdateRegexMatchSetCommand.ts new file mode 100644 index 000000000000..b21637f0beaa --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateRegexMatchSetCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + UpdateRegexMatchSetRequest, + UpdateRegexMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1UpdateRegexMatchSetCommand, + serializeAws_json1_1UpdateRegexMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateRegexMatchSetCommandInput = UpdateRegexMatchSetRequest; +export type UpdateRegexMatchSetCommandOutput = UpdateRegexMatchSetResponse; + +export class UpdateRegexMatchSetCommand extends $Command< + UpdateRegexMatchSetCommandInput, + UpdateRegexMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateRegexMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + UpdateRegexMatchSetCommandInput, + UpdateRegexMatchSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateRegexMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateRegexMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateRegexMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateRegexPatternSetCommand.ts b/clients/client-waf-regional/commands/UpdateRegexPatternSetCommand.ts new file mode 100644 index 000000000000..2c55b77dd486 --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateRegexPatternSetCommand.ts @@ -0,0 +1,87 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + UpdateRegexPatternSetRequest, + UpdateRegexPatternSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1UpdateRegexPatternSetCommand, + serializeAws_json1_1UpdateRegexPatternSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateRegexPatternSetCommandInput = UpdateRegexPatternSetRequest; +export type UpdateRegexPatternSetCommandOutput = UpdateRegexPatternSetResponse; + +export class UpdateRegexPatternSetCommand extends $Command< + UpdateRegexPatternSetCommandInput, + UpdateRegexPatternSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateRegexPatternSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + UpdateRegexPatternSetCommandInput, + UpdateRegexPatternSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateRegexPatternSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateRegexPatternSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateRegexPatternSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateRuleCommand.ts b/clients/client-waf-regional/commands/UpdateRuleCommand.ts new file mode 100644 index 000000000000..0251d4e2ea32 --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateRuleCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { UpdateRuleRequest, UpdateRuleResponse } from "../models/index"; +import { + deserializeAws_json1_1UpdateRuleCommand, + serializeAws_json1_1UpdateRuleCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateRuleCommandInput = UpdateRuleRequest; +export type UpdateRuleCommandOutput = UpdateRuleResponse; + +export class UpdateRuleCommand extends $Command< + UpdateRuleCommandInput, + UpdateRuleCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateRuleCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateRuleCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateRuleCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateRuleCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateRuleGroupCommand.ts b/clients/client-waf-regional/commands/UpdateRuleGroupCommand.ts new file mode 100644 index 000000000000..7dea5ca2c84d --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateRuleGroupCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + UpdateRuleGroupRequest, + UpdateRuleGroupResponse +} from "../models/index"; +import { + deserializeAws_json1_1UpdateRuleGroupCommand, + serializeAws_json1_1UpdateRuleGroupCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateRuleGroupCommandInput = UpdateRuleGroupRequest; +export type UpdateRuleGroupCommandOutput = UpdateRuleGroupResponse; + +export class UpdateRuleGroupCommand extends $Command< + UpdateRuleGroupCommandInput, + UpdateRuleGroupCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateRuleGroupCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateRuleGroupCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateRuleGroupCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateRuleGroupCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateSizeConstraintSetCommand.ts b/clients/client-waf-regional/commands/UpdateSizeConstraintSetCommand.ts new file mode 100644 index 000000000000..e76eede1962c --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateSizeConstraintSetCommand.ts @@ -0,0 +1,90 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + UpdateSizeConstraintSetRequest, + UpdateSizeConstraintSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1UpdateSizeConstraintSetCommand, + serializeAws_json1_1UpdateSizeConstraintSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateSizeConstraintSetCommandInput = UpdateSizeConstraintSetRequest; +export type UpdateSizeConstraintSetCommandOutput = UpdateSizeConstraintSetResponse; + +export class UpdateSizeConstraintSetCommand extends $Command< + UpdateSizeConstraintSetCommandInput, + UpdateSizeConstraintSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateSizeConstraintSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + UpdateSizeConstraintSetCommandInput, + UpdateSizeConstraintSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateSizeConstraintSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateSizeConstraintSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateSizeConstraintSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateSqlInjectionMatchSetCommand.ts b/clients/client-waf-regional/commands/UpdateSqlInjectionMatchSetCommand.ts new file mode 100644 index 000000000000..118e50169d58 --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateSqlInjectionMatchSetCommand.ts @@ -0,0 +1,93 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + UpdateSqlInjectionMatchSetRequest, + UpdateSqlInjectionMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1UpdateSqlInjectionMatchSetCommand, + serializeAws_json1_1UpdateSqlInjectionMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateSqlInjectionMatchSetCommandInput = UpdateSqlInjectionMatchSetRequest; +export type UpdateSqlInjectionMatchSetCommandOutput = UpdateSqlInjectionMatchSetResponse; + +export class UpdateSqlInjectionMatchSetCommand extends $Command< + UpdateSqlInjectionMatchSetCommandInput, + UpdateSqlInjectionMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateSqlInjectionMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler< + UpdateSqlInjectionMatchSetCommandInput, + UpdateSqlInjectionMatchSetCommandOutput + > { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateSqlInjectionMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateSqlInjectionMatchSetCommand( + input, + context + ); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateSqlInjectionMatchSetCommand( + output, + context + ); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateWebACLCommand.ts b/clients/client-waf-regional/commands/UpdateWebACLCommand.ts new file mode 100644 index 000000000000..612145dca84d --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateWebACLCommand.ts @@ -0,0 +1,81 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { UpdateWebACLRequest, UpdateWebACLResponse } from "../models/index"; +import { + deserializeAws_json1_1UpdateWebACLCommand, + serializeAws_json1_1UpdateWebACLCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateWebACLCommandInput = UpdateWebACLRequest; +export type UpdateWebACLCommandOutput = UpdateWebACLResponse; + +export class UpdateWebACLCommand extends $Command< + UpdateWebACLCommandInput, + UpdateWebACLCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateWebACLCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateWebACLCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateWebACLCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateWebACLCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/commands/UpdateXssMatchSetCommand.ts b/clients/client-waf-regional/commands/UpdateXssMatchSetCommand.ts new file mode 100644 index 000000000000..4ba4268ec89c --- /dev/null +++ b/clients/client-waf-regional/commands/UpdateXssMatchSetCommand.ts @@ -0,0 +1,84 @@ +import { + ServiceInputTypes, + ServiceOutputTypes, + WAFRegionalClientResolvedConfig +} from "../WAFRegionalClient"; +import { + UpdateXssMatchSetRequest, + UpdateXssMatchSetResponse +} from "../models/index"; +import { + deserializeAws_json1_1UpdateXssMatchSetCommand, + serializeAws_json1_1UpdateXssMatchSetCommand +} from "../protocols/Aws_json1_1"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + MiddlewareStack, + SerdeContext, + HttpHandlerOptions as __HttpHandlerOptions +} from "@aws-sdk/types"; + +export type UpdateXssMatchSetCommandInput = UpdateXssMatchSetRequest; +export type UpdateXssMatchSetCommandOutput = UpdateXssMatchSetResponse; + +export class UpdateXssMatchSetCommand extends $Command< + UpdateXssMatchSetCommandInput, + UpdateXssMatchSetCommandOutput, + WAFRegionalClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + constructor(readonly input: UpdateXssMatchSetCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: WAFRegionalClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use( + getSerdePlugin(configuration, this.serialize, this.deserialize) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const handlerExecutionContext: HandlerExecutionContext = { + logger: {} as any + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + private serialize( + input: UpdateXssMatchSetCommandInput, + context: SerdeContext + ): Promise<__HttpRequest> { + return serializeAws_json1_1UpdateXssMatchSetCommand(input, context); + } + + private deserialize( + output: __HttpResponse, + context: SerdeContext + ): Promise { + return deserializeAws_json1_1UpdateXssMatchSetCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-waf-regional/endpoints.ts b/clients/client-waf-regional/endpoints.ts new file mode 100644 index 000000000000..bb745a934a4c --- /dev/null +++ b/clients/client-waf-regional/endpoints.ts @@ -0,0 +1,163 @@ +import { RegionInfo, RegionInfoProvider } from "@aws-sdk/types"; + +// Partition default templates +const AWS_TEMPLATE = "waf-regional.{region}.amazonaws.com"; +const AWS_CN_TEMPLATE = "waf-regional.{region}.amazonaws.com.cn"; +const AWS_ISO_TEMPLATE = "waf-regional.{region}.c2s.ic.gov"; +const AWS_ISO_B_TEMPLATE = "waf-regional.{region}.sc2s.sgov.gov"; +const AWS_US_GOV_TEMPLATE = "waf-regional.{region}.amazonaws.com"; + +// Partition regions +const AWS_REGIONS = new Set([ + "ap-south-1", + "eu-north-1", + "eu-west-3", + "eu-west-2", + "eu-west-1", + "ap-northeast-2", + "ap-northeast-1", + "me-south-1", + "ca-central-1", + "sa-east-1", + "ap-east-1", + "ap-southeast-1", + "ap-southeast-2", + "eu-central-1", + "us-east-1", + "us-east-2", + "us-west-1", + "us-west-2" +]); +const AWS_CN_REGIONS = new Set(["cn-north-1", "cn-northwest-1"]); +const AWS_ISO_REGIONS = new Set(["us-iso-east-1"]); +const AWS_ISO_B_REGIONS = new Set(["us-isob-east-1"]); +const AWS_US_GOV_REGIONS = new Set(["us-gov-west-1", "us-gov-east-1"]); + +export const defaultRegionInfoProvider: RegionInfoProvider = ( + region: string, + options?: any +) => { + let regionInfo: RegionInfo | undefined = undefined; + switch (region) { + // First, try to match exact region names. + case "ap-northeast-1": + regionInfo = { + hostname: "waf-regional.ap-northeast-1.amazonaws.com" + }; + break; + case "ap-northeast-2": + regionInfo = { + hostname: "waf-regional.ap-northeast-2.amazonaws.com" + }; + break; + case "ap-south-1": + regionInfo = { + hostname: "waf-regional.ap-south-1.amazonaws.com" + }; + break; + case "ap-southeast-1": + regionInfo = { + hostname: "waf-regional.ap-southeast-1.amazonaws.com" + }; + break; + case "ap-southeast-2": + regionInfo = { + hostname: "waf-regional.ap-southeast-2.amazonaws.com" + }; + break; + case "ca-central-1": + regionInfo = { + hostname: "waf-regional.ca-central-1.amazonaws.com" + }; + break; + case "eu-central-1": + regionInfo = { + hostname: "waf-regional.eu-central-1.amazonaws.com" + }; + break; + case "eu-north-1": + regionInfo = { + hostname: "waf-regional.eu-north-1.amazonaws.com" + }; + break; + case "eu-west-1": + regionInfo = { + hostname: "waf-regional.eu-west-1.amazonaws.com" + }; + break; + case "eu-west-2": + regionInfo = { + hostname: "waf-regional.eu-west-2.amazonaws.com" + }; + break; + case "eu-west-3": + regionInfo = { + hostname: "waf-regional.eu-west-3.amazonaws.com" + }; + break; + case "sa-east-1": + regionInfo = { + hostname: "waf-regional.sa-east-1.amazonaws.com" + }; + break; + case "us-east-1": + regionInfo = { + hostname: "waf-regional.us-east-1.amazonaws.com" + }; + break; + case "us-east-2": + regionInfo = { + hostname: "waf-regional.us-east-2.amazonaws.com" + }; + break; + case "us-gov-west-1": + regionInfo = { + hostname: "waf-regional.us-gov-west-1.amazonaws.com" + }; + break; + case "us-west-1": + regionInfo = { + hostname: "waf-regional.us-west-1.amazonaws.com" + }; + break; + case "us-west-2": + regionInfo = { + hostname: "waf-regional.us-west-2.amazonaws.com" + }; + break; + // Next, try to match partition endpoints. + default: + if (AWS_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region) + }; + } + if (AWS_CN_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_CN_TEMPLATE.replace("{region}", region) + }; + } + if (AWS_ISO_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_TEMPLATE.replace("{region}", region) + }; + } + if (AWS_ISO_B_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_ISO_B_TEMPLATE.replace("{region}", region) + }; + } + if (AWS_US_GOV_REGIONS.has(region)) { + regionInfo = { + hostname: AWS_US_GOV_TEMPLATE.replace("{region}", region) + }; + } + // Finally, assume it's an AWS partition endpoint. + if (regionInfo === undefined) { + regionInfo = { + hostname: AWS_TEMPLATE.replace("{region}", region) + }; + } + } + return Promise.resolve(regionInfo); +}; diff --git a/clients/client-waf-regional/index.ts b/clients/client-waf-regional/index.ts new file mode 100644 index 000000000000..d2dfaec85501 --- /dev/null +++ b/clients/client-waf-regional/index.ts @@ -0,0 +1,82 @@ +export * from "./WAFRegionalClient"; +export * from "./WAFRegional"; +export * from "./commands/AssociateWebACLCommand"; +export * from "./commands/DisassociateWebACLCommand"; +export * from "./commands/GetWebACLForResourceCommand"; +export * from "./commands/ListResourcesForWebACLCommand"; +export * from "./commands/CreateByteMatchSetCommand"; +export * from "./commands/CreateGeoMatchSetCommand"; +export * from "./commands/CreateIPSetCommand"; +export * from "./commands/CreateRateBasedRuleCommand"; +export * from "./commands/CreateRegexMatchSetCommand"; +export * from "./commands/CreateRegexPatternSetCommand"; +export * from "./commands/CreateRuleCommand"; +export * from "./commands/CreateRuleGroupCommand"; +export * from "./commands/CreateSizeConstraintSetCommand"; +export * from "./commands/CreateSqlInjectionMatchSetCommand"; +export * from "./commands/CreateWebACLCommand"; +export * from "./commands/CreateXssMatchSetCommand"; +export * from "./commands/DeleteByteMatchSetCommand"; +export * from "./commands/DeleteGeoMatchSetCommand"; +export * from "./commands/DeleteIPSetCommand"; +export * from "./commands/DeleteLoggingConfigurationCommand"; +export * from "./commands/DeletePermissionPolicyCommand"; +export * from "./commands/DeleteRateBasedRuleCommand"; +export * from "./commands/DeleteRegexMatchSetCommand"; +export * from "./commands/DeleteRegexPatternSetCommand"; +export * from "./commands/DeleteRuleCommand"; +export * from "./commands/DeleteRuleGroupCommand"; +export * from "./commands/DeleteSizeConstraintSetCommand"; +export * from "./commands/DeleteSqlInjectionMatchSetCommand"; +export * from "./commands/DeleteWebACLCommand"; +export * from "./commands/DeleteXssMatchSetCommand"; +export * from "./commands/GetByteMatchSetCommand"; +export * from "./commands/GetChangeTokenCommand"; +export * from "./commands/GetChangeTokenStatusCommand"; +export * from "./commands/GetGeoMatchSetCommand"; +export * from "./commands/GetIPSetCommand"; +export * from "./commands/GetLoggingConfigurationCommand"; +export * from "./commands/GetPermissionPolicyCommand"; +export * from "./commands/GetRateBasedRuleCommand"; +export * from "./commands/GetRateBasedRuleManagedKeysCommand"; +export * from "./commands/GetRegexMatchSetCommand"; +export * from "./commands/GetRegexPatternSetCommand"; +export * from "./commands/GetRuleCommand"; +export * from "./commands/GetRuleGroupCommand"; +export * from "./commands/GetSampledRequestsCommand"; +export * from "./commands/GetSizeConstraintSetCommand"; +export * from "./commands/GetSqlInjectionMatchSetCommand"; +export * from "./commands/GetWebACLCommand"; +export * from "./commands/GetXssMatchSetCommand"; +export * from "./commands/ListActivatedRulesInRuleGroupCommand"; +export * from "./commands/ListByteMatchSetsCommand"; +export * from "./commands/ListGeoMatchSetsCommand"; +export * from "./commands/ListIPSetsCommand"; +export * from "./commands/ListLoggingConfigurationsCommand"; +export * from "./commands/ListRateBasedRulesCommand"; +export * from "./commands/ListRegexMatchSetsCommand"; +export * from "./commands/ListRegexPatternSetsCommand"; +export * from "./commands/ListRuleGroupsCommand"; +export * from "./commands/ListRulesCommand"; +export * from "./commands/ListSizeConstraintSetsCommand"; +export * from "./commands/ListSqlInjectionMatchSetsCommand"; +export * from "./commands/ListSubscribedRuleGroupsCommand"; +export * from "./commands/ListTagsForResourceCommand"; +export * from "./commands/ListWebACLsCommand"; +export * from "./commands/ListXssMatchSetsCommand"; +export * from "./commands/PutLoggingConfigurationCommand"; +export * from "./commands/PutPermissionPolicyCommand"; +export * from "./commands/TagResourceCommand"; +export * from "./commands/UntagResourceCommand"; +export * from "./commands/UpdateByteMatchSetCommand"; +export * from "./commands/UpdateGeoMatchSetCommand"; +export * from "./commands/UpdateIPSetCommand"; +export * from "./commands/UpdateRateBasedRuleCommand"; +export * from "./commands/UpdateRegexMatchSetCommand"; +export * from "./commands/UpdateRegexPatternSetCommand"; +export * from "./commands/UpdateRuleCommand"; +export * from "./commands/UpdateRuleGroupCommand"; +export * from "./commands/UpdateSizeConstraintSetCommand"; +export * from "./commands/UpdateSqlInjectionMatchSetCommand"; +export * from "./commands/UpdateWebACLCommand"; +export * from "./commands/UpdateXssMatchSetCommand"; diff --git a/clients/client-waf-regional/models/index.ts b/clients/client-waf-regional/models/index.ts new file mode 100644 index 000000000000..a8a9756abea4 --- /dev/null +++ b/clients/client-waf-regional/models/index.ts @@ -0,0 +1,7603 @@ +import * as _smithy from "@aws-sdk/smithy-client"; +import { MetadataBearer as $MetadataBearer } from "@aws-sdk/types"; + +export interface AssociateWebACLRequest { + __type?: "AssociateWebACLRequest"; + /** + * + *

The ARN (Amazon Resource Name) of the resource to be protected, either an application load balancer or Amazon API Gateway stage.

+ *

The ARN should be in one of the following formats:

+ *
    + *
  • + *

    For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id + * + *

    + *
  • + *
  • + *

    For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name + * + *

    + *
  • + *
+ * + */ + ResourceArn: string | undefined; + + /** + * + *

A unique identifier (ID) for the web ACL.

+ * + */ + WebACLId: string | undefined; +} + +export namespace AssociateWebACLRequest { + export function isa(o: any): o is AssociateWebACLRequest { + return _smithy.isa(o, "AssociateWebACLRequest"); + } +} + +export interface AssociateWebACLResponse extends $MetadataBearer { + __type?: "AssociateWebACLResponse"; +} + +export namespace AssociateWebACLResponse { + export function isa(o: any): o is AssociateWebACLResponse { + return _smithy.isa(o, "AssociateWebACLResponse"); + } +} + +export interface DisassociateWebACLRequest { + __type?: "DisassociateWebACLRequest"; + /** + * + *

The ARN (Amazon Resource Name) of the resource from which the web ACL is being removed, either an application load balancer or Amazon API Gateway stage.

+ *

The ARN should be in one of the following formats:

+ *
    + *
  • + *

    For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id + * + *

    + *
  • + *
  • + *

    For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name + * + *

    + *
  • + *
+ * + */ + ResourceArn: string | undefined; +} + +export namespace DisassociateWebACLRequest { + export function isa(o: any): o is DisassociateWebACLRequest { + return _smithy.isa(o, "DisassociateWebACLRequest"); + } +} + +export interface DisassociateWebACLResponse extends $MetadataBearer { + __type?: "DisassociateWebACLResponse"; +} + +export namespace DisassociateWebACLResponse { + export function isa(o: any): o is DisassociateWebACLResponse { + return _smithy.isa(o, "DisassociateWebACLResponse"); + } +} + +export interface GetWebACLForResourceRequest { + __type?: "GetWebACLForResourceRequest"; + /** + * + *

The ARN (Amazon Resource Name) of the resource for which to get the web ACL, either an application load balancer or Amazon API Gateway stage.

+ *

The ARN should be in one of the following formats:

+ *
    + *
  • + *

    For an Application Load Balancer: arn:aws:elasticloadbalancing:region:account-id:loadbalancer/app/load-balancer-name/load-balancer-id + * + *

    + *
  • + *
  • + *

    For an Amazon API Gateway stage: arn:aws:apigateway:region::/restapis/api-id/stages/stage-name + * + *

    + *
  • + *
+ * + */ + ResourceArn: string | undefined; +} + +export namespace GetWebACLForResourceRequest { + export function isa(o: any): o is GetWebACLForResourceRequest { + return _smithy.isa(o, "GetWebACLForResourceRequest"); + } +} + +export interface GetWebACLForResourceResponse extends $MetadataBearer { + __type?: "GetWebACLForResourceResponse"; + /** + * + *

Information about the web ACL that you specified in the GetWebACLForResource request. If there is no associated resource, a null WebACLSummary is returned.

+ * + */ + WebACLSummary?: WebACLSummary; +} + +export namespace GetWebACLForResourceResponse { + export function isa(o: any): o is GetWebACLForResourceResponse { + return _smithy.isa(o, "GetWebACLForResourceResponse"); + } +} + +export interface ListResourcesForWebACLRequest { + __type?: "ListResourcesForWebACLRequest"; + /** + * + *

The type of resource to list, either an application load balancer or Amazon API Gateway.

+ * + */ + ResourceType?: ResourceType | string; + + /** + * + *

The unique identifier (ID) of the web ACL for which to list the associated resources.

+ * + */ + WebACLId: string | undefined; +} + +export namespace ListResourcesForWebACLRequest { + export function isa(o: any): o is ListResourcesForWebACLRequest { + return _smithy.isa(o, "ListResourcesForWebACLRequest"); + } +} + +export interface ListResourcesForWebACLResponse extends $MetadataBearer { + __type?: "ListResourcesForWebACLResponse"; + /** + * + *

An array of ARNs (Amazon Resource Names) of the resources associated with the specified web ACL. An array with zero elements is returned if there are no resources associated with the web ACL.

+ * + */ + ResourceArns?: Array; +} + +export namespace ListResourcesForWebACLResponse { + export function isa(o: any): o is ListResourcesForWebACLResponse { + return _smithy.isa(o, "ListResourcesForWebACLResponse"); + } +} + +/** + * + *

The ActivatedRule object in an UpdateWebACL request specifies a Rule that you want to insert or delete, + * the priority of the Rule in the WebACL, and the action that you want AWS WAF to take when a web request matches the Rule + * (ALLOW, BLOCK, or COUNT).

+ *

To specify whether to insert or delete a Rule, use the Action parameter in the WebACLUpdate data type.

+ * + */ +export interface ActivatedRule { + __type?: "ActivatedRule"; + /** + * + *

Specifies the action that CloudFront or AWS WAF takes when a web request matches the conditions in the Rule. + * Valid values for Action include the following:

+ *
    + *
  • + *

    + * ALLOW: CloudFront responds with the requested object.

    + *
  • + *
  • + *

    + * BLOCK: CloudFront responds with an HTTP 403 (Forbidden) status code.

    + *
  • + *
  • + *

    + * COUNT: AWS WAF increments a counter of requests that match the conditions in the rule and then continues to + * inspect the web request based on the remaining rules in the web ACL.

    + *
  • + *
+ *

+ * ActivatedRule|OverrideAction applies only when updating or adding a + * RuleGroup to a WebACL. In this + * case, + * you do not use ActivatedRule|Action. For all other update requests, + * ActivatedRule|Action is used instead of + * ActivatedRule|OverrideAction.

+ * + */ + Action?: WafAction; + + /** + * + *

An array of rules to exclude from a rule group. This is applicable only when the ActivatedRule refers to a RuleGroup.

+ *

Sometimes it is necessary to troubleshoot rule groups that are blocking traffic + * unexpectedly (false positives). One troubleshooting technique is to identify the specific + * rule within the rule group that is blocking the legitimate traffic and then disable + * (exclude) that particular rule. You can exclude rules from both your own rule groups and + * AWS Marketplace rule groups that have been associated with a web ACL.

+ *

Specifying ExcludedRules does not remove those rules from the rule group. + * Rather, it changes the action for the rules to COUNT. Therefore, requests that + * match an ExcludedRule are counted but not blocked. The RuleGroup + * owner will receive COUNT metrics for each ExcludedRule.

+ *

If you want to exclude rules from a rule group that is already associated with a web ACL, perform the following steps:

+ *
    + *
  1. + *

    Use the AWS WAF logs to identify the IDs of the rules that you want to exclude. + * For more information about the logs, see Logging Web ACL Traffic + * Information.

    + *
  2. + *
  3. + *

    Submit an UpdateWebACL request that has two actions:

    + *
      + *
    • + *

      The first action + * deletes + * the existing rule group from the web ACL. That is, in the UpdateWebACL request, the first Updates:Action + * should be DELETE and Updates:ActivatedRule:RuleId + * should be the rule group that contains the rules that you want to + * exclude.

      + *
    • + *
    • + *

      The second action + * inserts + * the same rule group back in, but specifying the rules to exclude. That is, the + * second Updates:Action should be INSERT, + * Updates:ActivatedRule:RuleId should be the rule group that you + * just removed, and ExcludedRules should contain the rules that you + * want to exclude.

      + *
    • + *
    + * + *
  4. + *
+ * + * + * + * + */ + ExcludedRules?: Array; + + /** + * + *

Use the OverrideAction to test your RuleGroup.

+ *

Any rule in a RuleGroup can potentially block a request. If you set the OverrideAction to None, the RuleGroup will block a request if any individual rule in the RuleGroup matches the request and is configured to block that request. However if you first want to test the RuleGroup, set the OverrideAction to Count. The RuleGroup will then override any block action specified by individual rules contained within the group. Instead of blocking matching requests, those requests will be counted. You can view a record of counted requests using GetSampledRequests.

+ *

+ * ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup to a WebACL. In this case you do not use ActivatedRule|Action. For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction.

+ * + */ + OverrideAction?: WafOverrideAction; + + /** + * + *

Specifies the order in which the Rules in a WebACL are evaluated. Rules with a lower value for + * Priority are evaluated before Rules with a higher value. The value must be a unique integer. If you add multiple + * Rules to a WebACL, the values don't need to be consecutive.

+ * + */ + Priority: number | undefined; + + /** + * + *

The RuleId for a Rule. You use RuleId to get more information about a Rule (see GetRule), + * update a Rule (see UpdateRule), insert a Rule into a WebACL or delete a + * one from a WebACL (see UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).

+ *

+ * RuleId is returned by CreateRule and by ListRules.

+ * + */ + RuleId: string | undefined; + + /** + * + *

The rule type, either REGULAR, as defined by Rule, RATE_BASED, as defined by RateBasedRule, or GROUP, as defined by RuleGroup. The default is REGULAR. Although this field is optional, be aware that if you try to add a RATE_BASED rule to a web ACL without setting the type, the UpdateWebACL request will fail because the request tries to add a REGULAR rule with the specified ID, which does not exist. + *

+ * + */ + Type?: WafRuleType | string; +} + +export namespace ActivatedRule { + export function isa(o: any): o is ActivatedRule { + return _smithy.isa(o, "ActivatedRule"); + } +} + +/** + * + *

In a GetByteMatchSet request, ByteMatchSet is a complex type that contains the ByteMatchSetId and + * Name of a ByteMatchSet, and the values that you specified when you updated the ByteMatchSet.

+ *

A complex type that contains ByteMatchTuple objects, which specify the parts of web requests that you + * want AWS WAF to inspect and the values that you want AWS WAF to search for. If a ByteMatchSet contains more than one + * ByteMatchTuple object, a request needs to match the settings in only one ByteMatchTuple + * to be considered a match.

+ * + */ +export interface ByteMatchSet { + __type?: "ByteMatchSet"; + /** + * + *

The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information about a + * ByteMatchSet (see GetByteMatchSet), update a ByteMatchSet (see UpdateByteMatchSet), + * insert a ByteMatchSet into a Rule or delete one from a Rule (see UpdateRule), and + * delete a ByteMatchSet from AWS WAF (see DeleteByteMatchSet).

+ *

+ * ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets.

+ * + */ + ByteMatchSetId: string | undefined; + + /** + * + *

Specifies the bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests, the location in requests that you want AWS WAF to search, and other settings.

+ * + */ + ByteMatchTuples: Array | undefined; + + /** + * + *

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

+ * + */ + Name?: string; +} + +export namespace ByteMatchSet { + export function isa(o: any): o is ByteMatchSet { + return _smithy.isa(o, "ByteMatchSet"); + } +} + +/** + * + *

Returned by ListByteMatchSets. Each ByteMatchSetSummary object includes the Name and + * ByteMatchSetId for one ByteMatchSet.

+ * + */ +export interface ByteMatchSetSummary { + __type?: "ByteMatchSetSummary"; + /** + * + *

The ByteMatchSetId for a ByteMatchSet. You use ByteMatchSetId to get information about a ByteMatchSet, + * update a ByteMatchSet, remove a ByteMatchSet from a Rule, and delete a ByteMatchSet from AWS WAF.

+ *

+ * ByteMatchSetId is returned by CreateByteMatchSet and by ListByteMatchSets.

+ * + */ + ByteMatchSetId: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; +} + +export namespace ByteMatchSetSummary { + export function isa(o: any): o is ByteMatchSetSummary { + return _smithy.isa(o, "ByteMatchSetSummary"); + } +} + +/** + * + *

In an UpdateByteMatchSet request, ByteMatchSetUpdate specifies whether to insert or delete a + * ByteMatchTuple and includes the settings for the ByteMatchTuple.

+ * + */ +export interface ByteMatchSetUpdate { + __type?: "ByteMatchSetUpdate"; + /** + * + *

Specifies whether to insert or delete a ByteMatchTuple.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

Information about the part of a web request that you want AWS WAF to inspect and the value that you want AWS WAF to search for. + * If you specify DELETE for the value of Action, the ByteMatchTuple values must + * exactly match the values in the ByteMatchTuple that you want to delete from the ByteMatchSet.

+ * + */ + ByteMatchTuple: ByteMatchTuple | undefined; +} + +export namespace ByteMatchSetUpdate { + export function isa(o: any): o is ByteMatchSetUpdate { + return _smithy.isa(o, "ByteMatchSetUpdate"); + } +} + +/** + * + *

The bytes (typically a string that corresponds with ASCII characters) that you want AWS WAF to search for in web requests, the location in requests that you want AWS WAF to search, and other settings.

+ * + */ +export interface ByteMatchTuple { + __type?: "ByteMatchTuple"; + /** + * + *

The part of a web request that you want AWS WAF to search, such as a specified header or a query string. For more information, see + * FieldToMatch.

+ * + */ + FieldToMatch: FieldToMatch | undefined; + + /** + * + *

Within the portion of a web request that you want to search (for example, in the query string, if any), specify where you want AWS WAF to search. Valid values include the following:

+ *

+ * CONTAINS + *

+ *

The specified part of the web request must include the value of TargetString, but the location doesn't matter.

+ *

+ * CONTAINS_WORD + *

+ *

The specified part of the web request must include the value of TargetString, and + * TargetString must contain only alphanumeric characters or underscore (A-Z, a-z, 0-9, or _). In addition, + * TargetString must be a word, which means one of the following:

+ *
    + *
  • + *

    + * TargetString exactly matches the value of the specified part of the web request, such as the value of a + * header.

    + *
  • + *
  • + *

    + * TargetString is at the beginning of the specified part of the web request and is followed by a character + * other than an alphanumeric character or underscore (_), for example, BadBot;.

    + *
  • + *
  • + *

    + * TargetString is at the end of the specified part of the web request and is preceded by a character + * other than an alphanumeric character or underscore (_), for example, ;BadBot.

    + *
  • + *
  • + *

    + * TargetString is in the middle of the specified part of the web request and is preceded and followed + * by characters other than alphanumeric characters or underscore (_), for example, -BadBot;.

    + *
  • + *
+ *

+ * EXACTLY + *

+ *

The value of the specified part of the web request must exactly match the value of TargetString.

+ *

+ * STARTS_WITH + *

+ *

The value of TargetString must appear at the beginning of the specified part of the web request.

+ *

+ * ENDS_WITH + *

+ *

The value of TargetString must appear at the end of the specified part of the web request.

+ * + */ + PositionalConstraint: PositionalConstraint | string | undefined; + + /** + * + *

The value that you want AWS WAF to search for. AWS WAF searches for the specified string in the part of web requests that you + * specified in FieldToMatch. The maximum length of the value is 50 bytes.

+ *

Valid values depend on the values that you specified for FieldToMatch:

+ *
    + *
  • + *

    + * HEADER: The value that you want AWS WAF to search for in the request header that you specified in + * FieldToMatch, for example, the value of the User-Agent or Referer header.

    + *
  • + *
  • + *

    + * METHOD: The HTTP method, which indicates the type of operation specified in the request. + * CloudFront supports the following methods: DELETE, GET, HEAD, OPTIONS, + * PATCH, POST, and PUT.

    + *
  • + *
  • + *

    + * QUERY_STRING: The value that you want AWS WAF to search for in the query string, which is the part + * of a URL that appears after a ? character.

    + *
  • + *
  • + *

    + * URI: The value that you want AWS WAF to search for in the part of a URL that identifies a resource, + * for example, /images/daily-ad.jpg.

    + *
  • + *
  • + *

    + * BODY: The part of a request that contains any additional data that you want to send to your web server + * as the HTTP request body, such as data from a form. The request body immediately follows the request headers. + * Note that only the first 8192 bytes of the request body are forwarded to AWS WAF for inspection. + * To allow or block requests based on the length of the body, you can create a size constraint set. + * For more information, see CreateSizeConstraintSet.

    + *
  • + *
  • + *

    + * SINGLE_QUERY_ARG: The parameter in the query string that you will inspect, such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG is 30 characters.

    + *
  • + *
  • + *

    + * ALL_QUERY_ARGS: Similar to SINGLE_QUERY_ARG, but instead of + * inspecting a single parameter, AWS WAF inspects all parameters within the query + * string for the value or regex pattern that you specify in + * TargetString.

    + *
  • + *
+ * + *

If TargetString includes alphabetic characters A-Z and a-z, note that the value is case sensitive.

+ *

+ * If you're using the AWS WAF API + *

+ *

Specify a base64-encoded version of the value. The maximum length of the value before you base64-encode it is 50 bytes.

+ *

For example, suppose the value of Type is HEADER and the + * value of Data is User-Agent. If you want to search the + * User-Agent header for the value BadBot, you base64-encode + * BadBot using MIME + * base64-encoding + * and include the resulting value, QmFkQm90, in the value of + * TargetString.

+ *

+ * If you're using the AWS CLI or one of the AWS SDKs + *

+ *

The value that you want AWS WAF to search for. The SDK automatically base64 encodes the value.

+ * + */ + TargetString: Uint8Array | undefined; + + /** + * + *

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. + * If you specify a transformation, AWS WAF performs the transformation on TargetString before inspecting a request for a match.

+ *

You can only specify a single type of TextTransformation.

+ *

+ * CMD_LINE + *

+ *

When you're concerned that attackers are injecting an operating system command line + * command and using unusual formatting to disguise some or all of the command, use this + * option to perform the following transformations:

+ *
    + *
  • + *

    Delete the following characters: \ " ' ^

    + *
  • + *
  • + *

    Delete spaces before the following characters: / (

    + *
  • + *
  • + *

    Replace the following characters with a space: , ;

    + *
  • + *
  • + *

    Replace multiple spaces with one space

    + *
  • + *
  • + *

    Convert uppercase letters (A-Z) to lowercase (a-z)

    + *
  • + *
+ * + *

+ * COMPRESS_WHITE_SPACE + *

+ *

Use this option to replace the following characters with a space character (decimal 32):

+ *
    + *
  • + *

    \f, formfeed, decimal 12

    + *
  • + *
  • + *

    \t, tab, decimal 9

    + *
  • + *
  • + *

    \n, newline, decimal 10

    + *
  • + *
  • + *

    \r, carriage return, decimal 13

    + *
  • + *
  • + *

    \v, vertical tab, decimal 11

    + *
  • + *
  • + *

    non-breaking space, decimal 160

    + *
  • + *
+ *

+ * COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.

+ *

+ * HTML_ENTITY_DECODE + *

+ *

Use this option to replace HTML-encoded characters with unencoded characters. HTML_ENTITY_DECODE performs + * the following operations:

+ *
    + *
  • + *

    Replaces (ampersand)quot; with " + *

    + *
  • + *
  • + *

    Replaces (ampersand)nbsp; with a non-breaking space, decimal 160

    + *
  • + *
  • + *

    Replaces (ampersand)lt; with a "less than" symbol

    + *
  • + *
  • + *

    Replaces (ampersand)gt; with > + *

    + *
  • + *
  • + *

    Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, with the corresponding + * characters

    + *
  • + *
  • + *

    Replaces characters that are represented in decimal format, (ampersand)#nnnn;, with the corresponding + * characters

    + *
  • + *
+ *

+ * LOWERCASE + *

+ *

Use this option to convert uppercase letters (A-Z) to lowercase (a-z).

+ *

+ * URL_DECODE + *

+ *

Use this option to decode a URL-encoded value.

+ *

+ * NONE + *

+ *

Specify NONE if you don't want to perform any text transformations.

+ * + */ + TextTransformation: TextTransformation | string | undefined; +} + +export namespace ByteMatchTuple { + export function isa(o: any): o is ByteMatchTuple { + return _smithy.isa(o, "ByteMatchTuple"); + } +} + +export enum ChangeAction { + DELETE = "DELETE", + INSERT = "INSERT" +} + +export enum ChangeTokenStatus { + INSYNC = "INSYNC", + PENDING = "PENDING", + PROVISIONED = "PROVISIONED" +} + +export enum ComparisonOperator { + EQ = "EQ", + GE = "GE", + GT = "GT", + LE = "LE", + LT = "LT", + NE = "NE" +} + +export interface CreateByteMatchSetRequest { + __type?: "CreateByteMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; +} + +export namespace CreateByteMatchSetRequest { + export function isa(o: any): o is CreateByteMatchSetRequest { + return _smithy.isa(o, "CreateByteMatchSetRequest"); + } +} + +export interface CreateByteMatchSetResponse extends $MetadataBearer { + __type?: "CreateByteMatchSetResponse"; + /** + * + *

A ByteMatchSet that contains no ByteMatchTuple objects.

+ * + */ + ByteMatchSet?: ByteMatchSet; + + /** + * + *

The ChangeToken that you used to submit the CreateByteMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace CreateByteMatchSetResponse { + export function isa(o: any): o is CreateByteMatchSetResponse { + return _smithy.isa(o, "CreateByteMatchSetResponse"); + } +} + +export interface CreateGeoMatchSetRequest { + __type?: "CreateGeoMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; +} + +export namespace CreateGeoMatchSetRequest { + export function isa(o: any): o is CreateGeoMatchSetRequest { + return _smithy.isa(o, "CreateGeoMatchSetRequest"); + } +} + +export interface CreateGeoMatchSetResponse extends $MetadataBearer { + __type?: "CreateGeoMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateGeoMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

The GeoMatchSet returned in the CreateGeoMatchSet response. The GeoMatchSet contains no GeoMatchConstraints.

+ * + */ + GeoMatchSet?: GeoMatchSet; +} + +export namespace CreateGeoMatchSetResponse { + export function isa(o: any): o is CreateGeoMatchSetResponse { + return _smithy.isa(o, "CreateGeoMatchSetResponse"); + } +} + +export interface CreateIPSetRequest { + __type?: "CreateIPSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; +} + +export namespace CreateIPSetRequest { + export function isa(o: any): o is CreateIPSetRequest { + return _smithy.isa(o, "CreateIPSetRequest"); + } +} + +export interface CreateIPSetResponse extends $MetadataBearer { + __type?: "CreateIPSetResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateIPSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

The IPSet returned in the CreateIPSet response.

+ * + */ + IPSet?: IPSet; +} + +export namespace CreateIPSetResponse { + export function isa(o: any): o is CreateIPSetResponse { + return _smithy.isa(o, "CreateIPSetResponse"); + } +} + +export interface CreateRateBasedRuleRequest { + __type?: "CreateRateBasedRuleRequest"; + /** + * + *

The ChangeToken that you used to submit the + * CreateRateBasedRule request. You can also use this value to query the + * status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

A friendly name or description for the metrics for this RateBasedRule. + * The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain + * whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after you create the + * RateBasedRule.

+ * + */ + MetricName: string | undefined; + + /** + * + *

A friendly name or description of the RateBasedRule. You can't + * change the name of a RateBasedRule after you create it.

+ * + */ + Name: string | undefined; + + /** + * + *

The field that AWS WAF uses to determine if requests are likely arriving from a single + * source and thus subject to rate monitoring. The only valid value for RateKey + * is IP. IP indicates that requests that arrive from the same IP + * address are subject to the RateLimit that is specified in + * the RateBasedRule.

+ * + */ + RateKey: RateKey | string | undefined; + + /** + * + *

The maximum number of requests, which have an identical value in the field that is + * specified by RateKey, allowed in a five-minute period. If the number of + * requests exceeds the RateLimit and the other predicates specified in the rule + * are also met, AWS WAF triggers the action that is specified for this rule.

+ * + */ + RateLimit: number | undefined; + + Tags?: Array; +} + +export namespace CreateRateBasedRuleRequest { + export function isa(o: any): o is CreateRateBasedRuleRequest { + return _smithy.isa(o, "CreateRateBasedRuleRequest"); + } +} + +export interface CreateRateBasedRuleResponse extends $MetadataBearer { + __type?: "CreateRateBasedRuleResponse"; + /** + * + *

The ChangeToken that you used to submit the + * CreateRateBasedRule request. You can also use this value to query the + * status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

The RateBasedRule + * that is returned in the CreateRateBasedRule response.

+ * + */ + Rule?: RateBasedRule; +} + +export namespace CreateRateBasedRuleResponse { + export function isa(o: any): o is CreateRateBasedRuleResponse { + return _smithy.isa(o, "CreateRateBasedRuleResponse"); + } +} + +export interface CreateRegexMatchSetRequest { + __type?: "CreateRegexMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; +} + +export namespace CreateRegexMatchSetRequest { + export function isa(o: any): o is CreateRegexMatchSetRequest { + return _smithy.isa(o, "CreateRegexMatchSetRequest"); + } +} + +export interface CreateRegexMatchSetResponse extends $MetadataBearer { + __type?: "CreateRegexMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateRegexMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

A RegexMatchSet that contains no RegexMatchTuple objects.

+ * + */ + RegexMatchSet?: RegexMatchSet; +} + +export namespace CreateRegexMatchSetResponse { + export function isa(o: any): o is CreateRegexMatchSetResponse { + return _smithy.isa(o, "CreateRegexMatchSetResponse"); + } +} + +export interface CreateRegexPatternSetRequest { + __type?: "CreateRegexPatternSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; +} + +export namespace CreateRegexPatternSetRequest { + export function isa(o: any): o is CreateRegexPatternSetRequest { + return _smithy.isa(o, "CreateRegexPatternSetRequest"); + } +} + +export interface CreateRegexPatternSetResponse extends $MetadataBearer { + __type?: "CreateRegexPatternSetResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateRegexPatternSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

A RegexPatternSet that contains no objects.

+ * + */ + RegexPatternSet?: RegexPatternSet; +} + +export namespace CreateRegexPatternSetResponse { + export function isa(o: any): o is CreateRegexPatternSetResponse { + return _smithy.isa(o, "CreateRegexPatternSetResponse"); + } +} + +export interface CreateRuleGroupRequest { + __type?: "CreateRuleGroupRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

A friendly name or description for the metrics for this RuleGroup. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain + * whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after you create the RuleGroup.

+ * + */ + MetricName: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; + + Tags?: Array; +} + +export namespace CreateRuleGroupRequest { + export function isa(o: any): o is CreateRuleGroupRequest { + return _smithy.isa(o, "CreateRuleGroupRequest"); + } +} + +export interface CreateRuleGroupResponse extends $MetadataBearer { + __type?: "CreateRuleGroupResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateRuleGroup request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

An empty RuleGroup.

+ * + */ + RuleGroup?: RuleGroup; +} + +export namespace CreateRuleGroupResponse { + export function isa(o: any): o is CreateRuleGroupResponse { + return _smithy.isa(o, "CreateRuleGroupResponse"); + } +} + +export interface CreateRuleRequest { + __type?: "CreateRuleRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

A friendly name or description for the metrics for this Rule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain + * whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after you create the + * Rule.

+ * + */ + MetricName: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; + + Tags?: Array; +} + +export namespace CreateRuleRequest { + export function isa(o: any): o is CreateRuleRequest { + return _smithy.isa(o, "CreateRuleRequest"); + } +} + +export interface CreateRuleResponse extends $MetadataBearer { + __type?: "CreateRuleResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateRule request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

The Rule returned in the CreateRule response.

+ * + */ + Rule?: Rule; +} + +export namespace CreateRuleResponse { + export function isa(o: any): o is CreateRuleResponse { + return _smithy.isa(o, "CreateRuleResponse"); + } +} + +export interface CreateSizeConstraintSetRequest { + __type?: "CreateSizeConstraintSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; +} + +export namespace CreateSizeConstraintSetRequest { + export function isa(o: any): o is CreateSizeConstraintSetRequest { + return _smithy.isa(o, "CreateSizeConstraintSetRequest"); + } +} + +export interface CreateSizeConstraintSetResponse extends $MetadataBearer { + __type?: "CreateSizeConstraintSetResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateSizeConstraintSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

A SizeConstraintSet that contains no SizeConstraint objects.

+ * + */ + SizeConstraintSet?: SizeConstraintSet; +} + +export namespace CreateSizeConstraintSetResponse { + export function isa(o: any): o is CreateSizeConstraintSetResponse { + return _smithy.isa(o, "CreateSizeConstraintSetResponse"); + } +} + +/** + * + *

A request to create a SqlInjectionMatchSet.

+ * + */ +export interface CreateSqlInjectionMatchSetRequest { + __type?: "CreateSqlInjectionMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

A friendly name or description for the SqlInjectionMatchSet that you're creating. You can't change Name + * after you create the SqlInjectionMatchSet.

+ * + */ + Name: string | undefined; +} + +export namespace CreateSqlInjectionMatchSetRequest { + export function isa(o: any): o is CreateSqlInjectionMatchSetRequest { + return _smithy.isa(o, "CreateSqlInjectionMatchSetRequest"); + } +} + +/** + * + *

The response to a CreateSqlInjectionMatchSet request.

+ * + */ +export interface CreateSqlInjectionMatchSetResponse extends $MetadataBearer { + __type?: "CreateSqlInjectionMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateSqlInjectionMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

A SqlInjectionMatchSet.

+ * + */ + SqlInjectionMatchSet?: SqlInjectionMatchSet; +} + +export namespace CreateSqlInjectionMatchSetResponse { + export function isa(o: any): o is CreateSqlInjectionMatchSetResponse { + return _smithy.isa(o, "CreateSqlInjectionMatchSetResponse"); + } +} + +export interface CreateWebACLRequest { + __type?: "CreateWebACLRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The action that you want AWS WAF to take when a request doesn't match the criteria specified in any of the Rule + * objects that are associated with the WebACL.

+ * + */ + DefaultAction: WafAction | undefined; + + /** + * + *

A friendly name or description for the metrics for this WebACL.The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain + * whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the + * WebACL.

+ * + */ + MetricName: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; + + Tags?: Array; +} + +export namespace CreateWebACLRequest { + export function isa(o: any): o is CreateWebACLRequest { + return _smithy.isa(o, "CreateWebACLRequest"); + } +} + +export interface CreateWebACLResponse extends $MetadataBearer { + __type?: "CreateWebACLResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateWebACL request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

The WebACL returned in the CreateWebACL response.

+ * + */ + WebACL?: WebACL; +} + +export namespace CreateWebACLResponse { + export function isa(o: any): o is CreateWebACLResponse { + return _smithy.isa(o, "CreateWebACLResponse"); + } +} + +/** + * + *

A request to create an XssMatchSet.

+ * + */ +export interface CreateXssMatchSetRequest { + __type?: "CreateXssMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

A friendly name or description for the XssMatchSet that you're creating. You can't change Name + * after you create the XssMatchSet.

+ * + */ + Name: string | undefined; +} + +export namespace CreateXssMatchSetRequest { + export function isa(o: any): o is CreateXssMatchSetRequest { + return _smithy.isa(o, "CreateXssMatchSetRequest"); + } +} + +/** + * + *

The response to a CreateXssMatchSet request.

+ * + */ +export interface CreateXssMatchSetResponse extends $MetadataBearer { + __type?: "CreateXssMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the CreateXssMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; + + /** + * + *

An XssMatchSet.

+ * + */ + XssMatchSet?: XssMatchSet; +} + +export namespace CreateXssMatchSetResponse { + export function isa(o: any): o is CreateXssMatchSetResponse { + return _smithy.isa(o, "CreateXssMatchSetResponse"); + } +} + +export interface DeleteByteMatchSetRequest { + __type?: "DeleteByteMatchSetRequest"; + /** + * + *

The ByteMatchSetId of the ByteMatchSet that you want to delete. ByteMatchSetId is returned by CreateByteMatchSet and by + * ListByteMatchSets.

+ * + */ + ByteMatchSetId: string | undefined; + + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; +} + +export namespace DeleteByteMatchSetRequest { + export function isa(o: any): o is DeleteByteMatchSetRequest { + return _smithy.isa(o, "DeleteByteMatchSetRequest"); + } +} + +export interface DeleteByteMatchSetResponse extends $MetadataBearer { + __type?: "DeleteByteMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteByteMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteByteMatchSetResponse { + export function isa(o: any): o is DeleteByteMatchSetResponse { + return _smithy.isa(o, "DeleteByteMatchSetResponse"); + } +} + +export interface DeleteGeoMatchSetRequest { + __type?: "DeleteGeoMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The GeoMatchSetID of the GeoMatchSet that you want to delete. GeoMatchSetId is returned by CreateGeoMatchSet and by + * ListGeoMatchSets.

+ * + */ + GeoMatchSetId: string | undefined; +} + +export namespace DeleteGeoMatchSetRequest { + export function isa(o: any): o is DeleteGeoMatchSetRequest { + return _smithy.isa(o, "DeleteGeoMatchSetRequest"); + } +} + +export interface DeleteGeoMatchSetResponse extends $MetadataBearer { + __type?: "DeleteGeoMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteGeoMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteGeoMatchSetResponse { + export function isa(o: any): o is DeleteGeoMatchSetResponse { + return _smithy.isa(o, "DeleteGeoMatchSetResponse"); + } +} + +export interface DeleteIPSetRequest { + __type?: "DeleteIPSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The IPSetId of the IPSet that you want to delete. IPSetId is returned by CreateIPSet and by + * ListIPSets.

+ * + */ + IPSetId: string | undefined; +} + +export namespace DeleteIPSetRequest { + export function isa(o: any): o is DeleteIPSetRequest { + return _smithy.isa(o, "DeleteIPSetRequest"); + } +} + +export interface DeleteIPSetResponse extends $MetadataBearer { + __type?: "DeleteIPSetResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteIPSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteIPSetResponse { + export function isa(o: any): o is DeleteIPSetResponse { + return _smithy.isa(o, "DeleteIPSetResponse"); + } +} + +export interface DeleteLoggingConfigurationRequest { + __type?: "DeleteLoggingConfigurationRequest"; + /** + * + *

The Amazon Resource Name (ARN) of the web ACL from which you want to delete the LoggingConfiguration.

+ * + */ + ResourceArn: string | undefined; +} + +export namespace DeleteLoggingConfigurationRequest { + export function isa(o: any): o is DeleteLoggingConfigurationRequest { + return _smithy.isa(o, "DeleteLoggingConfigurationRequest"); + } +} + +export interface DeleteLoggingConfigurationResponse extends $MetadataBearer { + __type?: "DeleteLoggingConfigurationResponse"; +} + +export namespace DeleteLoggingConfigurationResponse { + export function isa(o: any): o is DeleteLoggingConfigurationResponse { + return _smithy.isa(o, "DeleteLoggingConfigurationResponse"); + } +} + +export interface DeletePermissionPolicyRequest { + __type?: "DeletePermissionPolicyRequest"; + /** + * + *

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

+ *

The user making the request must be the owner of the RuleGroup.

+ * + */ + ResourceArn: string | undefined; +} + +export namespace DeletePermissionPolicyRequest { + export function isa(o: any): o is DeletePermissionPolicyRequest { + return _smithy.isa(o, "DeletePermissionPolicyRequest"); + } +} + +export interface DeletePermissionPolicyResponse extends $MetadataBearer { + __type?: "DeletePermissionPolicyResponse"; +} + +export namespace DeletePermissionPolicyResponse { + export function isa(o: any): o is DeletePermissionPolicyResponse { + return _smithy.isa(o, "DeletePermissionPolicyResponse"); + } +} + +export interface DeleteRateBasedRuleRequest { + __type?: "DeleteRateBasedRuleRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The RuleId of the RateBasedRule that you want to + * delete. RuleId is returned by CreateRateBasedRule and by + * ListRateBasedRules.

+ * + */ + RuleId: string | undefined; +} + +export namespace DeleteRateBasedRuleRequest { + export function isa(o: any): o is DeleteRateBasedRuleRequest { + return _smithy.isa(o, "DeleteRateBasedRuleRequest"); + } +} + +export interface DeleteRateBasedRuleResponse extends $MetadataBearer { + __type?: "DeleteRateBasedRuleResponse"; + /** + * + *

The ChangeToken that you used to submit the + * DeleteRateBasedRule request. You can also use this value to query the + * status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteRateBasedRuleResponse { + export function isa(o: any): o is DeleteRateBasedRuleResponse { + return _smithy.isa(o, "DeleteRateBasedRuleResponse"); + } +} + +export interface DeleteRegexMatchSetRequest { + __type?: "DeleteRegexMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The RegexMatchSetId of the RegexMatchSet that you want to delete. RegexMatchSetId is returned by CreateRegexMatchSet and by + * ListRegexMatchSets.

+ * + */ + RegexMatchSetId: string | undefined; +} + +export namespace DeleteRegexMatchSetRequest { + export function isa(o: any): o is DeleteRegexMatchSetRequest { + return _smithy.isa(o, "DeleteRegexMatchSetRequest"); + } +} + +export interface DeleteRegexMatchSetResponse extends $MetadataBearer { + __type?: "DeleteRegexMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteRegexMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteRegexMatchSetResponse { + export function isa(o: any): o is DeleteRegexMatchSetResponse { + return _smithy.isa(o, "DeleteRegexMatchSetResponse"); + } +} + +export interface DeleteRegexPatternSetRequest { + __type?: "DeleteRegexPatternSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The RegexPatternSetId of the RegexPatternSet that you want to delete. RegexPatternSetId is returned by CreateRegexPatternSet and by + * ListRegexPatternSets.

+ * + */ + RegexPatternSetId: string | undefined; +} + +export namespace DeleteRegexPatternSetRequest { + export function isa(o: any): o is DeleteRegexPatternSetRequest { + return _smithy.isa(o, "DeleteRegexPatternSetRequest"); + } +} + +export interface DeleteRegexPatternSetResponse extends $MetadataBearer { + __type?: "DeleteRegexPatternSetResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteRegexPatternSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteRegexPatternSetResponse { + export function isa(o: any): o is DeleteRegexPatternSetResponse { + return _smithy.isa(o, "DeleteRegexPatternSetResponse"); + } +} + +export interface DeleteRuleGroupRequest { + __type?: "DeleteRuleGroupRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The RuleGroupId of the RuleGroup that you want to delete. RuleGroupId is returned by CreateRuleGroup and by + * ListRuleGroups.

+ * + */ + RuleGroupId: string | undefined; +} + +export namespace DeleteRuleGroupRequest { + export function isa(o: any): o is DeleteRuleGroupRequest { + return _smithy.isa(o, "DeleteRuleGroupRequest"); + } +} + +export interface DeleteRuleGroupResponse extends $MetadataBearer { + __type?: "DeleteRuleGroupResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteRuleGroup request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteRuleGroupResponse { + export function isa(o: any): o is DeleteRuleGroupResponse { + return _smithy.isa(o, "DeleteRuleGroupResponse"); + } +} + +export interface DeleteRuleRequest { + __type?: "DeleteRuleRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The RuleId of the Rule that you want to delete. RuleId is returned by CreateRule and by + * ListRules.

+ * + */ + RuleId: string | undefined; +} + +export namespace DeleteRuleRequest { + export function isa(o: any): o is DeleteRuleRequest { + return _smithy.isa(o, "DeleteRuleRequest"); + } +} + +export interface DeleteRuleResponse extends $MetadataBearer { + __type?: "DeleteRuleResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteRule request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteRuleResponse { + export function isa(o: any): o is DeleteRuleResponse { + return _smithy.isa(o, "DeleteRuleResponse"); + } +} + +export interface DeleteSizeConstraintSetRequest { + __type?: "DeleteSizeConstraintSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The SizeConstraintSetId of the SizeConstraintSet that you want to delete. SizeConstraintSetId + * is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.

+ * + */ + SizeConstraintSetId: string | undefined; +} + +export namespace DeleteSizeConstraintSetRequest { + export function isa(o: any): o is DeleteSizeConstraintSetRequest { + return _smithy.isa(o, "DeleteSizeConstraintSetRequest"); + } +} + +export interface DeleteSizeConstraintSetResponse extends $MetadataBearer { + __type?: "DeleteSizeConstraintSetResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteSizeConstraintSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteSizeConstraintSetResponse { + export function isa(o: any): o is DeleteSizeConstraintSetResponse { + return _smithy.isa(o, "DeleteSizeConstraintSetResponse"); + } +} + +/** + * + *

A request to delete a SqlInjectionMatchSet from AWS WAF.

+ * + */ +export interface DeleteSqlInjectionMatchSetRequest { + __type?: "DeleteSqlInjectionMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to delete. + * SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.

+ * + */ + SqlInjectionMatchSetId: string | undefined; +} + +export namespace DeleteSqlInjectionMatchSetRequest { + export function isa(o: any): o is DeleteSqlInjectionMatchSetRequest { + return _smithy.isa(o, "DeleteSqlInjectionMatchSetRequest"); + } +} + +/** + * + *

The response to a request to delete a SqlInjectionMatchSet from AWS WAF.

+ * + */ +export interface DeleteSqlInjectionMatchSetResponse extends $MetadataBearer { + __type?: "DeleteSqlInjectionMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteSqlInjectionMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteSqlInjectionMatchSetResponse { + export function isa(o: any): o is DeleteSqlInjectionMatchSetResponse { + return _smithy.isa(o, "DeleteSqlInjectionMatchSetResponse"); + } +} + +export interface DeleteWebACLRequest { + __type?: "DeleteWebACLRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The WebACLId of the WebACL that you want to delete. WebACLId is returned by CreateWebACL and by + * ListWebACLs.

+ * + */ + WebACLId: string | undefined; +} + +export namespace DeleteWebACLRequest { + export function isa(o: any): o is DeleteWebACLRequest { + return _smithy.isa(o, "DeleteWebACLRequest"); + } +} + +export interface DeleteWebACLResponse extends $MetadataBearer { + __type?: "DeleteWebACLResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteWebACL request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteWebACLResponse { + export function isa(o: any): o is DeleteWebACLResponse { + return _smithy.isa(o, "DeleteWebACLResponse"); + } +} + +/** + * + *

A request to delete an XssMatchSet from AWS WAF.

+ * + */ +export interface DeleteXssMatchSetRequest { + __type?: "DeleteXssMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The XssMatchSetId of the XssMatchSet that you want to delete. + * XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.

+ * + */ + XssMatchSetId: string | undefined; +} + +export namespace DeleteXssMatchSetRequest { + export function isa(o: any): o is DeleteXssMatchSetRequest { + return _smithy.isa(o, "DeleteXssMatchSetRequest"); + } +} + +/** + * + *

The response to a request to delete an XssMatchSet from AWS WAF.

+ * + */ +export interface DeleteXssMatchSetResponse extends $MetadataBearer { + __type?: "DeleteXssMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the DeleteXssMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace DeleteXssMatchSetResponse { + export function isa(o: any): o is DeleteXssMatchSetResponse { + return _smithy.isa(o, "DeleteXssMatchSetResponse"); + } +} + +/** + * + *

The rule to exclude from a rule group. This is applicable only when the + * ActivatedRule refers to a RuleGroup. The rule must belong to + * the RuleGroup that is specified by the ActivatedRule.

+ * + */ +export interface ExcludedRule { + __type?: "ExcludedRule"; + /** + * + *

The unique identifier for the rule to exclude from the rule group.

+ * + */ + RuleId: string | undefined; +} + +export namespace ExcludedRule { + export function isa(o: any): o is ExcludedRule { + return _smithy.isa(o, "ExcludedRule"); + } +} + +/** + * + *

Specifies where in a web request to look for TargetString.

+ * + */ +export interface FieldToMatch { + __type?: "FieldToMatch"; + /** + * + *

When the value of Type is HEADER, enter the name of the header that you want AWS WAF to search, + * for example, User-Agent or Referer. The name of the header is not case sensitive.

+ *

When the value of Type is SINGLE_QUERY_ARG, enter the name of the parameter that you want AWS WAF to search, + * for example, UserName or SalesRegion. The parameter name is not case sensitive.

+ *

If the value of Type is any other value, omit Data.

+ * + */ + Data?: string; + + /** + * + *

The part of the web request that you want AWS WAF to search for a specified string. Parts of a request that you can search include the following:

+ *
    + *
  • + *

    + * HEADER: A specified request header, for example, the value of the User-Agent or Referer header. + * If you choose HEADER for the type, specify the name of the header in Data.

    + *
  • + *
  • + *

    + * METHOD: The HTTP method, which indicated the type of operation that the request is asking the origin to perform. + * Amazon CloudFront supports the following methods: DELETE, GET, HEAD, OPTIONS, PATCH, + * POST, and PUT.

    + *
  • + *
  • + *

    + * QUERY_STRING: A query string, which is the part of a URL that appears after a ? character, if any.

    + *
  • + *
  • + *

    + * URI: The part of a web request that identifies a resource, for example, /images/daily-ad.jpg.

    + *
  • + *
  • + *

    + * BODY: The part of a request that contains any additional data that you want to send to your web server + * as the HTTP request body, such as data from a form. The request body immediately follows the request headers. + * Note that only the first 8192 bytes of the request body are forwarded to AWS WAF for inspection. + * To allow or block requests based on the length of the body, you can create a size constraint set. + * For more information, see CreateSizeConstraintSet.

    + *
  • + *
  • + *

    + * SINGLE_QUERY_ARG: The parameter in the query string that you will inspect, such as UserName or SalesRegion. The maximum length for SINGLE_QUERY_ARG is 30 characters.

    + *
  • + *
  • + *

    + * ALL_QUERY_ARGS: Similar to SINGLE_QUERY_ARG, but rather than inspecting a single parameter, AWS WAF will inspect all parameters within the query for the value or regex pattern that you specify in + * TargetString.

    + *
  • + *
+ * + */ + Type: MatchFieldType | string | undefined; +} + +export namespace FieldToMatch { + export function isa(o: any): o is FieldToMatch { + return _smithy.isa(o, "FieldToMatch"); + } +} + +/** + * + *

The country from which web requests originate that you want AWS WAF to search for.

+ * + */ +export interface GeoMatchConstraint { + __type?: "GeoMatchConstraint"; + /** + * + *

The type of geographical area you want AWS WAF to search for. Currently Country is the only valid value.

+ * + */ + Type: GeoMatchConstraintType | string | undefined; + + /** + * + *

The country that you want AWS WAF to search for.

+ * + */ + Value: GeoMatchConstraintValue | string | undefined; +} + +export namespace GeoMatchConstraint { + export function isa(o: any): o is GeoMatchConstraint { + return _smithy.isa(o, "GeoMatchConstraint"); + } +} + +export enum GeoMatchConstraintType { + Country = "Country" +} + +export enum GeoMatchConstraintValue { + AD = "AD", + AE = "AE", + AF = "AF", + AG = "AG", + AI = "AI", + AL = "AL", + AM = "AM", + AO = "AO", + AQ = "AQ", + AR = "AR", + AS = "AS", + AT = "AT", + AU = "AU", + AW = "AW", + AX = "AX", + AZ = "AZ", + BA = "BA", + BB = "BB", + BD = "BD", + BE = "BE", + BF = "BF", + BG = "BG", + BH = "BH", + BI = "BI", + BJ = "BJ", + BL = "BL", + BM = "BM", + BN = "BN", + BO = "BO", + BQ = "BQ", + BR = "BR", + BS = "BS", + BT = "BT", + BV = "BV", + BW = "BW", + BY = "BY", + BZ = "BZ", + CA = "CA", + CC = "CC", + CD = "CD", + CF = "CF", + CG = "CG", + CH = "CH", + CI = "CI", + CK = "CK", + CL = "CL", + CM = "CM", + CN = "CN", + CO = "CO", + CR = "CR", + CU = "CU", + CV = "CV", + CW = "CW", + CX = "CX", + CY = "CY", + CZ = "CZ", + DE = "DE", + DJ = "DJ", + DK = "DK", + DM = "DM", + DO = "DO", + DZ = "DZ", + EC = "EC", + EE = "EE", + EG = "EG", + EH = "EH", + ER = "ER", + ES = "ES", + ET = "ET", + FI = "FI", + FJ = "FJ", + FK = "FK", + FM = "FM", + FO = "FO", + FR = "FR", + GA = "GA", + GB = "GB", + GD = "GD", + GE = "GE", + GF = "GF", + GG = "GG", + GH = "GH", + GI = "GI", + GL = "GL", + GM = "GM", + GN = "GN", + GP = "GP", + GQ = "GQ", + GR = "GR", + GS = "GS", + GT = "GT", + GU = "GU", + GW = "GW", + GY = "GY", + HK = "HK", + HM = "HM", + HN = "HN", + HR = "HR", + HT = "HT", + HU = "HU", + ID = "ID", + IE = "IE", + IL = "IL", + IM = "IM", + IN = "IN", + IO = "IO", + IQ = "IQ", + IR = "IR", + IS = "IS", + IT = "IT", + JE = "JE", + JM = "JM", + JO = "JO", + JP = "JP", + KE = "KE", + KG = "KG", + KH = "KH", + KI = "KI", + KM = "KM", + KN = "KN", + KP = "KP", + KR = "KR", + KW = "KW", + KY = "KY", + KZ = "KZ", + LA = "LA", + LB = "LB", + LC = "LC", + LI = "LI", + LK = "LK", + LR = "LR", + LS = "LS", + LT = "LT", + LU = "LU", + LV = "LV", + LY = "LY", + MA = "MA", + MC = "MC", + MD = "MD", + ME = "ME", + MF = "MF", + MG = "MG", + MH = "MH", + MK = "MK", + ML = "ML", + MM = "MM", + MN = "MN", + MO = "MO", + MP = "MP", + MQ = "MQ", + MR = "MR", + MS = "MS", + MT = "MT", + MU = "MU", + MV = "MV", + MW = "MW", + MX = "MX", + MY = "MY", + MZ = "MZ", + NA = "NA", + NC = "NC", + NE = "NE", + NF = "NF", + NG = "NG", + NI = "NI", + NL = "NL", + NO = "NO", + NP = "NP", + NR = "NR", + NU = "NU", + NZ = "NZ", + OM = "OM", + PA = "PA", + PE = "PE", + PF = "PF", + PG = "PG", + PH = "PH", + PK = "PK", + PL = "PL", + PM = "PM", + PN = "PN", + PR = "PR", + PS = "PS", + PT = "PT", + PW = "PW", + PY = "PY", + QA = "QA", + RE = "RE", + RO = "RO", + RS = "RS", + RU = "RU", + RW = "RW", + SA = "SA", + SB = "SB", + SC = "SC", + SD = "SD", + SE = "SE", + SG = "SG", + SH = "SH", + SI = "SI", + SJ = "SJ", + SK = "SK", + SL = "SL", + SM = "SM", + SN = "SN", + SO = "SO", + SR = "SR", + SS = "SS", + ST = "ST", + SV = "SV", + SX = "SX", + SY = "SY", + SZ = "SZ", + TC = "TC", + TD = "TD", + TF = "TF", + TG = "TG", + TH = "TH", + TJ = "TJ", + TK = "TK", + TL = "TL", + TM = "TM", + TN = "TN", + TO = "TO", + TR = "TR", + TT = "TT", + TV = "TV", + TW = "TW", + TZ = "TZ", + UA = "UA", + UG = "UG", + UM = "UM", + US = "US", + UY = "UY", + UZ = "UZ", + VA = "VA", + VC = "VC", + VE = "VE", + VG = "VG", + VI = "VI", + VN = "VN", + VU = "VU", + WF = "WF", + WS = "WS", + YE = "YE", + YT = "YT", + ZA = "ZA", + ZM = "ZM", + ZW = "ZW" +} + +/** + * + *

Contains one or more countries that AWS WAF will search for.

+ * + */ +export interface GeoMatchSet { + __type?: "GeoMatchSet"; + /** + * + *

An array of GeoMatchConstraint objects, which contain the country that you want AWS WAF to search for.

+ * + */ + GeoMatchConstraints: Array | undefined; + + /** + * + *

The GeoMatchSetId for an GeoMatchSet. You use GeoMatchSetId to get information about a + * GeoMatchSet (see GeoMatchSet), update a GeoMatchSet (see UpdateGeoMatchSet), insert a GeoMatchSet into a Rule or delete one from a Rule (see UpdateRule), and delete a GeoMatchSet from AWS WAF (see DeleteGeoMatchSet).

+ *

+ * GeoMatchSetId is returned by CreateGeoMatchSet and by ListGeoMatchSets.

+ * + */ + GeoMatchSetId: string | undefined; + + /** + * + *

A friendly name or description of the GeoMatchSet. You can't change the name of an GeoMatchSet after you create it.

+ * + */ + Name?: string; +} + +export namespace GeoMatchSet { + export function isa(o: any): o is GeoMatchSet { + return _smithy.isa(o, "GeoMatchSet"); + } +} + +/** + * + *

Contains the identifier and the name of the GeoMatchSet.

+ * + */ +export interface GeoMatchSetSummary { + __type?: "GeoMatchSetSummary"; + /** + * + *

The GeoMatchSetId for an GeoMatchSet. You can use GeoMatchSetId in a GetGeoMatchSet request to get detailed information about an GeoMatchSet.

+ * + */ + GeoMatchSetId: string | undefined; + + /** + * + *

A friendly name or description of the GeoMatchSet. You can't change the name of an GeoMatchSet after you create it.

+ * + */ + Name: string | undefined; +} + +export namespace GeoMatchSetSummary { + export function isa(o: any): o is GeoMatchSetSummary { + return _smithy.isa(o, "GeoMatchSetSummary"); + } +} + +/** + * + *

Specifies the type of update to perform to an GeoMatchSet with UpdateGeoMatchSet.

+ * + */ +export interface GeoMatchSetUpdate { + __type?: "GeoMatchSetUpdate"; + /** + * + *

Specifies whether to insert or delete a country with UpdateGeoMatchSet.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

The country from which web requests originate that you want AWS WAF to search for.

+ * + */ + GeoMatchConstraint: GeoMatchConstraint | undefined; +} + +export namespace GeoMatchSetUpdate { + export function isa(o: any): o is GeoMatchSetUpdate { + return _smithy.isa(o, "GeoMatchSetUpdate"); + } +} + +export interface GetByteMatchSetRequest { + __type?: "GetByteMatchSetRequest"; + /** + * + *

The ByteMatchSetId of the ByteMatchSet that you want to get. ByteMatchSetId is returned by + * CreateByteMatchSet and by ListByteMatchSets.

+ * + */ + ByteMatchSetId: string | undefined; +} + +export namespace GetByteMatchSetRequest { + export function isa(o: any): o is GetByteMatchSetRequest { + return _smithy.isa(o, "GetByteMatchSetRequest"); + } +} + +export interface GetByteMatchSetResponse extends $MetadataBearer { + __type?: "GetByteMatchSetResponse"; + /** + * + *

Information about the ByteMatchSet that you specified in the GetByteMatchSet request. For more information, see the + * following topics:

+ *
    + *
  • + *

    + * ByteMatchSet: Contains ByteMatchSetId, ByteMatchTuples, and Name + *

    + *
  • + *
  • + *

    + * ByteMatchTuples: Contains an array of ByteMatchTuple objects. Each ByteMatchTuple + * object contains FieldToMatch, PositionalConstraint, TargetString, + * and TextTransformation + *

    + *
  • + *
  • + *

    + * FieldToMatch: Contains Data and Type + *

    + *
  • + *
+ * + */ + ByteMatchSet?: ByteMatchSet; +} + +export namespace GetByteMatchSetResponse { + export function isa(o: any): o is GetByteMatchSetResponse { + return _smithy.isa(o, "GetByteMatchSetResponse"); + } +} + +export interface GetChangeTokenRequest { + __type?: "GetChangeTokenRequest"; +} + +export namespace GetChangeTokenRequest { + export function isa(o: any): o is GetChangeTokenRequest { + return _smithy.isa(o, "GetChangeTokenRequest"); + } +} + +export interface GetChangeTokenResponse extends $MetadataBearer { + __type?: "GetChangeTokenResponse"; + /** + * + *

The ChangeToken that you used in the request. Use this value in a GetChangeTokenStatus request + * to get the current status of the request.

+ * + */ + ChangeToken?: string; +} + +export namespace GetChangeTokenResponse { + export function isa(o: any): o is GetChangeTokenResponse { + return _smithy.isa(o, "GetChangeTokenResponse"); + } +} + +export interface GetChangeTokenStatusRequest { + __type?: "GetChangeTokenStatusRequest"; + /** + * + *

The change token for which you want to get the status. This change token was previously returned in the GetChangeToken response.

+ * + */ + ChangeToken: string | undefined; +} + +export namespace GetChangeTokenStatusRequest { + export function isa(o: any): o is GetChangeTokenStatusRequest { + return _smithy.isa(o, "GetChangeTokenStatusRequest"); + } +} + +export interface GetChangeTokenStatusResponse extends $MetadataBearer { + __type?: "GetChangeTokenStatusResponse"; + /** + * + *

The status of the change token.

+ * + */ + ChangeTokenStatus?: ChangeTokenStatus | string; +} + +export namespace GetChangeTokenStatusResponse { + export function isa(o: any): o is GetChangeTokenStatusResponse { + return _smithy.isa(o, "GetChangeTokenStatusResponse"); + } +} + +export interface GetGeoMatchSetRequest { + __type?: "GetGeoMatchSetRequest"; + /** + * + *

The GeoMatchSetId of the GeoMatchSet that you want to get. GeoMatchSetId is returned by CreateGeoMatchSet and by + * ListGeoMatchSets.

+ * + */ + GeoMatchSetId: string | undefined; +} + +export namespace GetGeoMatchSetRequest { + export function isa(o: any): o is GetGeoMatchSetRequest { + return _smithy.isa(o, "GetGeoMatchSetRequest"); + } +} + +export interface GetGeoMatchSetResponse extends $MetadataBearer { + __type?: "GetGeoMatchSetResponse"; + /** + * + *

Information about the GeoMatchSet that you specified in the GetGeoMatchSet request. This includes the Type, which for a GeoMatchContraint is always Country, as well as the Value, which is the identifier for a specific country.

+ * + * + */ + GeoMatchSet?: GeoMatchSet; +} + +export namespace GetGeoMatchSetResponse { + export function isa(o: any): o is GetGeoMatchSetResponse { + return _smithy.isa(o, "GetGeoMatchSetResponse"); + } +} + +export interface GetIPSetRequest { + __type?: "GetIPSetRequest"; + /** + * + *

The IPSetId of the IPSet that you want to get. IPSetId is returned by CreateIPSet and by + * ListIPSets.

+ * + */ + IPSetId: string | undefined; +} + +export namespace GetIPSetRequest { + export function isa(o: any): o is GetIPSetRequest { + return _smithy.isa(o, "GetIPSetRequest"); + } +} + +export interface GetIPSetResponse extends $MetadataBearer { + __type?: "GetIPSetResponse"; + /** + * + *

Information about the IPSet that you specified in the GetIPSet request. For more information, see the + * following topics:

+ *
    + *
  • + *

    + * IPSet: Contains IPSetDescriptors, IPSetId, and Name + *

    + *
  • + *
  • + *

    + * IPSetDescriptors: Contains an array of IPSetDescriptor objects. Each IPSetDescriptor + * object contains Type and Value + *

    + *
  • + *
+ * + */ + IPSet?: IPSet; +} + +export namespace GetIPSetResponse { + export function isa(o: any): o is GetIPSetResponse { + return _smithy.isa(o, "GetIPSetResponse"); + } +} + +export interface GetLoggingConfigurationRequest { + __type?: "GetLoggingConfigurationRequest"; + /** + * + *

The Amazon Resource Name (ARN) of the web ACL for which you want to get the LoggingConfiguration.

+ * + */ + ResourceArn: string | undefined; +} + +export namespace GetLoggingConfigurationRequest { + export function isa(o: any): o is GetLoggingConfigurationRequest { + return _smithy.isa(o, "GetLoggingConfigurationRequest"); + } +} + +export interface GetLoggingConfigurationResponse extends $MetadataBearer { + __type?: "GetLoggingConfigurationResponse"; + /** + * + *

The LoggingConfiguration for the specified web ACL.

+ * + */ + LoggingConfiguration?: LoggingConfiguration; +} + +export namespace GetLoggingConfigurationResponse { + export function isa(o: any): o is GetLoggingConfigurationResponse { + return _smithy.isa(o, "GetLoggingConfigurationResponse"); + } +} + +export interface GetPermissionPolicyRequest { + __type?: "GetPermissionPolicyRequest"; + /** + * + *

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

+ * + */ + ResourceArn: string | undefined; +} + +export namespace GetPermissionPolicyRequest { + export function isa(o: any): o is GetPermissionPolicyRequest { + return _smithy.isa(o, "GetPermissionPolicyRequest"); + } +} + +export interface GetPermissionPolicyResponse extends $MetadataBearer { + __type?: "GetPermissionPolicyResponse"; + /** + * + *

The IAM policy attached to the specified RuleGroup.

+ * + * + * + * + */ + Policy?: string; +} + +export namespace GetPermissionPolicyResponse { + export function isa(o: any): o is GetPermissionPolicyResponse { + return _smithy.isa(o, "GetPermissionPolicyResponse"); + } +} + +export interface GetRateBasedRuleManagedKeysRequest { + __type?: "GetRateBasedRuleManagedKeysRequest"; + /** + * + *

A null value and not currently used. Do not include this in your request.

+ * + */ + NextMarker?: string; + + /** + * + *

The RuleId of the RateBasedRule for which you want to + * get a list of ManagedKeys. RuleId is returned by CreateRateBasedRule and by ListRateBasedRules.

+ * + */ + RuleId: string | undefined; +} + +export namespace GetRateBasedRuleManagedKeysRequest { + export function isa(o: any): o is GetRateBasedRuleManagedKeysRequest { + return _smithy.isa(o, "GetRateBasedRuleManagedKeysRequest"); + } +} + +export interface GetRateBasedRuleManagedKeysResponse extends $MetadataBearer { + __type?: "GetRateBasedRuleManagedKeysResponse"; + /** + * + *

An array of IP addresses that currently are blocked by the specified RateBasedRule.

+ * + */ + ManagedKeys?: Array; + + /** + * + *

A null value and not currently used.

+ * + */ + NextMarker?: string; +} + +export namespace GetRateBasedRuleManagedKeysResponse { + export function isa(o: any): o is GetRateBasedRuleManagedKeysResponse { + return _smithy.isa(o, "GetRateBasedRuleManagedKeysResponse"); + } +} + +export interface GetRateBasedRuleRequest { + __type?: "GetRateBasedRuleRequest"; + /** + * + *

The RuleId of the RateBasedRule that you want to get. + * RuleId is returned by CreateRateBasedRule and by ListRateBasedRules.

+ * + */ + RuleId: string | undefined; +} + +export namespace GetRateBasedRuleRequest { + export function isa(o: any): o is GetRateBasedRuleRequest { + return _smithy.isa(o, "GetRateBasedRuleRequest"); + } +} + +export interface GetRateBasedRuleResponse extends $MetadataBearer { + __type?: "GetRateBasedRuleResponse"; + /** + * + *

Information about the RateBasedRule that you specified in the + * GetRateBasedRule request.

+ * + */ + Rule?: RateBasedRule; +} + +export namespace GetRateBasedRuleResponse { + export function isa(o: any): o is GetRateBasedRuleResponse { + return _smithy.isa(o, "GetRateBasedRuleResponse"); + } +} + +export interface GetRegexMatchSetRequest { + __type?: "GetRegexMatchSetRequest"; + /** + * + *

The RegexMatchSetId of the RegexMatchSet that you want to get. RegexMatchSetId is returned by + * CreateRegexMatchSet and by ListRegexMatchSets.

+ * + */ + RegexMatchSetId: string | undefined; +} + +export namespace GetRegexMatchSetRequest { + export function isa(o: any): o is GetRegexMatchSetRequest { + return _smithy.isa(o, "GetRegexMatchSetRequest"); + } +} + +export interface GetRegexMatchSetResponse extends $MetadataBearer { + __type?: "GetRegexMatchSetResponse"; + /** + * + *

Information about the RegexMatchSet that you specified in the GetRegexMatchSet request. For more information, see RegexMatchTuple.

+ * + * + */ + RegexMatchSet?: RegexMatchSet; +} + +export namespace GetRegexMatchSetResponse { + export function isa(o: any): o is GetRegexMatchSetResponse { + return _smithy.isa(o, "GetRegexMatchSetResponse"); + } +} + +export interface GetRegexPatternSetRequest { + __type?: "GetRegexPatternSetRequest"; + /** + * + *

The RegexPatternSetId of the RegexPatternSet that you want to get. RegexPatternSetId is returned by + * CreateRegexPatternSet and by ListRegexPatternSets.

+ * + */ + RegexPatternSetId: string | undefined; +} + +export namespace GetRegexPatternSetRequest { + export function isa(o: any): o is GetRegexPatternSetRequest { + return _smithy.isa(o, "GetRegexPatternSetRequest"); + } +} + +export interface GetRegexPatternSetResponse extends $MetadataBearer { + __type?: "GetRegexPatternSetResponse"; + /** + * + *

Information about the RegexPatternSet that you specified in the GetRegexPatternSet request, including the identifier of the pattern set and the regular expression patterns you want AWS WAF to search for.

+ * + */ + RegexPatternSet?: RegexPatternSet; +} + +export namespace GetRegexPatternSetResponse { + export function isa(o: any): o is GetRegexPatternSetResponse { + return _smithy.isa(o, "GetRegexPatternSetResponse"); + } +} + +export interface GetRuleGroupRequest { + __type?: "GetRuleGroupRequest"; + /** + * + *

The RuleGroupId of the RuleGroup that you want to get. RuleGroupId is returned by CreateRuleGroup and by + * ListRuleGroups.

+ * + */ + RuleGroupId: string | undefined; +} + +export namespace GetRuleGroupRequest { + export function isa(o: any): o is GetRuleGroupRequest { + return _smithy.isa(o, "GetRuleGroupRequest"); + } +} + +export interface GetRuleGroupResponse extends $MetadataBearer { + __type?: "GetRuleGroupResponse"; + /** + * + *

Information about the RuleGroup that you specified in the GetRuleGroup request.

+ * + * + */ + RuleGroup?: RuleGroup; +} + +export namespace GetRuleGroupResponse { + export function isa(o: any): o is GetRuleGroupResponse { + return _smithy.isa(o, "GetRuleGroupResponse"); + } +} + +export interface GetRuleRequest { + __type?: "GetRuleRequest"; + /** + * + *

The RuleId of the Rule that you want to get. RuleId is returned by CreateRule and by + * ListRules.

+ * + */ + RuleId: string | undefined; +} + +export namespace GetRuleRequest { + export function isa(o: any): o is GetRuleRequest { + return _smithy.isa(o, "GetRuleRequest"); + } +} + +export interface GetRuleResponse extends $MetadataBearer { + __type?: "GetRuleResponse"; + /** + * + *

Information about the Rule that you specified in the GetRule request. + * For more information, see the following topics:

+ *
    + *
  • + *

    + * Rule: Contains MetricName, Name, an array of Predicate objects, + * and RuleId + *

    + *
  • + *
  • + *

    + * Predicate: Each Predicate object contains DataId, Negated, and + * Type + *

    + *
  • + *
+ * + */ + Rule?: Rule; +} + +export namespace GetRuleResponse { + export function isa(o: any): o is GetRuleResponse { + return _smithy.isa(o, "GetRuleResponse"); + } +} + +export interface GetSampledRequestsRequest { + __type?: "GetSampledRequestsRequest"; + /** + * + *

The number of requests that you want AWS WAF to return from among the first 5,000 requests that your AWS resource received + * during the time range. If your resource received fewer requests than the value of MaxItems, GetSampledRequests + * returns information about all of them.

+ * + */ + MaxItems: number | undefined; + + /** + * + *

+ * RuleId is one of three values:

+ *
    + *
  • + *

    The RuleId of the Rule or the RuleGroupId of the RuleGroup for which you want GetSampledRequests to return a sample of requests.

    + *
  • + *
  • + *

    + * Default_Action, which causes GetSampledRequests to return a sample of the requests that + * didn't match any of the rules in the specified WebACL.

    + *
  • + *
+ * + */ + RuleId: string | undefined; + + /** + * + *

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. Specify the date and time in the following format: "2016-09-27T14:50Z". You can specify any time range in the + * previous three hours.

+ * + */ + TimeWindow: TimeWindow | undefined; + + /** + * + *

The WebACLId of the WebACL for which you want GetSampledRequests to return a sample of requests.

+ * + */ + WebAclId: string | undefined; +} + +export namespace GetSampledRequestsRequest { + export function isa(o: any): o is GetSampledRequestsRequest { + return _smithy.isa(o, "GetSampledRequestsRequest"); + } +} + +export interface GetSampledRequestsResponse extends $MetadataBearer { + __type?: "GetSampledRequestsResponse"; + /** + * + *

The total number of requests from which GetSampledRequests got a sample of MaxItems requests. + * If PopulationSize is less than MaxItems, the sample includes every request that your AWS resource + * received during the specified time range.

+ * + */ + PopulationSize?: number; + + /** + * + *

A complex type that contains detailed information about each of the requests in the sample.

+ * + */ + SampledRequests?: Array; + + /** + * + *

Usually, TimeWindow is the time range that you specified in the GetSampledRequests request. However, + * if your AWS resource received more than 5,000 requests during the time range that you specified in the request, + * GetSampledRequests returns the time range for the first 5,000 requests.

+ * + */ + TimeWindow?: TimeWindow; +} + +export namespace GetSampledRequestsResponse { + export function isa(o: any): o is GetSampledRequestsResponse { + return _smithy.isa(o, "GetSampledRequestsResponse"); + } +} + +export interface GetSizeConstraintSetRequest { + __type?: "GetSizeConstraintSetRequest"; + /** + * + *

The SizeConstraintSetId of the SizeConstraintSet that you want to get. SizeConstraintSetId is returned by + * CreateSizeConstraintSet and by ListSizeConstraintSets.

+ * + */ + SizeConstraintSetId: string | undefined; +} + +export namespace GetSizeConstraintSetRequest { + export function isa(o: any): o is GetSizeConstraintSetRequest { + return _smithy.isa(o, "GetSizeConstraintSetRequest"); + } +} + +export interface GetSizeConstraintSetResponse extends $MetadataBearer { + __type?: "GetSizeConstraintSetResponse"; + /** + * + *

Information about the SizeConstraintSet that you specified in the GetSizeConstraintSet request. For more information, see the + * following topics:

+ *
    + *
  • + *

    + * SizeConstraintSet: Contains SizeConstraintSetId, SizeConstraints, and Name + *

    + *
  • + *
  • + *

    + * SizeConstraints: Contains an array of SizeConstraint objects. Each SizeConstraint + * object contains FieldToMatch, TextTransformation, ComparisonOperator, + * and Size + *

    + *
  • + *
  • + *

    + * FieldToMatch: Contains Data and Type + *

    + *
  • + *
+ * + */ + SizeConstraintSet?: SizeConstraintSet; +} + +export namespace GetSizeConstraintSetResponse { + export function isa(o: any): o is GetSizeConstraintSetResponse { + return _smithy.isa(o, "GetSizeConstraintSetResponse"); + } +} + +/** + * + *

A request to get a SqlInjectionMatchSet.

+ * + */ +export interface GetSqlInjectionMatchSetRequest { + __type?: "GetSqlInjectionMatchSetRequest"; + /** + * + *

The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to get. SqlInjectionMatchSetId + * is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.

+ * + */ + SqlInjectionMatchSetId: string | undefined; +} + +export namespace GetSqlInjectionMatchSetRequest { + export function isa(o: any): o is GetSqlInjectionMatchSetRequest { + return _smithy.isa(o, "GetSqlInjectionMatchSetRequest"); + } +} + +/** + * + *

The response to a GetSqlInjectionMatchSet request.

+ * + */ +export interface GetSqlInjectionMatchSetResponse extends $MetadataBearer { + __type?: "GetSqlInjectionMatchSetResponse"; + /** + * + *

Information about the SqlInjectionMatchSet that you specified in the GetSqlInjectionMatchSet request. + * For more information, see the following topics:

+ *
    + *
  • + *

    + * SqlInjectionMatchSet: Contains Name, SqlInjectionMatchSetId, and an array of + * SqlInjectionMatchTuple objects

    + *
  • + *
  • + *

    + * SqlInjectionMatchTuple: Each SqlInjectionMatchTuple object contains FieldToMatch and + * TextTransformation + *

    + *
  • + *
  • + *

    + * FieldToMatch: Contains Data and Type + *

    + *
  • + *
+ * + */ + SqlInjectionMatchSet?: SqlInjectionMatchSet; +} + +export namespace GetSqlInjectionMatchSetResponse { + export function isa(o: any): o is GetSqlInjectionMatchSetResponse { + return _smithy.isa(o, "GetSqlInjectionMatchSetResponse"); + } +} + +export interface GetWebACLRequest { + __type?: "GetWebACLRequest"; + /** + * + *

The WebACLId of the WebACL that you want to get. WebACLId is returned by CreateWebACL and by + * ListWebACLs.

+ * + */ + WebACLId: string | undefined; +} + +export namespace GetWebACLRequest { + export function isa(o: any): o is GetWebACLRequest { + return _smithy.isa(o, "GetWebACLRequest"); + } +} + +export interface GetWebACLResponse extends $MetadataBearer { + __type?: "GetWebACLResponse"; + /** + * + *

Information about the WebACL that you specified in the GetWebACL request. + * For more information, see the following topics:

+ *
    + *
  • + *

    + * WebACL: Contains DefaultAction, MetricName, Name, an array of + * Rule objects, and WebACLId + *

    + *
  • + *
  • + *

    + * DefaultAction (Data type is WafAction): Contains Type + *

    + *
  • + *
  • + *

    + * Rules: Contains an array of ActivatedRule objects, which contain Action, + * Priority, and RuleId + *

    + *
  • + *
  • + *

    + * Action: Contains Type + *

    + *
  • + *
+ * + */ + WebACL?: WebACL; +} + +export namespace GetWebACLResponse { + export function isa(o: any): o is GetWebACLResponse { + return _smithy.isa(o, "GetWebACLResponse"); + } +} + +/** + * + *

A request to get an XssMatchSet.

+ * + */ +export interface GetXssMatchSetRequest { + __type?: "GetXssMatchSetRequest"; + /** + * + *

The XssMatchSetId of the XssMatchSet that you want to get. XssMatchSetId + * is returned by CreateXssMatchSet and by ListXssMatchSets.

+ * + */ + XssMatchSetId: string | undefined; +} + +export namespace GetXssMatchSetRequest { + export function isa(o: any): o is GetXssMatchSetRequest { + return _smithy.isa(o, "GetXssMatchSetRequest"); + } +} + +/** + * + *

The response to a GetXssMatchSet request.

+ * + */ +export interface GetXssMatchSetResponse extends $MetadataBearer { + __type?: "GetXssMatchSetResponse"; + /** + * + *

Information about the XssMatchSet that you specified in the GetXssMatchSet request. + * For more information, see the following topics:

+ *
    + *
  • + *

    + * XssMatchSet: Contains Name, XssMatchSetId, and an array of + * XssMatchTuple objects

    + *
  • + *
  • + *

    + * XssMatchTuple: Each XssMatchTuple object contains FieldToMatch and + * TextTransformation + *

    + *
  • + *
  • + *

    + * FieldToMatch: Contains Data and Type + *

    + *
  • + *
+ * + */ + XssMatchSet?: XssMatchSet; +} + +export namespace GetXssMatchSetResponse { + export function isa(o: any): o is GetXssMatchSetResponse { + return _smithy.isa(o, "GetXssMatchSetResponse"); + } +} + +/** + * + *

The response from a GetSampledRequests request includes an HTTPHeader complex type that + * appears as Headers in the response syntax. HTTPHeader contains the names and values of + * all of the headers that appear in one of the web requests that were returned by GetSampledRequests.

+ * + */ +export interface HTTPHeader { + __type?: "HTTPHeader"; + /** + * + *

The name of one of the headers in the sampled web request.

+ * + */ + Name?: string; + + /** + * + *

The value of one of the headers in the sampled web request.

+ * + */ + Value?: string; +} + +export namespace HTTPHeader { + export function isa(o: any): o is HTTPHeader { + return _smithy.isa(o, "HTTPHeader"); + } +} + +/** + * + *

The response from a GetSampledRequests request includes an HTTPRequest complex type that + * appears as Request in the response syntax. HTTPRequest contains information about + * one of the web requests that were returned by GetSampledRequests.

+ * + */ +export interface HTTPRequest { + __type?: "HTTPRequest"; + /** + * + *

The IP address that the request originated from. If the WebACL is associated with a CloudFront distribution, + * this is the value of one of the following fields in CloudFront access logs:

+ *
    + *
  • + *

    + * c-ip, if the viewer did not use an HTTP proxy or a load balancer to send the request

    + *
  • + *
  • + *

    + * x-forwarded-for, if the viewer did use an HTTP proxy or a load balancer to send the request

    + *
  • + *
+ * + */ + ClientIP?: string; + + /** + * + *

The two-letter country code for the country that the request originated from. For a current list of country codes, + * see the Wikipedia entry ISO 3166-1 alpha-2.

+ * + */ + Country?: string; + + /** + * + *

The HTTP version specified in the sampled web request, for example, HTTP/1.1.

+ * + */ + HTTPVersion?: string; + + /** + * + *

A complex type that contains two values for each header in the sampled web request: the name of the header and the value of the header.

+ * + */ + Headers?: Array; + + /** + * + *

The HTTP method specified in the sampled web request. CloudFront supports the following methods: DELETE, + * GET, HEAD, OPTIONS, PATCH, POST, and PUT.

+ * + */ + Method?: string; + + /** + * + *

The part of a web request that identifies the resource, for example, /images/daily-ad.jpg.

+ * + */ + URI?: string; +} + +export namespace HTTPRequest { + export function isa(o: any): o is HTTPRequest { + return _smithy.isa(o, "HTTPRequest"); + } +} + +/** + * + *

Contains one or more IP addresses or blocks of IP addresses specified in Classless Inter-Domain Routing (CIDR) notation. AWS WAF supports IPv4 address ranges: /8 and any range between /16 through /32. AWS WAF supports IPv6 address ranges: /24, /32, /48, /56, /64, and /128.

+ *

To specify an individual IP address, you specify the four-part IP address followed by a + * /32, for example, 192.0.2.0/32. To block a range of IP addresses, you can + * specify /8 or any range between /16 through /32 (for IPv4) or /24, /32, /48, /56, /64, or + * /128 (for IPv6). For more information about CIDR notation, see the Wikipedia entry Classless + * Inter-Domain Routing.

+ * + */ +export interface IPSet { + __type?: "IPSet"; + /** + * + *

The IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) that web requests originate from. + * If the WebACL is associated with a CloudFront distribution and the viewer did not use an HTTP proxy or a load balancer to send the request, this is the value of the c-ip field in the CloudFront access logs.

+ * + * + */ + IPSetDescriptors: Array | undefined; + + /** + * + *

The IPSetId for an IPSet. You use IPSetId to get information about an + * IPSet (see GetIPSet), update an IPSet (see UpdateIPSet), + * insert an IPSet into a Rule or delete one from a Rule (see UpdateRule), and + * delete an IPSet from AWS WAF (see DeleteIPSet).

+ *

+ * IPSetId is returned by CreateIPSet and by ListIPSets.

+ * + */ + IPSetId: string | undefined; + + /** + * + *

A friendly name or description of the IPSet. You can't change the name of an IPSet after you create it.

+ * + */ + Name?: string; +} + +export namespace IPSet { + export function isa(o: any): o is IPSet { + return _smithy.isa(o, "IPSet"); + } +} + +/** + * + *

Specifies the IP address type (IPV4 or IPV6) and the IP address range (in CIDR format) that web requests originate from.

+ * + */ +export interface IPSetDescriptor { + __type?: "IPSetDescriptor"; + /** + * + *

Specify IPV4 or IPV6.

+ * + */ + Type: IPSetDescriptorType | string | undefined; + + /** + * + *

Specify an IPv4 address by using CIDR notation. For example:

+ *
    + *
  • + *

    To configure AWS WAF to allow, block, or count requests that originated from the IP address 192.0.2.44, specify 192.0.2.44/32.

    + *
  • + *
  • + *

    To configure AWS WAF to allow, block, or count requests that originated from IP addresses from 192.0.2.0 to 192.0.2.255, specify + * 192.0.2.0/24.

    + *
  • + *
+ * + *

For more information about CIDR notation, see the Wikipedia entry + * Classless Inter-Domain Routing.

+ *

Specify an IPv6 address by using CIDR notation. For example:

+ *
    + *
  • + *

    To configure AWS WAF to allow, block, or count requests that originated from the IP address 1111:0000:0000:0000:0000:0000:0000:0111, specify 1111:0000:0000:0000:0000:0000:0000:0111/128.

    + *
  • + *
  • + *

    To configure AWS WAF to allow, block, or count requests that originated from IP addresses 1111:0000:0000:0000:0000:0000:0000:0000 to 1111:0000:0000:0000:ffff:ffff:ffff:ffff, specify 1111:0000:0000:0000:0000:0000:0000:0000/64.

    + *
  • + *
+ * + */ + Value: string | undefined; +} + +export namespace IPSetDescriptor { + export function isa(o: any): o is IPSetDescriptor { + return _smithy.isa(o, "IPSetDescriptor"); + } +} + +export enum IPSetDescriptorType { + IPV4 = "IPV4", + IPV6 = "IPV6" +} + +/** + * + *

Contains the identifier and the name of the IPSet.

+ * + */ +export interface IPSetSummary { + __type?: "IPSetSummary"; + /** + * + *

The IPSetId for an IPSet. You can use IPSetId in a GetIPSet request to get detailed + * information about an IPSet.

+ * + */ + IPSetId: string | undefined; + + /** + * + *

A friendly name or description of the IPSet. You can't change the name of an IPSet after you create it.

+ * + */ + Name: string | undefined; +} + +export namespace IPSetSummary { + export function isa(o: any): o is IPSetSummary { + return _smithy.isa(o, "IPSetSummary"); + } +} + +/** + * + *

Specifies the type of update to perform to an IPSet with UpdateIPSet.

+ * + */ +export interface IPSetUpdate { + __type?: "IPSetUpdate"; + /** + * + *

Specifies whether to insert or delete an IP address with UpdateIPSet.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

The IP address type (IPV4 or IPV6) and the IP address range (in CIDR notation) that web requests originate from.

+ * + */ + IPSetDescriptor: IPSetDescriptor | undefined; +} + +export namespace IPSetUpdate { + export function isa(o: any): o is IPSetUpdate { + return _smithy.isa(o, "IPSetUpdate"); + } +} + +export interface ListActivatedRulesInRuleGroupRequest { + __type?: "ListActivatedRulesInRuleGroupRequest"; + /** + * + *

Specifies the number of ActivatedRules that you want AWS WAF to return for this request. If you have more ActivatedRules than the number that you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of ActivatedRules.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more ActivatedRules than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of ActivatedRules. + * For the second and subsequent ListActivatedRulesInRuleGroup requests, specify the value of NextMarker + * from the previous response to get information about another batch of ActivatedRules.

+ * + */ + NextMarker?: string; + + /** + * + *

The RuleGroupId of the RuleGroup for which you want to get a list of ActivatedRule objects.

+ * + */ + RuleGroupId?: string; +} + +export namespace ListActivatedRulesInRuleGroupRequest { + export function isa(o: any): o is ListActivatedRulesInRuleGroupRequest { + return _smithy.isa(o, "ListActivatedRulesInRuleGroupRequest"); + } +} + +export interface ListActivatedRulesInRuleGroupResponse extends $MetadataBearer { + __type?: "ListActivatedRulesInRuleGroupResponse"; + /** + * + *

An array of ActivatedRules objects.

+ * + */ + ActivatedRules?: Array; + + /** + * + *

If you have more ActivatedRules than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more ActivatedRules, submit another ListActivatedRulesInRuleGroup request, and specify the NextMarker value from the response in the NextMarker value in the next request.

+ * + */ + NextMarker?: string; +} + +export namespace ListActivatedRulesInRuleGroupResponse { + export function isa(o: any): o is ListActivatedRulesInRuleGroupResponse { + return _smithy.isa(o, "ListActivatedRulesInRuleGroupResponse"); + } +} + +export interface ListByteMatchSetsRequest { + __type?: "ListByteMatchSetsRequest"; + /** + * + *

Specifies the number of ByteMatchSet objects that you want AWS WAF to return for this request. If you have more + * ByteMatchSets objects than the number you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of ByteMatchSet objects.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more ByteMatchSets than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of ByteMatchSets. + * For the second and subsequent ListByteMatchSets requests, specify the value of NextMarker + * from the previous response to get information about another batch of ByteMatchSets.

+ * + */ + NextMarker?: string; +} + +export namespace ListByteMatchSetsRequest { + export function isa(o: any): o is ListByteMatchSetsRequest { + return _smithy.isa(o, "ListByteMatchSetsRequest"); + } +} + +export interface ListByteMatchSetsResponse extends $MetadataBearer { + __type?: "ListByteMatchSetsResponse"; + /** + * + *

An array of ByteMatchSetSummary objects.

+ * + */ + ByteMatchSets?: Array; + + /** + * + *

If you have more ByteMatchSet objects than the number that you specified for Limit in the request, + * the response includes a NextMarker value. To list more ByteMatchSet objects, submit another + * ListByteMatchSets request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; +} + +export namespace ListByteMatchSetsResponse { + export function isa(o: any): o is ListByteMatchSetsResponse { + return _smithy.isa(o, "ListByteMatchSetsResponse"); + } +} + +export interface ListGeoMatchSetsRequest { + __type?: "ListGeoMatchSetsRequest"; + /** + * + *

Specifies the number of GeoMatchSet objects that you want AWS WAF to return for this request. If you have more + * GeoMatchSet objects than the number you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of GeoMatchSet objects.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more GeoMatchSets than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of GeoMatchSet objects. + * For the second and subsequent ListGeoMatchSets requests, specify the value of NextMarker + * from the previous response to get information about another batch of GeoMatchSet objects.

+ * + */ + NextMarker?: string; +} + +export namespace ListGeoMatchSetsRequest { + export function isa(o: any): o is ListGeoMatchSetsRequest { + return _smithy.isa(o, "ListGeoMatchSetsRequest"); + } +} + +export interface ListGeoMatchSetsResponse extends $MetadataBearer { + __type?: "ListGeoMatchSetsResponse"; + /** + * + *

An array of GeoMatchSetSummary objects.

+ * + */ + GeoMatchSets?: Array; + + /** + * + *

If you have more GeoMatchSet objects than the number that you specified for Limit in the request, + * the response includes a NextMarker value. To list more GeoMatchSet objects, submit another + * ListGeoMatchSets request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; +} + +export namespace ListGeoMatchSetsResponse { + export function isa(o: any): o is ListGeoMatchSetsResponse { + return _smithy.isa(o, "ListGeoMatchSetsResponse"); + } +} + +export interface ListIPSetsRequest { + __type?: "ListIPSetsRequest"; + /** + * + *

Specifies the number of IPSet objects that you want AWS WAF to return for this request. If you have more + * IPSet objects than the number you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of IPSet objects.

+ * + */ + Limit?: number; + + /** + * + *

AWS WAF returns a NextMarker value in the response that allows you to + * list another group of IPSets. For the second and subsequent + * ListIPSets requests, specify the value of NextMarker from the + * previous response to get information about another batch of IPSets.

+ * + */ + NextMarker?: string; +} + +export namespace ListIPSetsRequest { + export function isa(o: any): o is ListIPSetsRequest { + return _smithy.isa(o, "ListIPSetsRequest"); + } +} + +export interface ListIPSetsResponse extends $MetadataBearer { + __type?: "ListIPSetsResponse"; + /** + * + *

An array of IPSetSummary objects.

+ * + */ + IPSets?: Array; + + /** + * + *

To list more IPSet objects, submit another ListIPSets + * request, and in the next request use the NextMarker response value as the + * NextMarker value.

+ * + */ + NextMarker?: string; +} + +export namespace ListIPSetsResponse { + export function isa(o: any): o is ListIPSetsResponse { + return _smithy.isa(o, "ListIPSetsResponse"); + } +} + +export interface ListLoggingConfigurationsRequest { + __type?: "ListLoggingConfigurationsRequest"; + /** + * + *

Specifies the number of LoggingConfigurations that you want AWS WAF to return for this request. If you have more LoggingConfigurations than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of LoggingConfigurations.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more LoggingConfigurations than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of LoggingConfigurations. + * For the second and subsequent ListLoggingConfigurations requests, specify the value of NextMarker + * from the previous response to get information about another batch of ListLoggingConfigurations.

+ * + */ + NextMarker?: string; +} + +export namespace ListLoggingConfigurationsRequest { + export function isa(o: any): o is ListLoggingConfigurationsRequest { + return _smithy.isa(o, "ListLoggingConfigurationsRequest"); + } +} + +export interface ListLoggingConfigurationsResponse extends $MetadataBearer { + __type?: "ListLoggingConfigurationsResponse"; + /** + * + *

An array of LoggingConfiguration objects.

+ * + */ + LoggingConfigurations?: Array; + + /** + * + *

If you have more LoggingConfigurations than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more LoggingConfigurations, submit another ListLoggingConfigurations request, and specify the NextMarker value from the response in the NextMarker value in the next request.

+ * + */ + NextMarker?: string; +} + +export namespace ListLoggingConfigurationsResponse { + export function isa(o: any): o is ListLoggingConfigurationsResponse { + return _smithy.isa(o, "ListLoggingConfigurationsResponse"); + } +} + +export interface ListRateBasedRulesRequest { + __type?: "ListRateBasedRulesRequest"; + /** + * + *

Specifies the number of Rules that you want AWS WAF to return for this + * request. If you have more Rules than the number that you specify for + * Limit, the response includes a NextMarker value that you can + * use to get another batch of Rules.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more Rules + * than the value of Limit, AWS WAF returns a NextMarker value in the + * response that allows you to list another group of Rules. For the second and + * subsequent ListRateBasedRules requests, specify the value of + * NextMarker from the previous response to get information about another + * batch of Rules.

+ * + */ + NextMarker?: string; +} + +export namespace ListRateBasedRulesRequest { + export function isa(o: any): o is ListRateBasedRulesRequest { + return _smithy.isa(o, "ListRateBasedRulesRequest"); + } +} + +export interface ListRateBasedRulesResponse extends $MetadataBearer { + __type?: "ListRateBasedRulesResponse"; + /** + * + *

If you have more Rules than the number that you specified for + * Limit in the request, the response includes a NextMarker + * value. To list more Rules, submit another ListRateBasedRules + * request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of RuleSummary objects.

+ * + */ + Rules?: Array; +} + +export namespace ListRateBasedRulesResponse { + export function isa(o: any): o is ListRateBasedRulesResponse { + return _smithy.isa(o, "ListRateBasedRulesResponse"); + } +} + +export interface ListRegexMatchSetsRequest { + __type?: "ListRegexMatchSetsRequest"; + /** + * + *

Specifies the number of RegexMatchSet objects that you want AWS WAF to return for this request. If you have more + * RegexMatchSet objects than the number you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of RegexMatchSet objects.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more RegexMatchSet objects than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of ByteMatchSets. + * For the second and subsequent ListRegexMatchSets requests, specify the value of NextMarker + * from the previous response to get information about another batch of RegexMatchSet objects.

+ * + */ + NextMarker?: string; +} + +export namespace ListRegexMatchSetsRequest { + export function isa(o: any): o is ListRegexMatchSetsRequest { + return _smithy.isa(o, "ListRegexMatchSetsRequest"); + } +} + +export interface ListRegexMatchSetsResponse extends $MetadataBearer { + __type?: "ListRegexMatchSetsResponse"; + /** + * + *

If you have more RegexMatchSet objects than the number that you specified for Limit in the request, + * the response includes a NextMarker value. To list more RegexMatchSet objects, submit another + * ListRegexMatchSets request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of RegexMatchSetSummary objects.

+ * + */ + RegexMatchSets?: Array; +} + +export namespace ListRegexMatchSetsResponse { + export function isa(o: any): o is ListRegexMatchSetsResponse { + return _smithy.isa(o, "ListRegexMatchSetsResponse"); + } +} + +export interface ListRegexPatternSetsRequest { + __type?: "ListRegexPatternSetsRequest"; + /** + * + *

Specifies the number of RegexPatternSet objects that you want AWS WAF to return for this request. If you have more + * RegexPatternSet objects than the number you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of RegexPatternSet objects.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more RegexPatternSet objects than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of RegexPatternSet objects. + * For the second and subsequent ListRegexPatternSets requests, specify the value of NextMarker + * from the previous response to get information about another batch of RegexPatternSet objects.

+ * + */ + NextMarker?: string; +} + +export namespace ListRegexPatternSetsRequest { + export function isa(o: any): o is ListRegexPatternSetsRequest { + return _smithy.isa(o, "ListRegexPatternSetsRequest"); + } +} + +export interface ListRegexPatternSetsResponse extends $MetadataBearer { + __type?: "ListRegexPatternSetsResponse"; + /** + * + *

If you have more RegexPatternSet objects than the number that you specified for Limit in the request, + * the response includes a NextMarker value. To list more RegexPatternSet objects, submit another + * ListRegexPatternSets request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of RegexPatternSetSummary objects.

+ * + */ + RegexPatternSets?: Array; +} + +export namespace ListRegexPatternSetsResponse { + export function isa(o: any): o is ListRegexPatternSetsResponse { + return _smithy.isa(o, "ListRegexPatternSetsResponse"); + } +} + +export interface ListRuleGroupsRequest { + __type?: "ListRuleGroupsRequest"; + /** + * + *

Specifies the number of RuleGroups that you want AWS WAF to return for this request. If you have more RuleGroups than the number that you specify for Limit, the response includes a NextMarker value that you can use to get another batch of RuleGroups.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more RuleGroups than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of RuleGroups. + * For the second and subsequent ListRuleGroups requests, specify the value of NextMarker + * from the previous response to get information about another batch of RuleGroups.

+ * + */ + NextMarker?: string; +} + +export namespace ListRuleGroupsRequest { + export function isa(o: any): o is ListRuleGroupsRequest { + return _smithy.isa(o, "ListRuleGroupsRequest"); + } +} + +export interface ListRuleGroupsResponse extends $MetadataBearer { + __type?: "ListRuleGroupsResponse"; + /** + * + *

If you have more RuleGroups than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more RuleGroups, submit another ListRuleGroups request, and specify the NextMarker value from the response in the NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of RuleGroup objects.

+ * + */ + RuleGroups?: Array; +} + +export namespace ListRuleGroupsResponse { + export function isa(o: any): o is ListRuleGroupsResponse { + return _smithy.isa(o, "ListRuleGroupsResponse"); + } +} + +export interface ListRulesRequest { + __type?: "ListRulesRequest"; + /** + * + *

Specifies the number of Rules that you want AWS WAF to return for this request. If you have more Rules than the number that you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of Rules.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more Rules than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of Rules. + * For the second and subsequent ListRules requests, specify the value of NextMarker + * from the previous response to get information about another batch of Rules.

+ * + */ + NextMarker?: string; +} + +export namespace ListRulesRequest { + export function isa(o: any): o is ListRulesRequest { + return _smithy.isa(o, "ListRulesRequest"); + } +} + +export interface ListRulesResponse extends $MetadataBearer { + __type?: "ListRulesResponse"; + /** + * + *

If you have more Rules than the number that you specified for Limit in the request, the response includes a NextMarker value. To list more Rules, submit another + * ListRules request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of RuleSummary objects.

+ * + */ + Rules?: Array; +} + +export namespace ListRulesResponse { + export function isa(o: any): o is ListRulesResponse { + return _smithy.isa(o, "ListRulesResponse"); + } +} + +export interface ListSizeConstraintSetsRequest { + __type?: "ListSizeConstraintSetsRequest"; + /** + * + *

Specifies the number of SizeConstraintSet objects that you want AWS WAF to return for this request. If you have more + * SizeConstraintSets objects than the number you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of SizeConstraintSet objects.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more SizeConstraintSets than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of SizeConstraintSets. + * For the second and subsequent ListSizeConstraintSets requests, specify the value of NextMarker from the previous response to get information about another batch of SizeConstraintSets.

+ * + */ + NextMarker?: string; +} + +export namespace ListSizeConstraintSetsRequest { + export function isa(o: any): o is ListSizeConstraintSetsRequest { + return _smithy.isa(o, "ListSizeConstraintSetsRequest"); + } +} + +export interface ListSizeConstraintSetsResponse extends $MetadataBearer { + __type?: "ListSizeConstraintSetsResponse"; + /** + * + *

If you have more SizeConstraintSet objects than the number that you specified for Limit in the request, + * the response includes a NextMarker value. To list more SizeConstraintSet objects, submit another + * ListSizeConstraintSets request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of SizeConstraintSetSummary objects.

+ * + */ + SizeConstraintSets?: Array; +} + +export namespace ListSizeConstraintSetsResponse { + export function isa(o: any): o is ListSizeConstraintSetsResponse { + return _smithy.isa(o, "ListSizeConstraintSetsResponse"); + } +} + +/** + * + *

A request to list the SqlInjectionMatchSet objects created by the current AWS account.

+ * + */ +export interface ListSqlInjectionMatchSetsRequest { + __type?: "ListSqlInjectionMatchSetsRequest"; + /** + * + *

Specifies the number of SqlInjectionMatchSet objects that you want AWS WAF to return for this request. If you have more + * SqlInjectionMatchSet objects than the number you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of Rules.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more SqlInjectionMatchSet objects than the value of + * Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of + * SqlInjectionMatchSets. For the second and subsequent ListSqlInjectionMatchSets requests, specify the + * value of NextMarker from the previous response to get information about another batch of SqlInjectionMatchSets.

+ * + */ + NextMarker?: string; +} + +export namespace ListSqlInjectionMatchSetsRequest { + export function isa(o: any): o is ListSqlInjectionMatchSetsRequest { + return _smithy.isa(o, "ListSqlInjectionMatchSetsRequest"); + } +} + +/** + * + *

The response to a ListSqlInjectionMatchSets request.

+ * + */ +export interface ListSqlInjectionMatchSetsResponse extends $MetadataBearer { + __type?: "ListSqlInjectionMatchSetsResponse"; + /** + * + *

If you have more SqlInjectionMatchSet objects than the number that you specified for Limit in the request, + * the response includes a NextMarker value. To list more SqlInjectionMatchSet objects, submit another + * ListSqlInjectionMatchSets request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of SqlInjectionMatchSetSummary objects.

+ * + */ + SqlInjectionMatchSets?: Array; +} + +export namespace ListSqlInjectionMatchSetsResponse { + export function isa(o: any): o is ListSqlInjectionMatchSetsResponse { + return _smithy.isa(o, "ListSqlInjectionMatchSetsResponse"); + } +} + +export interface ListSubscribedRuleGroupsRequest { + __type?: "ListSubscribedRuleGroupsRequest"; + /** + * + *

Specifies the number of subscribed rule groups that you want AWS WAF to return for this request. If you have more + * objects than the number you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of objects.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more ByteMatchSetssubscribed rule groups than the value of Limit, + * AWS WAF returns a NextMarker value in the response that allows you to list another group of subscribed rule groups. + * For the second and subsequent ListSubscribedRuleGroupsRequest requests, specify the value of NextMarker + * from the previous response to get information about another batch of subscribed rule groups.

+ * + */ + NextMarker?: string; +} + +export namespace ListSubscribedRuleGroupsRequest { + export function isa(o: any): o is ListSubscribedRuleGroupsRequest { + return _smithy.isa(o, "ListSubscribedRuleGroupsRequest"); + } +} + +export interface ListSubscribedRuleGroupsResponse extends $MetadataBearer { + __type?: "ListSubscribedRuleGroupsResponse"; + /** + * + *

If you have more objects than the number that you specified for Limit in the request, + * the response includes a NextMarker value. To list more objects, submit another + * ListSubscribedRuleGroups request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of RuleGroup objects.

+ * + */ + RuleGroups?: Array; +} + +export namespace ListSubscribedRuleGroupsResponse { + export function isa(o: any): o is ListSubscribedRuleGroupsResponse { + return _smithy.isa(o, "ListSubscribedRuleGroupsResponse"); + } +} + +export interface ListTagsForResourceRequest { + __type?: "ListTagsForResourceRequest"; + Limit?: number; + NextMarker?: string; + ResourceARN: string | undefined; +} + +export namespace ListTagsForResourceRequest { + export function isa(o: any): o is ListTagsForResourceRequest { + return _smithy.isa(o, "ListTagsForResourceRequest"); + } +} + +export interface ListTagsForResourceResponse extends $MetadataBearer { + __type?: "ListTagsForResourceResponse"; + NextMarker?: string; + TagInfoForResource?: TagInfoForResource; +} + +export namespace ListTagsForResourceResponse { + export function isa(o: any): o is ListTagsForResourceResponse { + return _smithy.isa(o, "ListTagsForResourceResponse"); + } +} + +export interface ListWebACLsRequest { + __type?: "ListWebACLsRequest"; + /** + * + *

Specifies the number of WebACL objects that you want AWS WAF to return for this request. If you have more + * WebACL objects than the number that you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of WebACL objects.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more WebACL objects than the number that you specify + * for Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of + * WebACL objects. For the second and subsequent ListWebACLs requests, specify the value of NextMarker + * from the previous response to get information about another batch of WebACL objects.

+ * + */ + NextMarker?: string; +} + +export namespace ListWebACLsRequest { + export function isa(o: any): o is ListWebACLsRequest { + return _smithy.isa(o, "ListWebACLsRequest"); + } +} + +export interface ListWebACLsResponse extends $MetadataBearer { + __type?: "ListWebACLsResponse"; + /** + * + *

If you have more WebACL objects than the number that you specified for Limit in the request, + * the response includes a NextMarker value. To list more WebACL objects, submit another + * ListWebACLs request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of WebACLSummary objects.

+ * + */ + WebACLs?: Array; +} + +export namespace ListWebACLsResponse { + export function isa(o: any): o is ListWebACLsResponse { + return _smithy.isa(o, "ListWebACLsResponse"); + } +} + +/** + * + *

A request to list the XssMatchSet objects created by the current AWS account.

+ * + */ +export interface ListXssMatchSetsRequest { + __type?: "ListXssMatchSetsRequest"; + /** + * + *

Specifies the number of XssMatchSet objects that you want AWS WAF to return for this request. If you have more + * XssMatchSet objects than the number you specify for Limit, the response includes a + * NextMarker value that you can use to get another batch of Rules.

+ * + */ + Limit?: number; + + /** + * + *

If you specify a value for Limit and you have more XssMatchSet objects than the value of + * Limit, AWS WAF returns a NextMarker value in the response that allows you to list another group of + * XssMatchSets. For the second and subsequent ListXssMatchSets requests, specify the + * value of NextMarker from the previous response to get information about another batch of XssMatchSets.

+ * + */ + NextMarker?: string; +} + +export namespace ListXssMatchSetsRequest { + export function isa(o: any): o is ListXssMatchSetsRequest { + return _smithy.isa(o, "ListXssMatchSetsRequest"); + } +} + +/** + * + *

The response to a ListXssMatchSets request.

+ * + */ +export interface ListXssMatchSetsResponse extends $MetadataBearer { + __type?: "ListXssMatchSetsResponse"; + /** + * + *

If you have more XssMatchSet objects than the number that you specified for Limit in the request, + * the response includes a NextMarker value. To list more XssMatchSet objects, submit another + * ListXssMatchSets request, and specify the NextMarker value from the response in the + * NextMarker value in the next request.

+ * + */ + NextMarker?: string; + + /** + * + *

An array of XssMatchSetSummary objects.

+ * + */ + XssMatchSets?: Array; +} + +export namespace ListXssMatchSetsResponse { + export function isa(o: any): o is ListXssMatchSetsResponse { + return _smithy.isa(o, "ListXssMatchSetsResponse"); + } +} + +/** + * + *

The Amazon Kinesis Data Firehose, RedactedFields + * information, and the web ACL Amazon Resource Name (ARN).

+ * + */ +export interface LoggingConfiguration { + __type?: "LoggingConfiguration"; + /** + * + *

An array of Amazon Kinesis Data Firehose ARNs.

+ * + */ + LogDestinationConfigs: Array | undefined; + + /** + * + *

The parts of the request that you want redacted from the logs. For + * example, + * if you redact the cookie field, the cookie field in the firehose will be + * xxx.

+ * + */ + RedactedFields?: Array; + + /** + * + *

The Amazon Resource Name (ARN) of the web ACL that you want to associate with + * LogDestinationConfigs.

+ * + */ + ResourceArn: string | undefined; +} + +export namespace LoggingConfiguration { + export function isa(o: any): o is LoggingConfiguration { + return _smithy.isa(o, "LoggingConfiguration"); + } +} + +export enum MatchFieldType { + ALL_QUERY_ARGS = "ALL_QUERY_ARGS", + BODY = "BODY", + HEADER = "HEADER", + METHOD = "METHOD", + QUERY_STRING = "QUERY_STRING", + SINGLE_QUERY_ARG = "SINGLE_QUERY_ARG", + URI = "URI" +} + +export enum ParameterExceptionField { + BYTE_MATCH_FIELD_TYPE = "BYTE_MATCH_FIELD_TYPE", + BYTE_MATCH_POSITIONAL_CONSTRAINT = "BYTE_MATCH_POSITIONAL_CONSTRAINT", + BYTE_MATCH_TEXT_TRANSFORMATION = "BYTE_MATCH_TEXT_TRANSFORMATION", + CHANGE_ACTION = "CHANGE_ACTION", + GEO_MATCH_LOCATION_TYPE = "GEO_MATCH_LOCATION_TYPE", + GEO_MATCH_LOCATION_VALUE = "GEO_MATCH_LOCATION_VALUE", + IPSET_TYPE = "IPSET_TYPE", + NEXT_MARKER = "NEXT_MARKER", + PREDICATE_TYPE = "PREDICATE_TYPE", + RATE_KEY = "RATE_KEY", + RESOURCE_ARN = "RESOURCE_ARN", + RULE_TYPE = "RULE_TYPE", + SIZE_CONSTRAINT_COMPARISON_OPERATOR = "SIZE_CONSTRAINT_COMPARISON_OPERATOR", + SQL_INJECTION_MATCH_FIELD_TYPE = "SQL_INJECTION_MATCH_FIELD_TYPE", + TAGS = "TAGS", + TAG_KEYS = "TAG_KEYS", + WAF_ACTION = "WAF_ACTION", + WAF_OVERRIDE_ACTION = "WAF_OVERRIDE_ACTION" +} + +export enum ParameterExceptionReason { + ILLEGAL_ARGUMENT = "ILLEGAL_ARGUMENT", + ILLEGAL_COMBINATION = "ILLEGAL_COMBINATION", + INVALID_OPTION = "INVALID_OPTION", + INVALID_TAG_KEY = "INVALID_TAG_KEY" +} + +export enum PositionalConstraint { + CONTAINS = "CONTAINS", + CONTAINS_WORD = "CONTAINS_WORD", + ENDS_WITH = "ENDS_WITH", + EXACTLY = "EXACTLY", + STARTS_WITH = "STARTS_WITH" +} + +/** + * + *

Specifies the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, GeoMatchSet, and SizeConstraintSet objects + * that you want to add to a Rule and, for each object, indicates whether you want to negate the settings, for example, requests that do + * NOT originate from the IP address 192.0.2.44.

+ * + */ +export interface Predicate { + __type?: "Predicate"; + /** + * + *

A unique identifier for a predicate in a Rule, such as ByteMatchSetId or IPSetId. + * The ID is returned by the corresponding Create or List command.

+ * + */ + DataId: string | undefined; + + /** + * + *

Set Negated to False if you want AWS WAF to allow, block, or count requests based on the settings in the + * specified ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, GeoMatchSet, or SizeConstraintSet. + * For example, if an IPSet includes the IP address 192.0.2.44, AWS WAF will allow or block requests based on that IP address.

+ *

Set Negated to True if you want AWS WAF to allow or block a request based on the negation + * of the settings in the ByteMatchSet, IPSet, SqlInjectionMatchSet, XssMatchSet, RegexMatchSet, GeoMatchSet, or SizeConstraintSet. + * For example, if an IPSet includes the IP address 192.0.2.44, AWS WAF will allow, block, or count requests based on + * all IP addresses except + * 192.0.2.44.

+ * + */ + Negated: boolean | undefined; + + /** + * + *

The type of predicate in a Rule, such as ByteMatch or IPSet.

+ * + */ + Type: PredicateType | string | undefined; +} + +export namespace Predicate { + export function isa(o: any): o is Predicate { + return _smithy.isa(o, "Predicate"); + } +} + +export enum PredicateType { + BYTE_MATCH = "ByteMatch", + GEO_MATCH = "GeoMatch", + IP_MATCH = "IPMatch", + REGEX_MATCH = "RegexMatch", + SIZE_CONSTRAINT = "SizeConstraint", + SQL_INJECTION_MATCH = "SqlInjectionMatch", + XSS_MATCH = "XssMatch" +} + +export interface PutLoggingConfigurationRequest { + __type?: "PutLoggingConfigurationRequest"; + /** + * + *

The Amazon Kinesis Data Firehose that contains the inspected traffic + * information, the redacted fields details, and the Amazon Resource Name (ARN) of the web ACL + * to monitor.

+ * + *

When specifying Type in RedactedFields, you must use one of + * the following values: URI, QUERY_STRING, HEADER, + * or METHOD.

+ *
+ * + */ + LoggingConfiguration: LoggingConfiguration | undefined; +} + +export namespace PutLoggingConfigurationRequest { + export function isa(o: any): o is PutLoggingConfigurationRequest { + return _smithy.isa(o, "PutLoggingConfigurationRequest"); + } +} + +export interface PutLoggingConfigurationResponse extends $MetadataBearer { + __type?: "PutLoggingConfigurationResponse"; + /** + * + *

The LoggingConfiguration that you submitted in the request.

+ * + */ + LoggingConfiguration?: LoggingConfiguration; +} + +export namespace PutLoggingConfigurationResponse { + export function isa(o: any): o is PutLoggingConfigurationResponse { + return _smithy.isa(o, "PutLoggingConfigurationResponse"); + } +} + +export interface PutPermissionPolicyRequest { + __type?: "PutPermissionPolicyRequest"; + /** + * + *

The policy to attach to the specified RuleGroup.

+ * + */ + Policy: string | undefined; + + /** + * + *

The Amazon Resource Name (ARN) of the RuleGroup to which you want to attach the policy.

+ * + * + */ + ResourceArn: string | undefined; +} + +export namespace PutPermissionPolicyRequest { + export function isa(o: any): o is PutPermissionPolicyRequest { + return _smithy.isa(o, "PutPermissionPolicyRequest"); + } +} + +export interface PutPermissionPolicyResponse extends $MetadataBearer { + __type?: "PutPermissionPolicyResponse"; +} + +export namespace PutPermissionPolicyResponse { + export function isa(o: any): o is PutPermissionPolicyResponse { + return _smithy.isa(o, "PutPermissionPolicyResponse"); + } +} + +/** + * + *

A RateBasedRule is identical to a regular Rule, with + * one addition: a RateBasedRule counts the number of requests that arrive from a + * specified IP address every five minutes. For example, based on recent requests that you've + * seen from an attacker, you might create a RateBasedRule that includes the + * following conditions:

+ *
    + *
  • + *

    The requests come from 192.0.2.44.

    + *
  • + *
  • + *

    They contain the value BadBot in the User-Agent + * header.

    + *
  • + *
+ *

In the rule, you also define the rate limit as 15,000.

+ *

Requests that meet both of these conditions and exceed 15,000 requests every five + * minutes trigger the rule's action (block or count), which is defined in the web + * ACL.

+ * + */ +export interface RateBasedRule { + __type?: "RateBasedRule"; + /** + * + *

The Predicates object contains one Predicate element for + * each ByteMatchSet, IPSet, or SqlInjectionMatchSet object that you want to include in a + * RateBasedRule.

+ * + */ + MatchPredicates: Array | undefined; + + /** + * + *

A friendly name or description for the metrics for a RateBasedRule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain + * whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after you create the + * RateBasedRule.

+ * + */ + MetricName?: string; + + /** + * + * + *

A friendly name or description for a RateBasedRule. You can't change the + * name of a RateBasedRule after you create it.

+ * + * + */ + Name?: string; + + /** + * + *

The field that AWS WAF uses to determine if requests are likely arriving from single + * source and thus subject to rate monitoring. The only valid value for RateKey + * is IP. IP indicates that requests arriving from the same IP + * address are subject to the RateLimit that is specified in the + * RateBasedRule.

+ * + */ + RateKey: RateKey | string | undefined; + + /** + * + *

The maximum number of requests, which have an identical value in the field specified + * by the RateKey, allowed in a five-minute period. If the number of requests + * exceeds the RateLimit and the other predicates specified in the rule are also + * met, AWS WAF triggers the action that is specified for this rule.

+ * + */ + RateLimit: number | undefined; + + /** + * + *

A unique identifier for a RateBasedRule. You use RuleId to + * get more information about a RateBasedRule (see GetRateBasedRule), update a RateBasedRule (see UpdateRateBasedRule), insert a RateBasedRule into a + * WebACL or delete one from a WebACL (see UpdateWebACL), or delete a RateBasedRule from AWS WAF (see DeleteRateBasedRule).

+ * + */ + RuleId: string | undefined; +} + +export namespace RateBasedRule { + export function isa(o: any): o is RateBasedRule { + return _smithy.isa(o, "RateBasedRule"); + } +} + +export enum RateKey { + IP = "IP" +} + +/** + * + *

In a GetRegexMatchSet request, RegexMatchSet is a complex type that contains the RegexMatchSetId and + * Name of a RegexMatchSet, and the values that you specified when you updated the RegexMatchSet.

+ *

The values are contained in a RegexMatchTuple object, which specify the parts of web requests that you want AWS WAF to inspect and the values that you want AWS WAF to search for. If a RegexMatchSet contains more than one + * RegexMatchTuple object, a request needs to match the settings in only one ByteMatchTuple + * to be considered a match.

+ * + */ +export interface RegexMatchSet { + __type?: "RegexMatchSet"; + /** + * + *

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

+ * + */ + Name?: string; + + /** + * + *

The RegexMatchSetId for a RegexMatchSet. You use RegexMatchSetId to get information about a + * RegexMatchSet (see GetRegexMatchSet), update a RegexMatchSet (see UpdateRegexMatchSet), + * insert a RegexMatchSet into a Rule or delete one from a Rule (see UpdateRule), and + * delete a RegexMatchSet from AWS WAF (see DeleteRegexMatchSet).

+ *

+ * RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets.

+ * + */ + RegexMatchSetId?: string; + + /** + * + *

Contains an array of RegexMatchTuple objects. Each RegexMatchTuple + * object contains:

+ *
    + *
  • + *

    The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header.

    + *
  • + *
  • + *

    The identifier of the pattern (a regular expression) that you want AWS WAF to look for. For more information, see RegexPatternSet.

    + *
  • + *
  • + *

    Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string.

    + *
  • + *
+ * + * + */ + RegexMatchTuples?: Array; +} + +export namespace RegexMatchSet { + export function isa(o: any): o is RegexMatchSet { + return _smithy.isa(o, "RegexMatchSet"); + } +} + +/** + * + *

Returned by ListRegexMatchSets. Each RegexMatchSetSummary object includes the Name and + * RegexMatchSetId for one RegexMatchSet.

+ * + */ +export interface RegexMatchSetSummary { + __type?: "RegexMatchSetSummary"; + /** + * + *

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

+ * + */ + Name: string | undefined; + + /** + * + *

The RegexMatchSetId for a RegexMatchSet. You use RegexMatchSetId to get information about a RegexMatchSet, + * update a RegexMatchSet, remove a RegexMatchSet from a Rule, and delete a RegexMatchSet from AWS WAF.

+ *

+ * RegexMatchSetId is returned by CreateRegexMatchSet and by ListRegexMatchSets.

+ * + */ + RegexMatchSetId: string | undefined; +} + +export namespace RegexMatchSetSummary { + export function isa(o: any): o is RegexMatchSetSummary { + return _smithy.isa(o, "RegexMatchSetSummary"); + } +} + +/** + * + *

In an UpdateRegexMatchSet request, RegexMatchSetUpdate specifies whether to insert or delete a + * RegexMatchTuple and includes the settings for the RegexMatchTuple.

+ * + */ +export interface RegexMatchSetUpdate { + __type?: "RegexMatchSetUpdate"; + /** + * + *

Specifies whether to insert or delete a RegexMatchTuple.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

Information about the part of a web request that you want AWS WAF to inspect and the identifier of the regular expression (regex) pattern that you want AWS WAF to search for. + * If you specify DELETE for the value of Action, the RegexMatchTuple values must + * exactly match the values in the RegexMatchTuple that you want to delete from the RegexMatchSet.

+ * + */ + RegexMatchTuple: RegexMatchTuple | undefined; +} + +export namespace RegexMatchSetUpdate { + export function isa(o: any): o is RegexMatchSetUpdate { + return _smithy.isa(o, "RegexMatchSetUpdate"); + } +} + +/** + * + *

The regular expression pattern that you want AWS WAF to search for in web requests, the location in requests that you want AWS WAF to search, and other settings. Each RegexMatchTuple object contains:

+ *
    + *
  • + *

    The part of a web request that you want AWS WAF to inspect, such as a query string or the value of the User-Agent header.

    + *
  • + *
  • + *

    The identifier of the pattern (a regular expression) that you want AWS WAF to look for. For more information, see RegexPatternSet.

    + *
  • + *
  • + *

    Whether to perform any conversions on the request, such as converting it to lowercase, before inspecting it for the specified string.

    + *
  • + *
+ * + */ +export interface RegexMatchTuple { + __type?: "RegexMatchTuple"; + /** + * + *

Specifies where in a web request to look for the RegexPatternSet.

+ * + */ + FieldToMatch: FieldToMatch | undefined; + + /** + * + *

The RegexPatternSetId for a RegexPatternSet. You use RegexPatternSetId to get information about a + * RegexPatternSet (see GetRegexPatternSet), update a RegexPatternSet (see UpdateRegexPatternSet), + * insert a RegexPatternSet into a RegexMatchSet or delete one from a RegexMatchSet (see UpdateRegexMatchSet), and + * delete an RegexPatternSet from AWS WAF (see DeleteRegexPatternSet).

+ *

+ * RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets.

+ * + */ + RegexPatternSetId: string | undefined; + + /** + * + *

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. + * If you specify a transformation, AWS WAF performs the transformation on RegexPatternSet before inspecting a request for a match.

+ *

You can only specify a single type of TextTransformation.

+ *

+ * CMD_LINE + *

+ *

When you're concerned that attackers are injecting an operating system commandline command and using unusual formatting to disguise some or all of the command, use this option to perform the following transformations:

+ *
    + *
  • + *

    Delete the following characters: \ " ' ^

    + *
  • + *
  • + *

    Delete spaces before the following characters: / (

    + *
  • + *
  • + *

    Replace the following characters with a space: , ;

    + *
  • + *
  • + *

    Replace multiple spaces with one space

    + *
  • + *
  • + *

    Convert uppercase letters (A-Z) to lowercase (a-z)

    + *
  • + *
+ * + *

+ * COMPRESS_WHITE_SPACE + *

+ *

Use this option to replace the following characters with a space character (decimal 32):

+ *
    + *
  • + *

    \f, formfeed, decimal 12

    + *
  • + *
  • + *

    \t, tab, decimal 9

    + *
  • + *
  • + *

    \n, newline, decimal 10

    + *
  • + *
  • + *

    \r, carriage return, decimal 13

    + *
  • + *
  • + *

    \v, vertical tab, decimal 11

    + *
  • + *
  • + *

    non-breaking space, decimal 160

    + *
  • + *
+ *

+ * COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.

+ *

+ * HTML_ENTITY_DECODE + *

+ *

Use this option to replace HTML-encoded characters with unencoded characters. HTML_ENTITY_DECODE performs + * the following operations:

+ *
    + *
  • + *

    Replaces (ampersand)quot; with " + *

    + *
  • + *
  • + *

    Replaces (ampersand)nbsp; with a non-breaking space, decimal 160

    + *
  • + *
  • + *

    Replaces (ampersand)lt; with a "less than" symbol

    + *
  • + *
  • + *

    Replaces (ampersand)gt; with > + *

    + *
  • + *
  • + *

    Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, with the corresponding + * characters

    + *
  • + *
  • + *

    Replaces characters that are represented in decimal format, (ampersand)#nnnn;, with the corresponding + * characters

    + *
  • + *
+ *

+ * LOWERCASE + *

+ *

Use this option to convert uppercase letters (A-Z) to lowercase (a-z).

+ *

+ * URL_DECODE + *

+ *

Use this option to decode a URL-encoded value.

+ *

+ * NONE + *

+ *

Specify NONE if you don't want to perform any text transformations.

+ * + */ + TextTransformation: TextTransformation | string | undefined; +} + +export namespace RegexMatchTuple { + export function isa(o: any): o is RegexMatchTuple { + return _smithy.isa(o, "RegexMatchTuple"); + } +} + +/** + * + *

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

+ * + */ +export interface RegexPatternSet { + __type?: "RegexPatternSet"; + /** + * + *

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

+ * + */ + Name?: string; + + /** + * + *

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

+ *

+ * RegexMatchSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets.

+ * + */ + RegexPatternSetId: string | undefined; + + /** + * + *

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

+ * + */ + RegexPatternStrings: Array | undefined; +} + +export namespace RegexPatternSet { + export function isa(o: any): o is RegexPatternSet { + return _smithy.isa(o, "RegexPatternSet"); + } +} + +/** + * + *

Returned by ListRegexPatternSets. Each RegexPatternSetSummary object includes the Name and + * RegexPatternSetId for one RegexPatternSet.

+ * + */ +export interface RegexPatternSetSummary { + __type?: "RegexPatternSetSummary"; + /** + * + *

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

+ * + */ + Name: string | undefined; + + /** + * + *

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

+ *

+ * RegexPatternSetId is returned by CreateRegexPatternSet and by ListRegexPatternSets.

+ * + */ + RegexPatternSetId: string | undefined; +} + +export namespace RegexPatternSetSummary { + export function isa(o: any): o is RegexPatternSetSummary { + return _smithy.isa(o, "RegexPatternSetSummary"); + } +} + +/** + * + *

In an UpdateRegexPatternSet request, RegexPatternSetUpdate specifies whether to insert or delete a + * RegexPatternString and includes the settings for the RegexPatternString.

+ * + */ +export interface RegexPatternSetUpdate { + __type?: "RegexPatternSetUpdate"; + /** + * + *

Specifies whether to insert or delete a RegexPatternString.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

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

+ * + */ + RegexPatternString: string | undefined; +} + +export namespace RegexPatternSetUpdate { + export function isa(o: any): o is RegexPatternSetUpdate { + return _smithy.isa(o, "RegexPatternSetUpdate"); + } +} + +export enum ResourceType { + API_GATEWAY = "API_GATEWAY", + APPLICATION_LOAD_BALANCER = "APPLICATION_LOAD_BALANCER" +} + +/** + * + *

A combination of ByteMatchSet, IPSet, and/or SqlInjectionMatchSet objects that identify the web requests that you + * want to allow, block, or count. For example, you might create a Rule that includes the following predicates:

+ *
    + *
  • + *

    An IPSet that causes AWS WAF to search for web requests that originate from the IP address 192.0.2.44 + *

    + *
  • + *
  • + *

    A ByteMatchSet that causes AWS WAF to search for web requests for which the value of the User-Agent + * header is BadBot.

    + *
  • + *
+ *

To match the settings in this Rule, a request must originate from 192.0.2.44 AND include a User-Agent + * header for which the value is BadBot.

+ * + */ +export interface Rule { + __type?: "Rule"; + /** + * + *

A friendly name or description for the metrics for this Rule. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain + * whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the Rule.

+ * + */ + MetricName?: string; + + /** + * + *

The friendly name or description for the Rule. You can't change the name of a Rule after you create it.

+ * + */ + Name?: string; + + /** + * + *

The Predicates object contains one Predicate element for each ByteMatchSet, IPSet, or + * SqlInjectionMatchSet object that you want to include in a Rule.

+ * + */ + Predicates: Array | undefined; + + /** + * + *

A unique identifier for a Rule. You use RuleId to get more information about a Rule (see GetRule), + * update a Rule (see UpdateRule), insert a Rule into a WebACL or delete a + * one from a WebACL (see UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).

+ *

+ * RuleId is returned by CreateRule and by ListRules.

+ * + */ + RuleId: string | undefined; +} + +export namespace Rule { + export function isa(o: any): o is Rule { + return _smithy.isa(o, "Rule"); + } +} + +/** + * + *

A collection of predefined rules that you can add to a web ACL.

+ *

Rule groups are subject to the following limits:

+ *
    + *
  • + *

    Three rule groups per account. You can request an increase to this limit by contacting customer support.

    + *
  • + *
  • + *

    One rule group per web ACL.

    + *
  • + *
  • + *

    Ten rules per rule group.

    + *
  • + *
+ * + */ +export interface RuleGroup { + __type?: "RuleGroup"; + /** + * + *

A friendly name or description for the metrics for this RuleGroup. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain + * whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after you create the RuleGroup.

+ * + */ + MetricName?: string; + + /** + * + *

The friendly name or description for the RuleGroup. You can't change the name of a RuleGroup after you create it.

+ * + */ + Name?: string; + + /** + * + *

A unique identifier for a RuleGroup. You use RuleGroupId to get more information about a RuleGroup (see GetRuleGroup), + * update a RuleGroup (see UpdateRuleGroup), insert a RuleGroup into a WebACL or delete a + * one from a WebACL (see UpdateWebACL), or delete a RuleGroup from AWS WAF (see DeleteRuleGroup).

+ *

+ * RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups.

+ * + */ + RuleGroupId: string | undefined; +} + +export namespace RuleGroup { + export function isa(o: any): o is RuleGroup { + return _smithy.isa(o, "RuleGroup"); + } +} + +/** + * + *

Contains the identifier and the friendly name or description of the RuleGroup.

+ * + */ +export interface RuleGroupSummary { + __type?: "RuleGroupSummary"; + /** + * + *

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

+ * + */ + Name: string | undefined; + + /** + * + *

A unique identifier for a RuleGroup. You use RuleGroupId to get more information about a RuleGroup (see GetRuleGroup), + * update a RuleGroup (see UpdateRuleGroup), insert a RuleGroup into a WebACL or delete + * one from a WebACL (see UpdateWebACL), or delete a RuleGroup from AWS WAF (see DeleteRuleGroup).

+ *

+ * RuleGroupId is returned by CreateRuleGroup and by ListRuleGroups.

+ * + */ + RuleGroupId: string | undefined; +} + +export namespace RuleGroupSummary { + export function isa(o: any): o is RuleGroupSummary { + return _smithy.isa(o, "RuleGroupSummary"); + } +} + +/** + * + *

Specifies an ActivatedRule and indicates whether you want to add it to a + * RuleGroup or delete it from a RuleGroup.

+ * + */ +export interface RuleGroupUpdate { + __type?: "RuleGroupUpdate"; + /** + * + *

Specify INSERT to add an ActivatedRule to a RuleGroup. Use DELETE to remove an + * ActivatedRule from a RuleGroup.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

The ActivatedRule object specifies a Rule that you want to insert or delete, + * the priority of the Rule in the WebACL, and the action that you want AWS WAF to take when a web request matches the Rule + * (ALLOW, BLOCK, or COUNT).

+ * + * + */ + ActivatedRule: ActivatedRule | undefined; +} + +export namespace RuleGroupUpdate { + export function isa(o: any): o is RuleGroupUpdate { + return _smithy.isa(o, "RuleGroupUpdate"); + } +} + +/** + * + *

Contains the identifier and the friendly name or description of the Rule.

+ * + */ +export interface RuleSummary { + __type?: "RuleSummary"; + /** + * + *

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

+ * + */ + Name: string | undefined; + + /** + * + *

A unique identifier for a Rule. You use RuleId to get more information about a Rule (see GetRule), + * update a Rule (see UpdateRule), insert a Rule into a WebACL or delete + * one from a WebACL (see UpdateWebACL), or delete a Rule from AWS WAF (see DeleteRule).

+ *

+ * RuleId is returned by CreateRule and by ListRules.

+ * + */ + RuleId: string | undefined; +} + +export namespace RuleSummary { + export function isa(o: any): o is RuleSummary { + return _smithy.isa(o, "RuleSummary"); + } +} + +/** + * + *

Specifies a Predicate (such as an IPSet) and indicates whether you want to add it to a + * Rule or delete it from a Rule.

+ * + */ +export interface RuleUpdate { + __type?: "RuleUpdate"; + /** + * + *

Specify INSERT to add a Predicate to a Rule. Use DELETE to remove a + * Predicate from a Rule.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

The ID of the Predicate (such as an IPSet) that you want to add to a Rule.

+ * + */ + Predicate: Predicate | undefined; +} + +export namespace RuleUpdate { + export function isa(o: any): o is RuleUpdate { + return _smithy.isa(o, "RuleUpdate"); + } +} + +/** + * + *

The response from a GetSampledRequests request includes a SampledHTTPRequests complex type that + * appears as SampledRequests in the response syntax. SampledHTTPRequests contains one + * SampledHTTPRequest object for each web request that is returned by GetSampledRequests.

+ * + */ +export interface SampledHTTPRequest { + __type?: "SampledHTTPRequest"; + /** + * + *

The action for the Rule that the request matched: ALLOW, BLOCK, or COUNT.

+ * + */ + Action?: string; + + /** + * + *

A complex type that contains detailed information about the request.

+ * + */ + Request: HTTPRequest | undefined; + + /** + * + *

This value is returned if the GetSampledRequests request specifies the ID of a RuleGroup rather than the ID of an individual rule. RuleWithinRuleGroup is the rule within the specified RuleGroup that matched the request listed in the response.

+ * + */ + RuleWithinRuleGroup?: string; + + /** + * + *

The time at which AWS WAF received the request from your AWS resource, in Unix time format (in seconds).

+ * + */ + Timestamp?: Date; + + /** + * + *

A value that indicates how one result in the response relates proportionally to other results in the response. + * A result that has a weight of 2 represents roughly twice as many CloudFront web requests as a result + * that has a weight of 1.

+ * + */ + Weight: number | undefined; +} + +export namespace SampledHTTPRequest { + export function isa(o: any): o is SampledHTTPRequest { + return _smithy.isa(o, "SampledHTTPRequest"); + } +} + +/** + * + *

Specifies a constraint on the size of a part of the web request. AWS WAF uses the Size, ComparisonOperator, and FieldToMatch to build + * an expression in the form of "Size + * ComparisonOperator size in bytes of FieldToMatch". If that expression is true, the + * SizeConstraint is considered to match.

+ * + */ +export interface SizeConstraint { + __type?: "SizeConstraint"; + /** + * + *

The type of comparison you want AWS WAF to perform. AWS WAF uses this in combination with the provided Size and FieldToMatch + * to build an expression in the form of "Size + * ComparisonOperator size in bytes of FieldToMatch". If that expression + * is true, the SizeConstraint is considered to match.

+ *

+ * EQ: Used to test if the Size is equal to the size of the FieldToMatch + *

+ *

+ * NE: Used to test if the Size is not equal to the size of the FieldToMatch + *

+ *

+ * LE: Used to test if the Size is less than or equal to the size of the FieldToMatch + *

+ *

+ * LT: Used to test if the Size is strictly less than the size of the FieldToMatch + *

+ *

+ * GE: Used to test if the Size is greater than or equal to the size of the FieldToMatch + *

+ *

+ * GT: Used to test if the Size is strictly greater than the size of the FieldToMatch + *

+ * + */ + ComparisonOperator: ComparisonOperator | string | undefined; + + /** + * + *

Specifies where in a web request to look for the size constraint.

+ * + */ + FieldToMatch: FieldToMatch | undefined; + + /** + * + *

The size in bytes that you want AWS WAF to compare against the size of the specified FieldToMatch. AWS WAF uses this in combination + * with ComparisonOperator and FieldToMatch to build an expression in the form of "Size + * ComparisonOperator size + * in bytes of FieldToMatch". If that expression is true, the SizeConstraint is considered to match.

+ *

Valid values for size are 0 - 21474836480 bytes (0 - 20 GB).

+ *

If you specify URI for the value of Type, the / in the URI counts as one character. + * For example, the URI /logo.jpg is nine characters long.

+ * + */ + Size: number | undefined; + + /** + * + *

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. + * If you specify a transformation, AWS WAF performs the transformation on FieldToMatch before inspecting a request for a match.

+ *

You can only specify a single type of TextTransformation.

+ *

Note that if you choose BODY for the value of Type, you must choose NONE for TextTransformation + * because CloudFront forwards only the first 8192 bytes for inspection.

+ *

+ * NONE + *

+ *

Specify NONE if you don't want to perform any text transformations.

+ *

+ * CMD_LINE + *

+ *

When you're concerned that attackers are injecting an operating system command line command and using unusual formatting to disguise some or all of the command, use this option to perform the following transformations:

+ *
    + *
  • + *

    Delete the following characters: \ " ' ^

    + *
  • + *
  • + *

    Delete spaces before the following characters: / (

    + *
  • + *
  • + *

    Replace the following characters with a space: , ;

    + *
  • + *
  • + *

    Replace multiple spaces with one space

    + *
  • + *
  • + *

    Convert uppercase letters (A-Z) to lowercase (a-z)

    + *
  • + *
+ *

+ * COMPRESS_WHITE_SPACE + *

+ *

Use this option to replace the following characters with a space character (decimal 32):

+ *
    + *
  • + *

    \f, formfeed, decimal 12

    + *
  • + *
  • + *

    \t, tab, decimal 9

    + *
  • + *
  • + *

    \n, newline, decimal 10

    + *
  • + *
  • + *

    \r, carriage return, decimal 13

    + *
  • + *
  • + *

    \v, vertical tab, decimal 11

    + *
  • + *
  • + *

    non-breaking space, decimal 160

    + *
  • + *
+ *

+ * COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.

+ *

+ * HTML_ENTITY_DECODE + *

+ *

Use this option to replace HTML-encoded characters with unencoded characters. HTML_ENTITY_DECODE performs + * the following operations:

+ *
    + *
  • + *

    Replaces (ampersand)quot; with " + *

    + *
  • + *
  • + *

    Replaces (ampersand)nbsp; with a non-breaking space, decimal 160

    + *
  • + *
  • + *

    Replaces (ampersand)lt; with a "less than" symbol

    + *
  • + *
  • + *

    Replaces (ampersand)gt; with > + *

    + *
  • + *
  • + *

    Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, with the corresponding + * characters

    + *
  • + *
  • + *

    Replaces characters that are represented in decimal format, (ampersand)#nnnn;, with the corresponding + * characters

    + *
  • + *
+ *

+ * LOWERCASE + *

+ *

Use this option to convert uppercase letters (A-Z) to lowercase (a-z).

+ *

+ * URL_DECODE + *

+ *

Use this option to decode a URL-encoded value.

+ * + */ + TextTransformation: TextTransformation | string | undefined; +} + +export namespace SizeConstraint { + export function isa(o: any): o is SizeConstraint { + return _smithy.isa(o, "SizeConstraint"); + } +} + +/** + * + *

A complex type that contains SizeConstraint objects, which specify the parts of web requests that you + * want AWS WAF to inspect the size of. If a SizeConstraintSet contains more than one SizeConstraint + * object, a request only needs to match one constraint to be considered a match.

+ * + */ +export interface SizeConstraintSet { + __type?: "SizeConstraintSet"; + /** + * + *

The name, if any, of the SizeConstraintSet.

+ * + */ + Name?: string; + + /** + * + *

A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId to get information about a + * SizeConstraintSet (see GetSizeConstraintSet), update a SizeConstraintSet + * (see UpdateSizeConstraintSet), insert a SizeConstraintSet into a Rule or + * delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet from AWS WAF + * (see DeleteSizeConstraintSet).

+ *

+ * SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.

+ * + */ + SizeConstraintSetId: string | undefined; + + /** + * + *

Specifies the parts of web requests that you want to inspect the size of.

+ * + */ + SizeConstraints: Array | undefined; +} + +export namespace SizeConstraintSet { + export function isa(o: any): o is SizeConstraintSet { + return _smithy.isa(o, "SizeConstraintSet"); + } +} + +/** + * + *

The Id and Name of a SizeConstraintSet.

+ * + */ +export interface SizeConstraintSetSummary { + __type?: "SizeConstraintSetSummary"; + /** + * + *

The name of the SizeConstraintSet, if any.

+ * + */ + Name: string | undefined; + + /** + * + *

A unique identifier for a SizeConstraintSet. You use SizeConstraintSetId to get information about a + * SizeConstraintSet (see GetSizeConstraintSet), update a SizeConstraintSet + * (see UpdateSizeConstraintSet), insert a SizeConstraintSet into a Rule or + * delete one from a Rule (see UpdateRule), and delete a SizeConstraintSet from AWS WAF + * (see DeleteSizeConstraintSet).

+ *

+ * SizeConstraintSetId is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.

+ * + */ + SizeConstraintSetId: string | undefined; +} + +export namespace SizeConstraintSetSummary { + export function isa(o: any): o is SizeConstraintSetSummary { + return _smithy.isa(o, "SizeConstraintSetSummary"); + } +} + +/** + * + *

Specifies the part of a web request that you want to inspect the size of and indicates whether you want to + * add the specification to a SizeConstraintSet or delete it from a SizeConstraintSet.

+ * + */ +export interface SizeConstraintSetUpdate { + __type?: "SizeConstraintSetUpdate"; + /** + * + *

Specify INSERT to add a SizeConstraintSetUpdate to a SizeConstraintSet. + * Use DELETE to remove a SizeConstraintSetUpdate from a SizeConstraintSet.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

Specifies a constraint on the size of a part of the web request. AWS WAF uses the Size, ComparisonOperator, and FieldToMatch to build + * an expression in the form of "Size + * ComparisonOperator size in bytes of FieldToMatch". If that expression is true, the + * SizeConstraint is considered to match.

+ * + */ + SizeConstraint: SizeConstraint | undefined; +} + +export namespace SizeConstraintSetUpdate { + export function isa(o: any): o is SizeConstraintSetUpdate { + return _smithy.isa(o, "SizeConstraintSetUpdate"); + } +} + +/** + * + *

A complex type that contains SqlInjectionMatchTuple objects, which specify the parts of web requests that you + * want AWS WAF to inspect for snippets of malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header. If a + * SqlInjectionMatchSet contains more than one SqlInjectionMatchTuple object, a request needs to + * include snippets of SQL code in only one of the specified parts of the request to be considered a match.

+ * + */ +export interface SqlInjectionMatchSet { + __type?: "SqlInjectionMatchSet"; + /** + * + *

The name, if any, of the SqlInjectionMatchSet.

+ * + */ + Name?: string; + + /** + * + *

A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId to get information about a + * SqlInjectionMatchSet (see GetSqlInjectionMatchSet), update a SqlInjectionMatchSet + * (see UpdateSqlInjectionMatchSet), insert a SqlInjectionMatchSet into a Rule or + * delete one from a Rule (see UpdateRule), and delete a SqlInjectionMatchSet from AWS WAF + * (see DeleteSqlInjectionMatchSet).

+ *

+ * SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.

+ * + */ + SqlInjectionMatchSetId: string | undefined; + + /** + * + *

Specifies the parts of web requests that you want to inspect for snippets of malicious SQL code.

+ * + */ + SqlInjectionMatchTuples: Array | undefined; +} + +export namespace SqlInjectionMatchSet { + export function isa(o: any): o is SqlInjectionMatchSet { + return _smithy.isa(o, "SqlInjectionMatchSet"); + } +} + +/** + * + *

The Id and Name of a SqlInjectionMatchSet.

+ * + */ +export interface SqlInjectionMatchSetSummary { + __type?: "SqlInjectionMatchSetSummary"; + /** + * + *

The name of the SqlInjectionMatchSet, if any, specified by Id.

+ * + */ + Name: string | undefined; + + /** + * + *

A unique identifier for a SqlInjectionMatchSet. You use SqlInjectionMatchSetId to get information about a + * SqlInjectionMatchSet (see GetSqlInjectionMatchSet), update a SqlInjectionMatchSet + * (see UpdateSqlInjectionMatchSet), insert a SqlInjectionMatchSet into a Rule or + * delete one from a Rule (see UpdateRule), and delete a SqlInjectionMatchSet from AWS WAF + * (see DeleteSqlInjectionMatchSet).

+ *

+ * SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.

+ * + */ + SqlInjectionMatchSetId: string | undefined; +} + +export namespace SqlInjectionMatchSetSummary { + export function isa(o: any): o is SqlInjectionMatchSetSummary { + return _smithy.isa(o, "SqlInjectionMatchSetSummary"); + } +} + +/** + * + *

Specifies the part of a web request that you want to inspect for snippets of malicious SQL code and indicates whether you want to + * add the specification to a SqlInjectionMatchSet or delete it from a SqlInjectionMatchSet.

+ * + */ +export interface SqlInjectionMatchSetUpdate { + __type?: "SqlInjectionMatchSetUpdate"; + /** + * + *

Specify INSERT to add a SqlInjectionMatchSetUpdate to a SqlInjectionMatchSet. + * Use DELETE to remove a SqlInjectionMatchSetUpdate from a SqlInjectionMatchSet.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

Specifies the part of a web request that you want AWS WAF to inspect for snippets of malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.

+ * + */ + SqlInjectionMatchTuple: SqlInjectionMatchTuple | undefined; +} + +export namespace SqlInjectionMatchSetUpdate { + export function isa(o: any): o is SqlInjectionMatchSetUpdate { + return _smithy.isa(o, "SqlInjectionMatchSetUpdate"); + } +} + +/** + * + *

Specifies the part of a web request that you want AWS WAF to inspect for snippets of malicious SQL code and, if you want AWS WAF to inspect a header, the name of the header.

+ * + */ +export interface SqlInjectionMatchTuple { + __type?: "SqlInjectionMatchTuple"; + /** + * + *

Specifies where in a web request to look for snippets of malicious SQL code.

+ * + */ + FieldToMatch: FieldToMatch | undefined; + + /** + * + *

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. + * If you specify a transformation, AWS WAF performs the transformation on FieldToMatch before inspecting a request for a match.

+ *

You can only specify a single type of TextTransformation.

+ *

+ * CMD_LINE + *

+ *

When you're concerned that attackers are injecting an operating system command line + * command and using unusual formatting to disguise some or all of the command, use this + * option to perform the following transformations:

+ *
    + *
  • + *

    Delete the following characters: \ " ' ^

    + *
  • + *
  • + *

    Delete spaces before the following characters: / (

    + *
  • + *
  • + *

    Replace the following characters with a space: , ;

    + *
  • + *
  • + *

    Replace multiple spaces with one space

    + *
  • + *
  • + *

    Convert uppercase letters (A-Z) to lowercase (a-z)

    + *
  • + *
+ *

+ * COMPRESS_WHITE_SPACE + *

+ *

Use this option to replace the following characters with a space character (decimal 32):

+ *
    + *
  • + *

    \f, formfeed, decimal 12

    + *
  • + *
  • + *

    \t, tab, decimal 9

    + *
  • + *
  • + *

    \n, newline, decimal 10

    + *
  • + *
  • + *

    \r, carriage return, decimal 13

    + *
  • + *
  • + *

    \v, vertical tab, decimal 11

    + *
  • + *
  • + *

    non-breaking space, decimal 160

    + *
  • + *
+ *

+ * COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.

+ *

+ * HTML_ENTITY_DECODE + *

+ *

Use this option to replace HTML-encoded characters with unencoded characters. HTML_ENTITY_DECODE performs + * the following operations:

+ *
    + *
  • + *

    Replaces (ampersand)quot; with " + *

    + *
  • + *
  • + *

    Replaces (ampersand)nbsp; with a non-breaking space, decimal 160

    + *
  • + *
  • + *

    Replaces (ampersand)lt; with a "less than" symbol

    + *
  • + *
  • + *

    Replaces (ampersand)gt; with > + *

    + *
  • + *
  • + *

    Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, with the corresponding + * characters

    + *
  • + *
  • + *

    Replaces characters that are represented in decimal format, (ampersand)#nnnn;, with the corresponding + * characters

    + *
  • + *
+ *

+ * LOWERCASE + *

+ *

Use this option to convert uppercase letters (A-Z) to lowercase (a-z).

+ *

+ * URL_DECODE + *

+ *

Use this option to decode a URL-encoded value.

+ *

+ * NONE + *

+ *

Specify NONE if you don't want to perform any text transformations.

+ * + */ + TextTransformation: TextTransformation | string | undefined; +} + +export namespace SqlInjectionMatchTuple { + export function isa(o: any): o is SqlInjectionMatchTuple { + return _smithy.isa(o, "SqlInjectionMatchTuple"); + } +} + +/** + * + *

A summary of the rule groups you are subscribed to.

+ * + */ +export interface SubscribedRuleGroupSummary { + __type?: "SubscribedRuleGroupSummary"; + /** + * + *

A friendly name or description for the metrics for this RuleGroup. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain + * whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change the name of the metric after you create the RuleGroup.

+ * + */ + MetricName: string | undefined; + + /** + * + *

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

+ * + */ + Name: string | undefined; + + /** + * + *

A unique identifier for a RuleGroup.

+ * + */ + RuleGroupId: string | undefined; +} + +export namespace SubscribedRuleGroupSummary { + export function isa(o: any): o is SubscribedRuleGroupSummary { + return _smithy.isa(o, "SubscribedRuleGroupSummary"); + } +} + +export interface Tag { + __type?: "Tag"; + Key?: string; + Value?: string; +} + +export namespace Tag { + export function isa(o: any): o is Tag { + return _smithy.isa(o, "Tag"); + } +} + +export interface TagInfoForResource { + __type?: "TagInfoForResource"; + ResourceARN?: string; + TagList?: Array; +} + +export namespace TagInfoForResource { + export function isa(o: any): o is TagInfoForResource { + return _smithy.isa(o, "TagInfoForResource"); + } +} + +export interface TagResourceRequest { + __type?: "TagResourceRequest"; + ResourceARN: string | undefined; + Tags: Array | undefined; +} + +export namespace TagResourceRequest { + export function isa(o: any): o is TagResourceRequest { + return _smithy.isa(o, "TagResourceRequest"); + } +} + +export interface TagResourceResponse extends $MetadataBearer { + __type?: "TagResourceResponse"; +} + +export namespace TagResourceResponse { + export function isa(o: any): o is TagResourceResponse { + return _smithy.isa(o, "TagResourceResponse"); + } +} + +export enum TextTransformation { + CMD_LINE = "CMD_LINE", + COMPRESS_WHITE_SPACE = "COMPRESS_WHITE_SPACE", + HTML_ENTITY_DECODE = "HTML_ENTITY_DECODE", + LOWERCASE = "LOWERCASE", + NONE = "NONE", + URL_DECODE = "URL_DECODE" +} + +/** + * + *

In a GetSampledRequests request, the StartTime and EndTime objects specify the time range + * for which you want AWS WAF to return a sample of web requests.

+ *

In a GetSampledRequests response, the StartTime and EndTime objects specify the time range + * for which AWS WAF actually returned a sample of web requests. AWS WAF gets the specified number of requests from among the first + * 5,000 requests that your AWS resource receives during the specified time period. If your resource receives more than 5,000 + * requests during that period, AWS WAF stops sampling after the 5,000th request. In that case, EndTime + * is the time that AWS WAF received the 5,000th request.

+ * + */ +export interface TimeWindow { + __type?: "TimeWindow"; + /** + * + *

The end of the time range from which you want GetSampledRequests to return a sample of the requests that your + * AWS resource received. Specify the date and time in the following format: "2016-09-27T14:50Z". You can specify any time range in the previous three hours.

+ * + */ + EndTime: Date | undefined; + + /** + * + *

The beginning of the time range from which you want GetSampledRequests to return a sample of the requests that your + * AWS resource received. Specify the date and time in the following format: "2016-09-27T14:50Z". You can specify any time range in the previous three hours.

+ * + */ + StartTime: Date | undefined; +} + +export namespace TimeWindow { + export function isa(o: any): o is TimeWindow { + return _smithy.isa(o, "TimeWindow"); + } +} + +export interface UntagResourceRequest { + __type?: "UntagResourceRequest"; + ResourceARN: string | undefined; + TagKeys: Array | undefined; +} + +export namespace UntagResourceRequest { + export function isa(o: any): o is UntagResourceRequest { + return _smithy.isa(o, "UntagResourceRequest"); + } +} + +export interface UntagResourceResponse extends $MetadataBearer { + __type?: "UntagResourceResponse"; +} + +export namespace UntagResourceResponse { + export function isa(o: any): o is UntagResourceResponse { + return _smithy.isa(o, "UntagResourceResponse"); + } +} + +export interface UpdateByteMatchSetRequest { + __type?: "UpdateByteMatchSetRequest"; + /** + * + *

The ByteMatchSetId of the ByteMatchSet that you want to update. ByteMatchSetId is returned by CreateByteMatchSet and by + * ListByteMatchSets.

+ * + */ + ByteMatchSetId: string | undefined; + + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

An array of ByteMatchSetUpdate objects that you want to insert into or delete from a ByteMatchSet. + * For more information, see the applicable data types:

+ *
    + *
  • + *

    + * ByteMatchSetUpdate: Contains Action and ByteMatchTuple + *

    + *
  • + *
  • + *

    + * ByteMatchTuple: Contains FieldToMatch, PositionalConstraint, TargetString, + * and TextTransformation + *

    + *
  • + *
  • + *

    + * FieldToMatch: Contains Data and Type + *

    + *
  • + *
+ * + */ + Updates: Array | undefined; +} + +export namespace UpdateByteMatchSetRequest { + export function isa(o: any): o is UpdateByteMatchSetRequest { + return _smithy.isa(o, "UpdateByteMatchSetRequest"); + } +} + +export interface UpdateByteMatchSetResponse extends $MetadataBearer { + __type?: "UpdateByteMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateByteMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateByteMatchSetResponse { + export function isa(o: any): o is UpdateByteMatchSetResponse { + return _smithy.isa(o, "UpdateByteMatchSetResponse"); + } +} + +export interface UpdateGeoMatchSetRequest { + __type?: "UpdateGeoMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The GeoMatchSetId of the GeoMatchSet that you want to update. GeoMatchSetId is returned by CreateGeoMatchSet and by + * ListGeoMatchSets.

+ * + */ + GeoMatchSetId: string | undefined; + + /** + * + *

An array of GeoMatchSetUpdate objects that you want to insert into or delete from an GeoMatchSet. + * For more information, see the applicable data types:

+ *
    + *
  • + *

    + * GeoMatchSetUpdate: Contains Action and GeoMatchConstraint + *

    + *
  • + *
  • + *

    + * GeoMatchConstraint: Contains Type and Value + *

    + *

    You can have only one Type and Value per GeoMatchConstraint. To add multiple countries, include multiple GeoMatchSetUpdate objects in your request.

    + *
  • + *
+ * + */ + Updates: Array | undefined; +} + +export namespace UpdateGeoMatchSetRequest { + export function isa(o: any): o is UpdateGeoMatchSetRequest { + return _smithy.isa(o, "UpdateGeoMatchSetRequest"); + } +} + +export interface UpdateGeoMatchSetResponse extends $MetadataBearer { + __type?: "UpdateGeoMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateGeoMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateGeoMatchSetResponse { + export function isa(o: any): o is UpdateGeoMatchSetResponse { + return _smithy.isa(o, "UpdateGeoMatchSetResponse"); + } +} + +export interface UpdateIPSetRequest { + __type?: "UpdateIPSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The IPSetId of the IPSet that you want to update. IPSetId is returned by CreateIPSet and by + * ListIPSets.

+ * + */ + IPSetId: string | undefined; + + /** + * + *

An array of IPSetUpdate objects that you want to insert into or delete from an IPSet. + * For more information, see the applicable data types:

+ *
    + *
  • + *

    + * IPSetUpdate: Contains Action and IPSetDescriptor + *

    + *
  • + *
  • + *

    + * IPSetDescriptor: Contains Type and Value + *

    + *
  • + *
+ *

You can insert a maximum of 1000 addresses in a single request.

+ * + */ + Updates: Array | undefined; +} + +export namespace UpdateIPSetRequest { + export function isa(o: any): o is UpdateIPSetRequest { + return _smithy.isa(o, "UpdateIPSetRequest"); + } +} + +export interface UpdateIPSetResponse extends $MetadataBearer { + __type?: "UpdateIPSetResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateIPSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateIPSetResponse { + export function isa(o: any): o is UpdateIPSetResponse { + return _smithy.isa(o, "UpdateIPSetResponse"); + } +} + +export interface UpdateRateBasedRuleRequest { + __type?: "UpdateRateBasedRuleRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The maximum number of requests, which have an identical value in the field specified by the RateKey, allowed in a + * five-minute period. If the number of requests exceeds the RateLimit and the other + * predicates specified in the rule are also met, + * AWS WAF triggers the action that is specified for this rule.

+ * + */ + RateLimit: number | undefined; + + /** + * + *

The RuleId of the RateBasedRule that you want to update. + * RuleId is returned by CreateRateBasedRule and by ListRateBasedRules.

+ * + */ + RuleId: string | undefined; + + /** + * + *

An array of RuleUpdate objects that you want to insert into or delete + * from a RateBasedRule.

+ * + */ + Updates: Array | undefined; +} + +export namespace UpdateRateBasedRuleRequest { + export function isa(o: any): o is UpdateRateBasedRuleRequest { + return _smithy.isa(o, "UpdateRateBasedRuleRequest"); + } +} + +export interface UpdateRateBasedRuleResponse extends $MetadataBearer { + __type?: "UpdateRateBasedRuleResponse"; + /** + * + *

The ChangeToken that you used to submit the + * UpdateRateBasedRule request. You can also use this value to query the + * status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateRateBasedRuleResponse { + export function isa(o: any): o is UpdateRateBasedRuleResponse { + return _smithy.isa(o, "UpdateRateBasedRuleResponse"); + } +} + +export interface UpdateRegexMatchSetRequest { + __type?: "UpdateRegexMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The RegexMatchSetId of the RegexMatchSet that you want to update. RegexMatchSetId is returned by CreateRegexMatchSet and by + * ListRegexMatchSets.

+ * + */ + RegexMatchSetId: string | undefined; + + /** + * + *

An array of RegexMatchSetUpdate objects that you want to insert into or delete from a RegexMatchSet. + * For more information, see RegexMatchTuple.

+ * + * + */ + Updates: Array | undefined; +} + +export namespace UpdateRegexMatchSetRequest { + export function isa(o: any): o is UpdateRegexMatchSetRequest { + return _smithy.isa(o, "UpdateRegexMatchSetRequest"); + } +} + +export interface UpdateRegexMatchSetResponse extends $MetadataBearer { + __type?: "UpdateRegexMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateRegexMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateRegexMatchSetResponse { + export function isa(o: any): o is UpdateRegexMatchSetResponse { + return _smithy.isa(o, "UpdateRegexMatchSetResponse"); + } +} + +export interface UpdateRegexPatternSetRequest { + __type?: "UpdateRegexPatternSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The RegexPatternSetId of the RegexPatternSet that you want to update. RegexPatternSetId is returned by CreateRegexPatternSet and by + * ListRegexPatternSets.

+ * + */ + RegexPatternSetId: string | undefined; + + /** + * + *

An array of RegexPatternSetUpdate objects that you want to insert into or delete from a RegexPatternSet.

+ * + * + */ + Updates: Array | undefined; +} + +export namespace UpdateRegexPatternSetRequest { + export function isa(o: any): o is UpdateRegexPatternSetRequest { + return _smithy.isa(o, "UpdateRegexPatternSetRequest"); + } +} + +export interface UpdateRegexPatternSetResponse extends $MetadataBearer { + __type?: "UpdateRegexPatternSetResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateRegexPatternSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateRegexPatternSetResponse { + export function isa(o: any): o is UpdateRegexPatternSetResponse { + return _smithy.isa(o, "UpdateRegexPatternSetResponse"); + } +} + +export interface UpdateRuleGroupRequest { + __type?: "UpdateRuleGroupRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The RuleGroupId of the RuleGroup that you want to update. RuleGroupId is returned by CreateRuleGroup and by + * ListRuleGroups.

+ * + */ + RuleGroupId: string | undefined; + + /** + * + *

An array of RuleGroupUpdate objects that you want to insert into or delete from a + * RuleGroup.

+ *

You can only insert REGULAR rules into a rule group.

+ *

+ * ActivatedRule|OverrideAction applies only when updating or adding a RuleGroup to a WebACL. In this case you do not use ActivatedRule|Action. For all other update requests, ActivatedRule|Action is used instead of ActivatedRule|OverrideAction.

+ * + * + * + */ + Updates: Array | undefined; +} + +export namespace UpdateRuleGroupRequest { + export function isa(o: any): o is UpdateRuleGroupRequest { + return _smithy.isa(o, "UpdateRuleGroupRequest"); + } +} + +export interface UpdateRuleGroupResponse extends $MetadataBearer { + __type?: "UpdateRuleGroupResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateRuleGroup request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateRuleGroupResponse { + export function isa(o: any): o is UpdateRuleGroupResponse { + return _smithy.isa(o, "UpdateRuleGroupResponse"); + } +} + +export interface UpdateRuleRequest { + __type?: "UpdateRuleRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The RuleId of the Rule that you want to update. RuleId is returned by + * CreateRule and by ListRules.

+ * + */ + RuleId: string | undefined; + + /** + * + *

An array of RuleUpdate objects that you want to insert into or delete from a + * Rule. For more information, see the applicable data types:

+ *
    + *
  • + *

    + * RuleUpdate: Contains Action and Predicate + *

    + *
  • + *
  • + *

    + * Predicate: Contains DataId, Negated, and Type + *

    + *
  • + *
  • + *

    + * FieldToMatch: Contains Data and Type + *

    + *
  • + *
+ * + */ + Updates: Array | undefined; +} + +export namespace UpdateRuleRequest { + export function isa(o: any): o is UpdateRuleRequest { + return _smithy.isa(o, "UpdateRuleRequest"); + } +} + +export interface UpdateRuleResponse extends $MetadataBearer { + __type?: "UpdateRuleResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateRule request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateRuleResponse { + export function isa(o: any): o is UpdateRuleResponse { + return _smithy.isa(o, "UpdateRuleResponse"); + } +} + +export interface UpdateSizeConstraintSetRequest { + __type?: "UpdateSizeConstraintSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The SizeConstraintSetId of the SizeConstraintSet that you want to update. SizeConstraintSetId + * is returned by CreateSizeConstraintSet and by ListSizeConstraintSets.

+ * + */ + SizeConstraintSetId: string | undefined; + + /** + * + *

An array of SizeConstraintSetUpdate objects that you want to insert into or delete from a SizeConstraintSet. + * For more information, see the applicable data types:

+ *
    + *
  • + *

    + * SizeConstraintSetUpdate: Contains Action and SizeConstraint + *

    + *
  • + *
  • + *

    + * SizeConstraint: Contains FieldToMatch, TextTransformation, ComparisonOperator, + * and Size + *

    + *
  • + *
  • + *

    + * FieldToMatch: Contains Data and Type + *

    + *
  • + *
+ * + */ + Updates: Array | undefined; +} + +export namespace UpdateSizeConstraintSetRequest { + export function isa(o: any): o is UpdateSizeConstraintSetRequest { + return _smithy.isa(o, "UpdateSizeConstraintSetRequest"); + } +} + +export interface UpdateSizeConstraintSetResponse extends $MetadataBearer { + __type?: "UpdateSizeConstraintSetResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateSizeConstraintSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateSizeConstraintSetResponse { + export function isa(o: any): o is UpdateSizeConstraintSetResponse { + return _smithy.isa(o, "UpdateSizeConstraintSetResponse"); + } +} + +/** + * + *

A request to update a SqlInjectionMatchSet.

+ * + */ +export interface UpdateSqlInjectionMatchSetRequest { + __type?: "UpdateSqlInjectionMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

The SqlInjectionMatchSetId of the SqlInjectionMatchSet that you want to update. + * SqlInjectionMatchSetId is returned by CreateSqlInjectionMatchSet and by ListSqlInjectionMatchSets.

+ * + */ + SqlInjectionMatchSetId: string | undefined; + + /** + * + *

An array of SqlInjectionMatchSetUpdate objects that you want to insert into or delete from a + * SqlInjectionMatchSet. For more information, see the applicable data types:

+ * + * + */ + Updates: Array | undefined; +} + +export namespace UpdateSqlInjectionMatchSetRequest { + export function isa(o: any): o is UpdateSqlInjectionMatchSetRequest { + return _smithy.isa(o, "UpdateSqlInjectionMatchSetRequest"); + } +} + +/** + * + *

The response to an UpdateSqlInjectionMatchSets request.

+ * + */ +export interface UpdateSqlInjectionMatchSetResponse extends $MetadataBearer { + __type?: "UpdateSqlInjectionMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateSqlInjectionMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateSqlInjectionMatchSetResponse { + export function isa(o: any): o is UpdateSqlInjectionMatchSetResponse { + return _smithy.isa(o, "UpdateSqlInjectionMatchSetResponse"); + } +} + +export interface UpdateWebACLRequest { + __type?: "UpdateWebACLRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

A default action for the web ACL, either ALLOW or BLOCK. AWS WAF performs the default + * action if a request doesn't match the criteria in any of the rules in a web ACL.

+ * + */ + DefaultAction?: WafAction; + + /** + * + *

An array of updates to make to the WebACL.

+ *

An array of WebACLUpdate objects that you want to insert into or delete from a + * WebACL. For more information, see the applicable data types:

+ *
    + *
  • + *

    + * WebACLUpdate: Contains Action and ActivatedRule + *

    + *
  • + *
  • + *

    + * ActivatedRule: Contains Action, + * OverrideAction, Priority, RuleId, and + * Type. ActivatedRule|OverrideAction applies only when + * updating or adding a RuleGroup to a WebACL. In this + * case, + * you do not use ActivatedRule|Action. For all other update requests, + * ActivatedRule|Action is used instead of + * ActivatedRule|OverrideAction.

    + *
  • + *
  • + *

    + * WafAction: Contains Type + *

    + *
  • + *
+ * + */ + Updates?: Array; + + /** + * + *

The WebACLId of the WebACL that you want to update. WebACLId is returned by CreateWebACL and by + * ListWebACLs.

+ * + */ + WebACLId: string | undefined; +} + +export namespace UpdateWebACLRequest { + export function isa(o: any): o is UpdateWebACLRequest { + return _smithy.isa(o, "UpdateWebACLRequest"); + } +} + +export interface UpdateWebACLResponse extends $MetadataBearer { + __type?: "UpdateWebACLResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateWebACL request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateWebACLResponse { + export function isa(o: any): o is UpdateWebACLResponse { + return _smithy.isa(o, "UpdateWebACLResponse"); + } +} + +/** + * + *

A request to update an XssMatchSet.

+ * + */ +export interface UpdateXssMatchSetRequest { + __type?: "UpdateXssMatchSetRequest"; + /** + * + *

The value returned by the most recent call to GetChangeToken.

+ * + */ + ChangeToken: string | undefined; + + /** + * + *

An array of XssMatchSetUpdate objects that you want to insert into or + * delete from an + * XssMatchSet. For more information, see the applicable data + * types:

+ *
    + *
  • + *

    + * XssMatchSetUpdate: Contains Action and XssMatchTuple + *

    + *
  • + *
  • + *

    + * XssMatchTuple: Contains FieldToMatch and TextTransformation + *

    + *
  • + *
  • + *

    + * FieldToMatch: Contains Data and Type + *

    + *
  • + *
+ * + */ + Updates: Array | undefined; + + /** + * + *

The XssMatchSetId of the XssMatchSet that you want to update. + * XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.

+ * + */ + XssMatchSetId: string | undefined; +} + +export namespace UpdateXssMatchSetRequest { + export function isa(o: any): o is UpdateXssMatchSetRequest { + return _smithy.isa(o, "UpdateXssMatchSetRequest"); + } +} + +/** + * + *

The response to an UpdateXssMatchSets request.

+ * + */ +export interface UpdateXssMatchSetResponse extends $MetadataBearer { + __type?: "UpdateXssMatchSetResponse"; + /** + * + *

The ChangeToken that you used to submit the UpdateXssMatchSet request. You can also use this value + * to query the status of the request. For more information, see GetChangeTokenStatus.

+ * + */ + ChangeToken?: string; +} + +export namespace UpdateXssMatchSetResponse { + export function isa(o: any): o is UpdateXssMatchSetResponse { + return _smithy.isa(o, "UpdateXssMatchSetResponse"); + } +} + +export interface WAFBadRequestException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFBadRequestException"; + $fault: "client"; + message?: string; +} + +export namespace WAFBadRequestException { + export function isa(o: any): o is WAFBadRequestException { + return _smithy.isa(o, "WAFBadRequestException"); + } +} + +/** + * + *

The name specified is invalid.

+ * + */ +export interface WAFDisallowedNameException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFDisallowedNameException"; + $fault: "client"; + message?: string; +} + +export namespace WAFDisallowedNameException { + export function isa(o: any): o is WAFDisallowedNameException { + return _smithy.isa(o, "WAFDisallowedNameException"); + } +} + +/** + * + *

The operation failed because of a system problem, even though the request was valid. Retry your request.

+ * + */ +export interface WAFInternalErrorException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFInternalErrorException"; + $fault: "server"; + message?: string; +} + +export namespace WAFInternalErrorException { + export function isa(o: any): o is WAFInternalErrorException { + return _smithy.isa(o, "WAFInternalErrorException"); + } +} + +/** + * + *

The operation failed because you tried to create, update, or delete an object by using an invalid account identifier.

+ * + */ +export interface WAFInvalidAccountException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFInvalidAccountException"; + $fault: "client"; +} + +export namespace WAFInvalidAccountException { + export function isa(o: any): o is WAFInvalidAccountException { + return _smithy.isa(o, "WAFInvalidAccountException"); + } +} + +/** + * + *

The operation failed because there was nothing to do. For example:

+ *
    + *
  • + *

    You tried to remove a Rule from a WebACL, but the Rule isn't in the specified WebACL.

    + *
  • + *
  • + *

    You tried to remove an IP address from an IPSet, but the IP address isn't in the specified IPSet.

    + *
  • + *
  • + *

    You tried to remove a ByteMatchTuple from a ByteMatchSet, but the ByteMatchTuple + * isn't in the specified WebACL.

    + *
  • + *
  • + *

    You tried to add a Rule to a WebACL, but the Rule already exists in the + * specified WebACL.

    + *
  • + *
  • + *

    You tried to add a ByteMatchTuple to a ByteMatchSet, but the ByteMatchTuple + * already exists in the specified WebACL.

    + *
  • + *
+ * + */ +export interface WAFInvalidOperationException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFInvalidOperationException"; + $fault: "client"; + message?: string; +} + +export namespace WAFInvalidOperationException { + export function isa(o: any): o is WAFInvalidOperationException { + return _smithy.isa(o, "WAFInvalidOperationException"); + } +} + +/** + * + *

The operation failed because AWS WAF didn't recognize a parameter in the request. For example:

+ *
    + *
  • + *

    You specified an invalid parameter name.

    + *
  • + *
  • + *

    You specified an invalid value.

    + *
  • + *
  • + *

    You tried to update an object (ByteMatchSet, IPSet, Rule, or WebACL) + * using an action other than INSERT or DELETE.

    + *
  • + *
  • + *

    You tried to create a WebACL with a DefaultAction + * Type other than + * ALLOW, BLOCK, or COUNT.

    + *
  • + *
  • + *

    You tried to create a RateBasedRule with a RateKey value other than IP.

    + *
  • + *
  • + *

    You tried to update a WebACL with a WafAction + * Type other than + * ALLOW, BLOCK, or COUNT.

    + *
  • + *
  • + *

    You tried to update a ByteMatchSet with a FieldToMatch + * Type other than + * HEADER, METHOD, QUERY_STRING, URI, or BODY.

    + *
  • + *
  • + *

    You tried to update a ByteMatchSet with a Field of HEADER + * but no value for Data.

    + *
  • + *
  • + *

    Your request references an ARN that is malformed, or corresponds to a resource with which a web ACL cannot be associated.

    + *
  • + *
+ * + */ +export interface WAFInvalidParameterException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFInvalidParameterException"; + $fault: "client"; + field?: ParameterExceptionField | string; + parameter?: string; + reason?: ParameterExceptionReason | string; +} + +export namespace WAFInvalidParameterException { + export function isa(o: any): o is WAFInvalidParameterException { + return _smithy.isa(o, "WAFInvalidParameterException"); + } +} + +/** + * + *

The operation failed because the specified policy is not in the proper format.

+ *

The policy is subject to the following restrictions:

+ *
    + *
  • + *

    You can attach only one policy with each PutPermissionPolicy request.

    + *
  • + *
  • + *

    The policy must include an Effect, Action and Principal.

    + *
  • + *
  • + * + *

    + * Effect must specify Allow.

    + *
  • + *
  • + *

    The Action in the policy must be waf:UpdateWebACL, waf-regional:UpdateWebACL, waf:GetRuleGroup and waf-regional:GetRuleGroup . Any extra or wildcard actions in the policy will be rejected.

    + *
  • + *
  • + *

    The policy cannot include a Resource parameter.

    + *
  • + *
  • + *

    The ARN in the request must be a valid WAF RuleGroup ARN and the RuleGroup must exist in the same region.

    + *
  • + *
  • + *

    The user making the request must be the owner of the RuleGroup.

    + *
  • + *
  • + *

    Your policy must be composed using IAM Policy version 2012-10-17.

    + *
  • + *
+ * + * + */ +export interface WAFInvalidPermissionPolicyException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFInvalidPermissionPolicyException"; + $fault: "client"; + message?: string; +} + +export namespace WAFInvalidPermissionPolicyException { + export function isa(o: any): o is WAFInvalidPermissionPolicyException { + return _smithy.isa(o, "WAFInvalidPermissionPolicyException"); + } +} + +/** + * + *

The regular expression (regex) you specified in RegexPatternString is invalid.

+ * + */ +export interface WAFInvalidRegexPatternException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFInvalidRegexPatternException"; + $fault: "client"; + message?: string; +} + +export namespace WAFInvalidRegexPatternException { + export function isa(o: any): o is WAFInvalidRegexPatternException { + return _smithy.isa(o, "WAFInvalidRegexPatternException"); + } +} + +/** + * + *

The operation exceeds a resource limit, for example, the maximum number of WebACL objects that you can create + * for an AWS account. For more information, see + * Limits in the AWS WAF Developer Guide.

+ * + */ +export interface WAFLimitsExceededException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFLimitsExceededException"; + $fault: "client"; + message?: string; +} + +export namespace WAFLimitsExceededException { + export function isa(o: any): o is WAFLimitsExceededException { + return _smithy.isa(o, "WAFLimitsExceededException"); + } +} + +/** + * + *

The operation failed because you tried to delete an object that isn't empty. For example:

+ *
    + *
  • + *

    You tried to delete a WebACL that still contains one or more Rule objects.

    + *
  • + *
  • + *

    You tried to delete a Rule that still contains one or more ByteMatchSet objects + * or other predicates.

    + *
  • + *
  • + *

    You tried to delete a ByteMatchSet that contains one or more ByteMatchTuple objects.

    + *
  • + *
  • + *

    You tried to delete an IPSet that references one or more IP addresses.

    + *
  • + *
+ * + */ +export interface WAFNonEmptyEntityException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFNonEmptyEntityException"; + $fault: "client"; + message?: string; +} + +export namespace WAFNonEmptyEntityException { + export function isa(o: any): o is WAFNonEmptyEntityException { + return _smithy.isa(o, "WAFNonEmptyEntityException"); + } +} + +/** + * + *

The operation failed because you tried to add an object to or delete an object from another object that doesn't exist. For example:

+ *
    + *
  • + *

    You tried to add a Rule to or delete a Rule from a WebACL that doesn't exist.

    + *
  • + *
  • + *

    You tried to add a ByteMatchSet to or delete a ByteMatchSet from a Rule that doesn't exist.

    + *
  • + *
  • + *

    You tried to add an IP address to or delete an IP address from an IPSet that doesn't exist.

    + *
  • + *
  • + *

    You tried to add a ByteMatchTuple to or delete a ByteMatchTuple from a ByteMatchSet + * that doesn't exist.

    + *
  • + *
+ * + */ +export interface WAFNonexistentContainerException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFNonexistentContainerException"; + $fault: "client"; + message?: string; +} + +export namespace WAFNonexistentContainerException { + export function isa(o: any): o is WAFNonexistentContainerException { + return _smithy.isa(o, "WAFNonexistentContainerException"); + } +} + +/** + * + *

The operation failed because the referenced object doesn't exist.

+ * + */ +export interface WAFNonexistentItemException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFNonexistentItemException"; + $fault: "client"; + message?: string; +} + +export namespace WAFNonexistentItemException { + export function isa(o: any): o is WAFNonexistentItemException { + return _smithy.isa(o, "WAFNonexistentItemException"); + } +} + +/** + * + *

The operation failed because you tried to delete an object that is still in use. For example:

+ *
    + *
  • + *

    You tried to delete a ByteMatchSet that is still referenced by a Rule.

    + *
  • + *
  • + *

    You tried to delete a Rule that is still referenced by a WebACL.

    + *
  • + *
+ * + */ +export interface WAFReferencedItemException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFReferencedItemException"; + $fault: "client"; + message?: string; +} + +export namespace WAFReferencedItemException { + export function isa(o: any): o is WAFReferencedItemException { + return _smithy.isa(o, "WAFReferencedItemException"); + } +} + +/** + * + *

AWS WAF is not able to access the service linked role. This can be caused by a previous PutLoggingConfiguration request, which can lock the service linked role for about 20 seconds. Please try your request again. The service linked role can also be locked by a previous DeleteServiceLinkedRole request, which can lock the role for 15 minutes or more. If you recently made a DeleteServiceLinkedRole, wait at least 15 minutes and try the request again. If you receive this same exception again, you will have to wait additional time until the role is unlocked.

+ * + */ +export interface WAFServiceLinkedRoleErrorException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFServiceLinkedRoleErrorException"; + $fault: "client"; + message?: string; +} + +export namespace WAFServiceLinkedRoleErrorException { + export function isa(o: any): o is WAFServiceLinkedRoleErrorException { + return _smithy.isa(o, "WAFServiceLinkedRoleErrorException"); + } +} + +/** + * + *

The operation failed because you tried to create, update, or delete an object by using a change token that has already been used.

+ * + */ +export interface WAFStaleDataException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFStaleDataException"; + $fault: "client"; + message?: string; +} + +export namespace WAFStaleDataException { + export function isa(o: any): o is WAFStaleDataException { + return _smithy.isa(o, "WAFStaleDataException"); + } +} + +/** + * + *

The specified subscription does not exist.

+ * + */ +export interface WAFSubscriptionNotFoundException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFSubscriptionNotFoundException"; + $fault: "client"; + message?: string; +} + +export namespace WAFSubscriptionNotFoundException { + export function isa(o: any): o is WAFSubscriptionNotFoundException { + return _smithy.isa(o, "WAFSubscriptionNotFoundException"); + } +} + +export interface WAFTagOperationException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFTagOperationException"; + $fault: "client"; + message?: string; +} + +export namespace WAFTagOperationException { + export function isa(o: any): o is WAFTagOperationException { + return _smithy.isa(o, "WAFTagOperationException"); + } +} + +export interface WAFTagOperationInternalErrorException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFTagOperationInternalErrorException"; + $fault: "server"; + message?: string; +} + +export namespace WAFTagOperationInternalErrorException { + export function isa(o: any): o is WAFTagOperationInternalErrorException { + return _smithy.isa(o, "WAFTagOperationInternalErrorException"); + } +} + +/** + * + *

The operation failed because the entity + * referenced is temporarily unavailable. Retry your request.

+ * + */ +export interface WAFUnavailableEntityException + extends _smithy.SmithyException, + $MetadataBearer { + __type: "WAFUnavailableEntityException"; + $fault: "client"; + message?: string; +} + +export namespace WAFUnavailableEntityException { + export function isa(o: any): o is WAFUnavailableEntityException { + return _smithy.isa(o, "WAFUnavailableEntityException"); + } +} + +/** + * + *

For the action that is associated with a rule in a WebACL, specifies the action that you want AWS WAF to perform when a + * web request matches all of the conditions in a rule. For the default action in a WebACL, specifies the action that you want + * AWS WAF to take when a web request doesn't match all of the conditions in any of the rules in a WebACL.

+ * + */ +export interface WafAction { + __type?: "WafAction"; + /** + * + *

Specifies how you want AWS WAF to respond to requests that match the settings in a Rule. Valid settings include the following:

+ *
    + *
  • + *

    + * ALLOW: AWS WAF allows requests

    + *
  • + *
  • + *

    + * BLOCK: AWS WAF blocks requests

    + *
  • + *
  • + *

    + * COUNT: AWS WAF increments a counter of the requests that match all of the conditions in the rule. + * AWS WAF then continues to inspect the web request based on the remaining rules in the web ACL. You can't specify COUNT + * for the default action for a WebACL.

    + *
  • + *
+ * + */ + Type: WafActionType | string | undefined; +} + +export namespace WafAction { + export function isa(o: any): o is WafAction { + return _smithy.isa(o, "WafAction"); + } +} + +export enum WafActionType { + ALLOW = "ALLOW", + BLOCK = "BLOCK", + COUNT = "COUNT" +} + +/** + * + *

The action to take if any rule within the RuleGroup matches a request.

+ * + */ +export interface WafOverrideAction { + __type?: "WafOverrideAction"; + /** + * + *

+ * COUNT overrides the action specified by the individual rule within a RuleGroup . If set to NONE, the rule's action will take place.

+ * + */ + Type: WafOverrideActionType | string | undefined; +} + +export namespace WafOverrideAction { + export function isa(o: any): o is WafOverrideAction { + return _smithy.isa(o, "WafOverrideAction"); + } +} + +export enum WafOverrideActionType { + COUNT = "COUNT", + NONE = "NONE" +} + +export enum WafRuleType { + GROUP = "GROUP", + RATE_BASED = "RATE_BASED", + REGULAR = "REGULAR" +} + +/** + * + *

Contains the Rules that identify the requests that you want to allow, block, or count. In a WebACL, you also specify a + * default action (ALLOW or BLOCK), and the action for each Rule that you add to a + * WebACL, for example, block requests from specified IP addresses or block requests from specified referrers. + * You also associate the WebACL with a CloudFront distribution to identify the requests that you want AWS WAF to filter. + * If you add more than one Rule to a WebACL, a request needs to match only one of the specifications + * to be allowed, blocked, or counted. For more information, see UpdateWebACL.

+ * + */ +export interface WebACL { + __type?: "WebACL"; + /** + * + *

The action to perform if none of the Rules contained in the WebACL match. The action is specified by the + * WafAction object.

+ * + */ + DefaultAction: WafAction | undefined; + + /** + * + *

A friendly name or description for the metrics for this WebACL. The name can contain only alphanumeric characters (A-Z, a-z, 0-9), with maximum length 128 and minimum length one. It can't contain + * whitespace or metric names reserved for AWS WAF, including "All" and "Default_Action." You can't change MetricName after you create the WebACL.

+ * + */ + MetricName?: string; + + /** + * + *

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

+ * + */ + Name?: string; + + /** + * + *

An array that contains the action for each Rule in a WebACL, the priority of the Rule, + * and the ID of the Rule.

+ * + */ + Rules: Array | undefined; + + /** + * + *

Tha Amazon Resource Name (ARN) of the web ACL.

+ * + */ + WebACLArn?: string; + + /** + * + *

A unique identifier for a WebACL. You use WebACLId to get information about a WebACL + * (see GetWebACL), update a WebACL (see UpdateWebACL), and delete a WebACL from AWS WAF + * (see DeleteWebACL).

+ *

+ * WebACLId is returned by CreateWebACL and by ListWebACLs.

+ * + */ + WebACLId: string | undefined; +} + +export namespace WebACL { + export function isa(o: any): o is WebACL { + return _smithy.isa(o, "WebACL"); + } +} + +/** + * + *

Contains the identifier and the name or description of the WebACL.

+ * + */ +export interface WebACLSummary { + __type?: "WebACLSummary"; + /** + * + *

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

+ * + */ + Name: string | undefined; + + /** + * + *

A unique identifier for a WebACL. You use WebACLId to get information about a WebACL + * (see GetWebACL), update a WebACL (see UpdateWebACL), and delete a WebACL from AWS WAF + * (see DeleteWebACL).

+ *

+ * WebACLId is returned by CreateWebACL and by ListWebACLs.

+ * + */ + WebACLId: string | undefined; +} + +export namespace WebACLSummary { + export function isa(o: any): o is WebACLSummary { + return _smithy.isa(o, "WebACLSummary"); + } +} + +/** + * + *

Specifies whether to insert a Rule into or delete a Rule from a WebACL.

+ * + */ +export interface WebACLUpdate { + __type?: "WebACLUpdate"; + /** + * + *

Specifies whether to insert a Rule into or delete a Rule from a WebACL.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

The ActivatedRule object in an UpdateWebACL request specifies a Rule that you want to insert or delete, + * the priority of the Rule in the WebACL, and the action that you want AWS WAF to take when a web request matches the Rule + * (ALLOW, BLOCK, or COUNT).

+ * + */ + ActivatedRule: ActivatedRule | undefined; +} + +export namespace WebACLUpdate { + export function isa(o: any): o is WebACLUpdate { + return _smithy.isa(o, "WebACLUpdate"); + } +} + +/** + * + *

A complex type that contains XssMatchTuple objects, which specify the parts of web requests that you + * want AWS WAF to inspect for cross-site scripting attacks and, if you want AWS WAF to inspect a header, the name of the header. If a + * XssMatchSet contains more than one XssMatchTuple object, a request needs to + * include cross-site scripting attacks in only one of the specified parts of the request to be considered a match.

+ * + */ +export interface XssMatchSet { + __type?: "XssMatchSet"; + /** + * + *

The name, if any, of the XssMatchSet.

+ * + */ + Name?: string; + + /** + * + *

A unique identifier for an XssMatchSet. You use XssMatchSetId to get information about an + * XssMatchSet (see GetXssMatchSet), update an XssMatchSet + * (see UpdateXssMatchSet), insert an XssMatchSet into a Rule or + * delete one from a Rule (see UpdateRule), and delete an XssMatchSet from AWS WAF + * (see DeleteXssMatchSet).

+ *

+ * XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.

+ * + */ + XssMatchSetId: string | undefined; + + /** + * + *

Specifies the parts of web requests that you want to inspect for cross-site scripting attacks.

+ * + */ + XssMatchTuples: Array | undefined; +} + +export namespace XssMatchSet { + export function isa(o: any): o is XssMatchSet { + return _smithy.isa(o, "XssMatchSet"); + } +} + +/** + * + *

The Id and Name of an XssMatchSet.

+ * + */ +export interface XssMatchSetSummary { + __type?: "XssMatchSetSummary"; + /** + * + *

The name of the XssMatchSet, if any, specified by Id.

+ * + */ + Name: string | undefined; + + /** + * + *

A unique identifier for an XssMatchSet. You use XssMatchSetId to get information about a + * XssMatchSet (see GetXssMatchSet), update an XssMatchSet + * (see UpdateXssMatchSet), insert an XssMatchSet into a Rule or + * delete one from a Rule (see UpdateRule), and delete an XssMatchSet from AWS WAF + * (see DeleteXssMatchSet).

+ *

+ * XssMatchSetId is returned by CreateXssMatchSet and by ListXssMatchSets.

+ * + */ + XssMatchSetId: string | undefined; +} + +export namespace XssMatchSetSummary { + export function isa(o: any): o is XssMatchSetSummary { + return _smithy.isa(o, "XssMatchSetSummary"); + } +} + +/** + * + *

Specifies the part of a web request that you want to inspect for cross-site scripting attacks and indicates whether you want to + * add the specification to an XssMatchSet or delete it from an XssMatchSet.

+ * + */ +export interface XssMatchSetUpdate { + __type?: "XssMatchSetUpdate"; + /** + * + *

Specify INSERT to add an + * XssMatchSetUpdate to an XssMatchSet. Use + * DELETE to remove an + * XssMatchSetUpdate from an XssMatchSet.

+ * + */ + Action: ChangeAction | string | undefined; + + /** + * + *

Specifies the part of a web request that you want AWS WAF to inspect for cross-site scripting attacks and, if you want AWS WAF to inspect a header, the name of the header.

+ * + */ + XssMatchTuple: XssMatchTuple | undefined; +} + +export namespace XssMatchSetUpdate { + export function isa(o: any): o is XssMatchSetUpdate { + return _smithy.isa(o, "XssMatchSetUpdate"); + } +} + +/** + * + *

Specifies the part of a web request that you want AWS WAF to inspect for cross-site scripting attacks and, if you want AWS WAF to inspect a header, the name of the header.

+ * + */ +export interface XssMatchTuple { + __type?: "XssMatchTuple"; + /** + * + *

Specifies where in a web request to look for cross-site scripting attacks.

+ * + */ + FieldToMatch: FieldToMatch | undefined; + + /** + * + *

Text transformations eliminate some of the unusual formatting that attackers use in web requests in an effort to bypass AWS WAF. + * If you specify a transformation, AWS WAF performs the transformation on FieldToMatch before inspecting a request for a match.

+ *

You can only specify a single type of TextTransformation.

+ *

+ * CMD_LINE + *

+ *

When you're concerned that attackers are injecting an operating system command line + * command and using unusual formatting to disguise some or all of the command, use this + * option to perform the following transformations:

+ *
    + *
  • + *

    Delete the following characters: \ " ' ^

    + *
  • + *
  • + *

    Delete spaces before the following characters: / (

    + *
  • + *
  • + *

    Replace the following characters with a space: , ;

    + *
  • + *
  • + *

    Replace multiple spaces with one space

    + *
  • + *
  • + *

    Convert uppercase letters (A-Z) to lowercase (a-z)

    + *
  • + *
+ *

+ * COMPRESS_WHITE_SPACE + *

+ *

Use this option to replace the following characters with a space character (decimal 32):

+ *
    + *
  • + *

    \f, formfeed, decimal 12

    + *
  • + *
  • + *

    \t, tab, decimal 9

    + *
  • + *
  • + *

    \n, newline, decimal 10

    + *
  • + *
  • + *

    \r, carriage return, decimal 13

    + *
  • + *
  • + *

    \v, vertical tab, decimal 11

    + *
  • + *
  • + *

    non-breaking space, decimal 160

    + *
  • + *
+ *

+ * COMPRESS_WHITE_SPACE also replaces multiple spaces with one space.

+ *

+ * HTML_ENTITY_DECODE + *

+ *

Use this option to replace HTML-encoded characters with unencoded characters. HTML_ENTITY_DECODE performs + * the following operations:

+ *
    + *
  • + *

    Replaces (ampersand)quot; with " + *

    + *
  • + *
  • + *

    Replaces (ampersand)nbsp; with a non-breaking space, decimal 160

    + *
  • + *
  • + *

    Replaces (ampersand)lt; with a "less than" symbol

    + *
  • + *
  • + *

    Replaces (ampersand)gt; with > + *

    + *
  • + *
  • + *

    Replaces characters that are represented in hexadecimal format, (ampersand)#xhhhh;, with the corresponding + * characters

    + *
  • + *
  • + *

    Replaces characters that are represented in decimal format, (ampersand)#nnnn;, with the corresponding + * characters

    + *
  • + *
+ *

+ * LOWERCASE + *

+ *

Use this option to convert uppercase letters (A-Z) to lowercase (a-z).

+ *

+ * URL_DECODE + *

+ *

Use this option to decode a URL-encoded value.

+ *

+ * NONE + *

+ *

Specify NONE if you don't want to perform any text transformations.

+ * + */ + TextTransformation: TextTransformation | string | undefined; +} + +export namespace XssMatchTuple { + export function isa(o: any): o is XssMatchTuple { + return _smithy.isa(o, "XssMatchTuple"); + } +} diff --git a/clients/client-waf-regional/package.json b/clients/client-waf-regional/package.json new file mode 100644 index 000000000000..4a91edd8e065 --- /dev/null +++ b/clients/client-waf-regional/package.json @@ -0,0 +1,75 @@ +{ + "name": "@aws-sdk/client-waf-regional", + "description": "@aws-sdk/client-waf-regional client", + "version": "1.0.0", + "scripts": { + "clean": "npm run remove-definitions && npm run remove-dist && npm run remove-js && npm run remove-maps", + "build-documentation": "npm run clean && typedoc ./", + "prepublishOnly": "yarn build", + "pretest": "tsc", + "remove-definitions": "rimraf ./types", + "remove-dist": "rimraf ./dist", + "remove-documentation": "rimraf ./docs", + "remove-js": "rimraf *.js && rimraf ./commands/*.js && rimraf ./models/*.js && rimraf ./protocols/*.js", + "remove-maps": "rimraf *.js.map && rimraf ./commands/*.js.map && rimraf ./models/*.js.map && rimraf ./protocols/*.js.map", + "test": "exit 0", + "smoke-test": "npm run pretest && node ./test/smoke/index.spec.js", + "build:es": "tsc -p tsconfig.es.json", + "build": "yarn pretest && yarn build:es" + }, + "main": "./dist/cjs/index.js", + "types": "./types/index.d.ts", + "module": "./dist/es/index.js", + "browser": { + "./runtimeConfig": "./runtimeConfig.browser" + }, + "sideEffects": false, + "dependencies": { + "tslib": "^1.8.0", + "@aws-crypto/sha256-browser": "^0.1.0-preview.1", + "@aws-sdk/config-resolver": "^0.1.0-preview.5", + "@aws-sdk/credential-provider-node": "^0.1.0-preview.7", + "@aws-sdk/fetch-http-handler": "^0.1.0-preview.5", + "@aws-sdk/hash-node": "^0.1.0-preview.5", + "@aws-sdk/invalid-dependency": "^0.1.0-preview.1", + "@aws-sdk/middleware-content-length": "^0.1.0-preview.5", + "@aws-sdk/middleware-host-header": "^0.1.0-preview.1", + "@aws-sdk/middleware-retry": "^0.1.0-preview.5", + "@aws-sdk/middleware-serde": "^0.1.0-preview.1", + "@aws-sdk/middleware-signing": "^0.1.0-preview.7", + "@aws-sdk/middleware-stack": "^0.1.0-preview.6", + "@aws-sdk/middleware-user-agent": "^0.1.0-preview.1", + "@aws-sdk/node-http-handler": "^0.1.0-preview.6", + "@aws-sdk/protocol-http": "^0.1.0-preview.1", + "@aws-sdk/region-provider": "^0.1.0-preview.5", + "@aws-sdk/smithy-client": "^0.1.0-preview.1", + "@aws-sdk/stream-collector-browser": "^0.1.0-preview.5", + "@aws-sdk/stream-collector-node": "^0.1.0-preview.6", + "@aws-sdk/types": "^0.1.0-preview.5", + "@aws-sdk/url-parser-browser": "^0.1.0-preview.5", + "@aws-sdk/url-parser-node": "^0.1.0-preview.5", + "@aws-sdk/util-base64-browser": "^0.1.0-preview.3", + "@aws-sdk/util-base64-node": "^0.1.0-preview.3", + "@aws-sdk/util-body-length-browser": "^0.1.0-preview.3", + "@aws-sdk/util-body-length-node": "^0.1.0-preview.4", + "@aws-sdk/util-user-agent-browser": "^0.1.0-preview.6", + "@aws-sdk/util-user-agent-node": "^0.1.0-preview.6", + "@aws-sdk/util-utf8-browser": "^0.1.0-preview.3", + "@aws-sdk/util-utf8-node": "^0.1.0-preview.3" + }, + "devDependencies": { + "rimraf": "^3.0.0", + "typedoc": "^0.15.0", + "typescript": "^3.6.3", + "@types/node": "^12.7.5", + "tslib": "^1.8.0" + }, + "engines": { + "node": ">=8.0.0" + }, + "author": { + "name": "AWS SDK for JavaScript Team", + "url": "https://aws.amazon.com/javascript/" + }, + "license": "Apache-2.0" +} diff --git a/clients/client-waf-regional/protocols/Aws_json1_1.ts b/clients/client-waf-regional/protocols/Aws_json1_1.ts new file mode 100644 index 000000000000..ec3447ea2479 --- /dev/null +++ b/clients/client-waf-regional/protocols/Aws_json1_1.ts @@ -0,0 +1,14138 @@ +import { + AssociateWebACLCommandInput, + AssociateWebACLCommandOutput +} from "../commands/AssociateWebACLCommand"; +import { + CreateByteMatchSetCommandInput, + CreateByteMatchSetCommandOutput +} from "../commands/CreateByteMatchSetCommand"; +import { + CreateGeoMatchSetCommandInput, + CreateGeoMatchSetCommandOutput +} from "../commands/CreateGeoMatchSetCommand"; +import { + CreateIPSetCommandInput, + CreateIPSetCommandOutput +} from "../commands/CreateIPSetCommand"; +import { + CreateRateBasedRuleCommandInput, + CreateRateBasedRuleCommandOutput +} from "../commands/CreateRateBasedRuleCommand"; +import { + CreateRegexMatchSetCommandInput, + CreateRegexMatchSetCommandOutput +} from "../commands/CreateRegexMatchSetCommand"; +import { + CreateRegexPatternSetCommandInput, + CreateRegexPatternSetCommandOutput +} from "../commands/CreateRegexPatternSetCommand"; +import { + CreateRuleCommandInput, + CreateRuleCommandOutput +} from "../commands/CreateRuleCommand"; +import { + CreateRuleGroupCommandInput, + CreateRuleGroupCommandOutput +} from "../commands/CreateRuleGroupCommand"; +import { + CreateSizeConstraintSetCommandInput, + CreateSizeConstraintSetCommandOutput +} from "../commands/CreateSizeConstraintSetCommand"; +import { + CreateSqlInjectionMatchSetCommandInput, + CreateSqlInjectionMatchSetCommandOutput +} from "../commands/CreateSqlInjectionMatchSetCommand"; +import { + CreateWebACLCommandInput, + CreateWebACLCommandOutput +} from "../commands/CreateWebACLCommand"; +import { + CreateXssMatchSetCommandInput, + CreateXssMatchSetCommandOutput +} from "../commands/CreateXssMatchSetCommand"; +import { + DeleteByteMatchSetCommandInput, + DeleteByteMatchSetCommandOutput +} from "../commands/DeleteByteMatchSetCommand"; +import { + DeleteGeoMatchSetCommandInput, + DeleteGeoMatchSetCommandOutput +} from "../commands/DeleteGeoMatchSetCommand"; +import { + DeleteIPSetCommandInput, + DeleteIPSetCommandOutput +} from "../commands/DeleteIPSetCommand"; +import { + DeleteLoggingConfigurationCommandInput, + DeleteLoggingConfigurationCommandOutput +} from "../commands/DeleteLoggingConfigurationCommand"; +import { + DeletePermissionPolicyCommandInput, + DeletePermissionPolicyCommandOutput +} from "../commands/DeletePermissionPolicyCommand"; +import { + DeleteRateBasedRuleCommandInput, + DeleteRateBasedRuleCommandOutput +} from "../commands/DeleteRateBasedRuleCommand"; +import { + DeleteRegexMatchSetCommandInput, + DeleteRegexMatchSetCommandOutput +} from "../commands/DeleteRegexMatchSetCommand"; +import { + DeleteRegexPatternSetCommandInput, + DeleteRegexPatternSetCommandOutput +} from "../commands/DeleteRegexPatternSetCommand"; +import { + DeleteRuleCommandInput, + DeleteRuleCommandOutput +} from "../commands/DeleteRuleCommand"; +import { + DeleteRuleGroupCommandInput, + DeleteRuleGroupCommandOutput +} from "../commands/DeleteRuleGroupCommand"; +import { + DeleteSizeConstraintSetCommandInput, + DeleteSizeConstraintSetCommandOutput +} from "../commands/DeleteSizeConstraintSetCommand"; +import { + DeleteSqlInjectionMatchSetCommandInput, + DeleteSqlInjectionMatchSetCommandOutput +} from "../commands/DeleteSqlInjectionMatchSetCommand"; +import { + DeleteWebACLCommandInput, + DeleteWebACLCommandOutput +} from "../commands/DeleteWebACLCommand"; +import { + DeleteXssMatchSetCommandInput, + DeleteXssMatchSetCommandOutput +} from "../commands/DeleteXssMatchSetCommand"; +import { + DisassociateWebACLCommandInput, + DisassociateWebACLCommandOutput +} from "../commands/DisassociateWebACLCommand"; +import { + GetByteMatchSetCommandInput, + GetByteMatchSetCommandOutput +} from "../commands/GetByteMatchSetCommand"; +import { + GetChangeTokenCommandInput, + GetChangeTokenCommandOutput +} from "../commands/GetChangeTokenCommand"; +import { + GetChangeTokenStatusCommandInput, + GetChangeTokenStatusCommandOutput +} from "../commands/GetChangeTokenStatusCommand"; +import { + GetGeoMatchSetCommandInput, + GetGeoMatchSetCommandOutput +} from "../commands/GetGeoMatchSetCommand"; +import { + GetIPSetCommandInput, + GetIPSetCommandOutput +} from "../commands/GetIPSetCommand"; +import { + GetLoggingConfigurationCommandInput, + GetLoggingConfigurationCommandOutput +} from "../commands/GetLoggingConfigurationCommand"; +import { + GetPermissionPolicyCommandInput, + GetPermissionPolicyCommandOutput +} from "../commands/GetPermissionPolicyCommand"; +import { + GetRateBasedRuleCommandInput, + GetRateBasedRuleCommandOutput +} from "../commands/GetRateBasedRuleCommand"; +import { + GetRateBasedRuleManagedKeysCommandInput, + GetRateBasedRuleManagedKeysCommandOutput +} from "../commands/GetRateBasedRuleManagedKeysCommand"; +import { + GetRegexMatchSetCommandInput, + GetRegexMatchSetCommandOutput +} from "../commands/GetRegexMatchSetCommand"; +import { + GetRegexPatternSetCommandInput, + GetRegexPatternSetCommandOutput +} from "../commands/GetRegexPatternSetCommand"; +import { + GetRuleCommandInput, + GetRuleCommandOutput +} from "../commands/GetRuleCommand"; +import { + GetRuleGroupCommandInput, + GetRuleGroupCommandOutput +} from "../commands/GetRuleGroupCommand"; +import { + GetSampledRequestsCommandInput, + GetSampledRequestsCommandOutput +} from "../commands/GetSampledRequestsCommand"; +import { + GetSizeConstraintSetCommandInput, + GetSizeConstraintSetCommandOutput +} from "../commands/GetSizeConstraintSetCommand"; +import { + GetSqlInjectionMatchSetCommandInput, + GetSqlInjectionMatchSetCommandOutput +} from "../commands/GetSqlInjectionMatchSetCommand"; +import { + GetWebACLCommandInput, + GetWebACLCommandOutput +} from "../commands/GetWebACLCommand"; +import { + GetWebACLForResourceCommandInput, + GetWebACLForResourceCommandOutput +} from "../commands/GetWebACLForResourceCommand"; +import { + GetXssMatchSetCommandInput, + GetXssMatchSetCommandOutput +} from "../commands/GetXssMatchSetCommand"; +import { + ListActivatedRulesInRuleGroupCommandInput, + ListActivatedRulesInRuleGroupCommandOutput +} from "../commands/ListActivatedRulesInRuleGroupCommand"; +import { + ListByteMatchSetsCommandInput, + ListByteMatchSetsCommandOutput +} from "../commands/ListByteMatchSetsCommand"; +import { + ListGeoMatchSetsCommandInput, + ListGeoMatchSetsCommandOutput +} from "../commands/ListGeoMatchSetsCommand"; +import { + ListIPSetsCommandInput, + ListIPSetsCommandOutput +} from "../commands/ListIPSetsCommand"; +import { + ListLoggingConfigurationsCommandInput, + ListLoggingConfigurationsCommandOutput +} from "../commands/ListLoggingConfigurationsCommand"; +import { + ListRateBasedRulesCommandInput, + ListRateBasedRulesCommandOutput +} from "../commands/ListRateBasedRulesCommand"; +import { + ListRegexMatchSetsCommandInput, + ListRegexMatchSetsCommandOutput +} from "../commands/ListRegexMatchSetsCommand"; +import { + ListRegexPatternSetsCommandInput, + ListRegexPatternSetsCommandOutput +} from "../commands/ListRegexPatternSetsCommand"; +import { + ListResourcesForWebACLCommandInput, + ListResourcesForWebACLCommandOutput +} from "../commands/ListResourcesForWebACLCommand"; +import { + ListRuleGroupsCommandInput, + ListRuleGroupsCommandOutput +} from "../commands/ListRuleGroupsCommand"; +import { + ListRulesCommandInput, + ListRulesCommandOutput +} from "../commands/ListRulesCommand"; +import { + ListSizeConstraintSetsCommandInput, + ListSizeConstraintSetsCommandOutput +} from "../commands/ListSizeConstraintSetsCommand"; +import { + ListSqlInjectionMatchSetsCommandInput, + ListSqlInjectionMatchSetsCommandOutput +} from "../commands/ListSqlInjectionMatchSetsCommand"; +import { + ListSubscribedRuleGroupsCommandInput, + ListSubscribedRuleGroupsCommandOutput +} from "../commands/ListSubscribedRuleGroupsCommand"; +import { + ListTagsForResourceCommandInput, + ListTagsForResourceCommandOutput +} from "../commands/ListTagsForResourceCommand"; +import { + ListWebACLsCommandInput, + ListWebACLsCommandOutput +} from "../commands/ListWebACLsCommand"; +import { + ListXssMatchSetsCommandInput, + ListXssMatchSetsCommandOutput +} from "../commands/ListXssMatchSetsCommand"; +import { + PutLoggingConfigurationCommandInput, + PutLoggingConfigurationCommandOutput +} from "../commands/PutLoggingConfigurationCommand"; +import { + PutPermissionPolicyCommandInput, + PutPermissionPolicyCommandOutput +} from "../commands/PutPermissionPolicyCommand"; +import { + TagResourceCommandInput, + TagResourceCommandOutput +} from "../commands/TagResourceCommand"; +import { + UntagResourceCommandInput, + UntagResourceCommandOutput +} from "../commands/UntagResourceCommand"; +import { + UpdateByteMatchSetCommandInput, + UpdateByteMatchSetCommandOutput +} from "../commands/UpdateByteMatchSetCommand"; +import { + UpdateGeoMatchSetCommandInput, + UpdateGeoMatchSetCommandOutput +} from "../commands/UpdateGeoMatchSetCommand"; +import { + UpdateIPSetCommandInput, + UpdateIPSetCommandOutput +} from "../commands/UpdateIPSetCommand"; +import { + UpdateRateBasedRuleCommandInput, + UpdateRateBasedRuleCommandOutput +} from "../commands/UpdateRateBasedRuleCommand"; +import { + UpdateRegexMatchSetCommandInput, + UpdateRegexMatchSetCommandOutput +} from "../commands/UpdateRegexMatchSetCommand"; +import { + UpdateRegexPatternSetCommandInput, + UpdateRegexPatternSetCommandOutput +} from "../commands/UpdateRegexPatternSetCommand"; +import { + UpdateRuleCommandInput, + UpdateRuleCommandOutput +} from "../commands/UpdateRuleCommand"; +import { + UpdateRuleGroupCommandInput, + UpdateRuleGroupCommandOutput +} from "../commands/UpdateRuleGroupCommand"; +import { + UpdateSizeConstraintSetCommandInput, + UpdateSizeConstraintSetCommandOutput +} from "../commands/UpdateSizeConstraintSetCommand"; +import { + UpdateSqlInjectionMatchSetCommandInput, + UpdateSqlInjectionMatchSetCommandOutput +} from "../commands/UpdateSqlInjectionMatchSetCommand"; +import { + UpdateWebACLCommandInput, + UpdateWebACLCommandOutput +} from "../commands/UpdateWebACLCommand"; +import { + UpdateXssMatchSetCommandInput, + UpdateXssMatchSetCommandOutput +} from "../commands/UpdateXssMatchSetCommand"; +import { + ActivatedRule, + AssociateWebACLRequest, + AssociateWebACLResponse, + ByteMatchSet, + ByteMatchSetSummary, + ByteMatchSetUpdate, + ByteMatchTuple, + CreateByteMatchSetRequest, + CreateByteMatchSetResponse, + CreateGeoMatchSetRequest, + CreateGeoMatchSetResponse, + CreateIPSetRequest, + CreateIPSetResponse, + CreateRateBasedRuleRequest, + CreateRateBasedRuleResponse, + CreateRegexMatchSetRequest, + CreateRegexMatchSetResponse, + CreateRegexPatternSetRequest, + CreateRegexPatternSetResponse, + CreateRuleGroupRequest, + CreateRuleGroupResponse, + CreateRuleRequest, + CreateRuleResponse, + CreateSizeConstraintSetRequest, + CreateSizeConstraintSetResponse, + CreateSqlInjectionMatchSetRequest, + CreateSqlInjectionMatchSetResponse, + CreateWebACLRequest, + CreateWebACLResponse, + CreateXssMatchSetRequest, + CreateXssMatchSetResponse, + DeleteByteMatchSetRequest, + DeleteByteMatchSetResponse, + DeleteGeoMatchSetRequest, + DeleteGeoMatchSetResponse, + DeleteIPSetRequest, + DeleteIPSetResponse, + DeleteLoggingConfigurationRequest, + DeleteLoggingConfigurationResponse, + DeletePermissionPolicyRequest, + DeletePermissionPolicyResponse, + DeleteRateBasedRuleRequest, + DeleteRateBasedRuleResponse, + DeleteRegexMatchSetRequest, + DeleteRegexMatchSetResponse, + DeleteRegexPatternSetRequest, + DeleteRegexPatternSetResponse, + DeleteRuleGroupRequest, + DeleteRuleGroupResponse, + DeleteRuleRequest, + DeleteRuleResponse, + DeleteSizeConstraintSetRequest, + DeleteSizeConstraintSetResponse, + DeleteSqlInjectionMatchSetRequest, + DeleteSqlInjectionMatchSetResponse, + DeleteWebACLRequest, + DeleteWebACLResponse, + DeleteXssMatchSetRequest, + DeleteXssMatchSetResponse, + DisassociateWebACLRequest, + DisassociateWebACLResponse, + ExcludedRule, + FieldToMatch, + GeoMatchConstraint, + GeoMatchSet, + GeoMatchSetSummary, + GeoMatchSetUpdate, + GetByteMatchSetRequest, + GetByteMatchSetResponse, + GetChangeTokenRequest, + GetChangeTokenResponse, + GetChangeTokenStatusRequest, + GetChangeTokenStatusResponse, + GetGeoMatchSetRequest, + GetGeoMatchSetResponse, + GetIPSetRequest, + GetIPSetResponse, + GetLoggingConfigurationRequest, + GetLoggingConfigurationResponse, + GetPermissionPolicyRequest, + GetPermissionPolicyResponse, + GetRateBasedRuleManagedKeysRequest, + GetRateBasedRuleManagedKeysResponse, + GetRateBasedRuleRequest, + GetRateBasedRuleResponse, + GetRegexMatchSetRequest, + GetRegexMatchSetResponse, + GetRegexPatternSetRequest, + GetRegexPatternSetResponse, + GetRuleGroupRequest, + GetRuleGroupResponse, + GetRuleRequest, + GetRuleResponse, + GetSampledRequestsRequest, + GetSampledRequestsResponse, + GetSizeConstraintSetRequest, + GetSizeConstraintSetResponse, + GetSqlInjectionMatchSetRequest, + GetSqlInjectionMatchSetResponse, + GetWebACLForResourceRequest, + GetWebACLForResourceResponse, + GetWebACLRequest, + GetWebACLResponse, + GetXssMatchSetRequest, + GetXssMatchSetResponse, + HTTPHeader, + HTTPRequest, + IPSet, + IPSetDescriptor, + IPSetSummary, + IPSetUpdate, + ListActivatedRulesInRuleGroupRequest, + ListActivatedRulesInRuleGroupResponse, + ListByteMatchSetsRequest, + ListByteMatchSetsResponse, + ListGeoMatchSetsRequest, + ListGeoMatchSetsResponse, + ListIPSetsRequest, + ListIPSetsResponse, + ListLoggingConfigurationsRequest, + ListLoggingConfigurationsResponse, + ListRateBasedRulesRequest, + ListRateBasedRulesResponse, + ListRegexMatchSetsRequest, + ListRegexMatchSetsResponse, + ListRegexPatternSetsRequest, + ListRegexPatternSetsResponse, + ListResourcesForWebACLRequest, + ListResourcesForWebACLResponse, + ListRuleGroupsRequest, + ListRuleGroupsResponse, + ListRulesRequest, + ListRulesResponse, + ListSizeConstraintSetsRequest, + ListSizeConstraintSetsResponse, + ListSqlInjectionMatchSetsRequest, + ListSqlInjectionMatchSetsResponse, + ListSubscribedRuleGroupsRequest, + ListSubscribedRuleGroupsResponse, + ListTagsForResourceRequest, + ListTagsForResourceResponse, + ListWebACLsRequest, + ListWebACLsResponse, + ListXssMatchSetsRequest, + ListXssMatchSetsResponse, + LoggingConfiguration, + Predicate, + PutLoggingConfigurationRequest, + PutLoggingConfigurationResponse, + PutPermissionPolicyRequest, + PutPermissionPolicyResponse, + RateBasedRule, + RegexMatchSet, + RegexMatchSetSummary, + RegexMatchSetUpdate, + RegexMatchTuple, + RegexPatternSet, + RegexPatternSetSummary, + RegexPatternSetUpdate, + Rule, + RuleGroup, + RuleGroupSummary, + RuleGroupUpdate, + RuleSummary, + RuleUpdate, + SampledHTTPRequest, + SizeConstraint, + SizeConstraintSet, + SizeConstraintSetSummary, + SizeConstraintSetUpdate, + SqlInjectionMatchSet, + SqlInjectionMatchSetSummary, + SqlInjectionMatchSetUpdate, + SqlInjectionMatchTuple, + SubscribedRuleGroupSummary, + Tag, + TagInfoForResource, + TagResourceRequest, + TagResourceResponse, + TimeWindow, + UntagResourceRequest, + UntagResourceResponse, + UpdateByteMatchSetRequest, + UpdateByteMatchSetResponse, + UpdateGeoMatchSetRequest, + UpdateGeoMatchSetResponse, + UpdateIPSetRequest, + UpdateIPSetResponse, + UpdateRateBasedRuleRequest, + UpdateRateBasedRuleResponse, + UpdateRegexMatchSetRequest, + UpdateRegexMatchSetResponse, + UpdateRegexPatternSetRequest, + UpdateRegexPatternSetResponse, + UpdateRuleGroupRequest, + UpdateRuleGroupResponse, + UpdateRuleRequest, + UpdateRuleResponse, + UpdateSizeConstraintSetRequest, + UpdateSizeConstraintSetResponse, + UpdateSqlInjectionMatchSetRequest, + UpdateSqlInjectionMatchSetResponse, + UpdateWebACLRequest, + UpdateWebACLResponse, + UpdateXssMatchSetRequest, + UpdateXssMatchSetResponse, + WAFBadRequestException, + WAFDisallowedNameException, + WAFInternalErrorException, + WAFInvalidAccountException, + WAFInvalidOperationException, + WAFInvalidParameterException, + WAFInvalidPermissionPolicyException, + WAFInvalidRegexPatternException, + WAFLimitsExceededException, + WAFNonEmptyEntityException, + WAFNonexistentContainerException, + WAFNonexistentItemException, + WAFReferencedItemException, + WAFServiceLinkedRoleErrorException, + WAFStaleDataException, + WAFSubscriptionNotFoundException, + WAFTagOperationException, + WAFTagOperationInternalErrorException, + WAFUnavailableEntityException, + WafAction, + WafOverrideAction, + WebACL, + WebACLSummary, + WebACLUpdate, + XssMatchSet, + XssMatchSetSummary, + XssMatchSetUpdate, + XssMatchTuple +} from "../models/index"; +import { + HttpRequest as __HttpRequest, + HttpResponse as __HttpResponse +} from "@aws-sdk/protocol-http"; +import { SmithyException as __SmithyException } from "@aws-sdk/smithy-client"; +import { + Endpoint as __Endpoint, + MetadataBearer as __MetadataBearer, + ResponseMetadata as __ResponseMetadata, + SerdeContext as __SerdeContext +} from "@aws-sdk/types"; + +export async function serializeAws_json1_1AssociateWebACLCommand( + input: AssociateWebACLCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.AssociateWebACL"; + let body: any = {}; + const wrappedBody: any = { + AssociateWebACLRequest: serializeAws_json1_1AssociateWebACLRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/AssociateWebACL", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DisassociateWebACLCommand( + input: DisassociateWebACLCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DisassociateWebACL"; + let body: any = {}; + const wrappedBody: any = { + DisassociateWebACLRequest: serializeAws_json1_1DisassociateWebACLRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DisassociateWebACL", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetWebACLForResourceCommand( + input: GetWebACLForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetWebACLForResource"; + let body: any = {}; + const wrappedBody: any = { + GetWebACLForResourceRequest: serializeAws_json1_1GetWebACLForResourceRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetWebACLForResource", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListResourcesForWebACLCommand( + input: ListResourcesForWebACLCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListResourcesForWebACL"; + let body: any = {}; + const wrappedBody: any = { + ListResourcesForWebACLRequest: serializeAws_json1_1ListResourcesForWebACLRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListResourcesForWebACL", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateByteMatchSetCommand( + input: CreateByteMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateByteMatchSet"; + let body: any = {}; + const wrappedBody: any = { + CreateByteMatchSetRequest: serializeAws_json1_1CreateByteMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateByteMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateGeoMatchSetCommand( + input: CreateGeoMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateGeoMatchSet"; + let body: any = {}; + const wrappedBody: any = { + CreateGeoMatchSetRequest: serializeAws_json1_1CreateGeoMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateGeoMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateIPSetCommand( + input: CreateIPSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateIPSet"; + let body: any = {}; + const wrappedBody: any = { + CreateIPSetRequest: serializeAws_json1_1CreateIPSetRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateIPSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateRateBasedRuleCommand( + input: CreateRateBasedRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateRateBasedRule"; + let body: any = {}; + const wrappedBody: any = { + CreateRateBasedRuleRequest: serializeAws_json1_1CreateRateBasedRuleRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateRateBasedRule", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateRegexMatchSetCommand( + input: CreateRegexMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateRegexMatchSet"; + let body: any = {}; + const wrappedBody: any = { + CreateRegexMatchSetRequest: serializeAws_json1_1CreateRegexMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateRegexMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateRegexPatternSetCommand( + input: CreateRegexPatternSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateRegexPatternSet"; + let body: any = {}; + const wrappedBody: any = { + CreateRegexPatternSetRequest: serializeAws_json1_1CreateRegexPatternSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateRegexPatternSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateRuleCommand( + input: CreateRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateRule"; + let body: any = {}; + const wrappedBody: any = { + CreateRuleRequest: serializeAws_json1_1CreateRuleRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateRule", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateRuleGroupCommand( + input: CreateRuleGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateRuleGroup"; + let body: any = {}; + const wrappedBody: any = { + CreateRuleGroupRequest: serializeAws_json1_1CreateRuleGroupRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateRuleGroup", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateSizeConstraintSetCommand( + input: CreateSizeConstraintSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateSizeConstraintSet"; + let body: any = {}; + const wrappedBody: any = { + CreateSizeConstraintSetRequest: serializeAws_json1_1CreateSizeConstraintSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateSizeConstraintSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateSqlInjectionMatchSetCommand( + input: CreateSqlInjectionMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "AWSWAF_Regional_20161128.CreateSqlInjectionMatchSet"; + let body: any = {}; + const wrappedBody: any = { + CreateSqlInjectionMatchSetRequest: serializeAws_json1_1CreateSqlInjectionMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateSqlInjectionMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateWebACLCommand( + input: CreateWebACLCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateWebACL"; + let body: any = {}; + const wrappedBody: any = { + CreateWebACLRequest: serializeAws_json1_1CreateWebACLRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateWebACL", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1CreateXssMatchSetCommand( + input: CreateXssMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.CreateXssMatchSet"; + let body: any = {}; + const wrappedBody: any = { + CreateXssMatchSetRequest: serializeAws_json1_1CreateXssMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/CreateXssMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteByteMatchSetCommand( + input: DeleteByteMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteByteMatchSet"; + let body: any = {}; + const wrappedBody: any = { + DeleteByteMatchSetRequest: serializeAws_json1_1DeleteByteMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteByteMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteGeoMatchSetCommand( + input: DeleteGeoMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteGeoMatchSet"; + let body: any = {}; + const wrappedBody: any = { + DeleteGeoMatchSetRequest: serializeAws_json1_1DeleteGeoMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteGeoMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteIPSetCommand( + input: DeleteIPSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteIPSet"; + let body: any = {}; + const wrappedBody: any = { + DeleteIPSetRequest: serializeAws_json1_1DeleteIPSetRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteIPSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteLoggingConfigurationCommand( + input: DeleteLoggingConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "AWSWAF_Regional_20161128.DeleteLoggingConfiguration"; + let body: any = {}; + const wrappedBody: any = { + DeleteLoggingConfigurationRequest: serializeAws_json1_1DeleteLoggingConfigurationRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteLoggingConfiguration", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeletePermissionPolicyCommand( + input: DeletePermissionPolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeletePermissionPolicy"; + let body: any = {}; + const wrappedBody: any = { + DeletePermissionPolicyRequest: serializeAws_json1_1DeletePermissionPolicyRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeletePermissionPolicy", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteRateBasedRuleCommand( + input: DeleteRateBasedRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteRateBasedRule"; + let body: any = {}; + const wrappedBody: any = { + DeleteRateBasedRuleRequest: serializeAws_json1_1DeleteRateBasedRuleRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteRateBasedRule", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteRegexMatchSetCommand( + input: DeleteRegexMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteRegexMatchSet"; + let body: any = {}; + const wrappedBody: any = { + DeleteRegexMatchSetRequest: serializeAws_json1_1DeleteRegexMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteRegexMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteRegexPatternSetCommand( + input: DeleteRegexPatternSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteRegexPatternSet"; + let body: any = {}; + const wrappedBody: any = { + DeleteRegexPatternSetRequest: serializeAws_json1_1DeleteRegexPatternSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteRegexPatternSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteRuleCommand( + input: DeleteRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteRule"; + let body: any = {}; + const wrappedBody: any = { + DeleteRuleRequest: serializeAws_json1_1DeleteRuleRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteRule", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteRuleGroupCommand( + input: DeleteRuleGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteRuleGroup"; + let body: any = {}; + const wrappedBody: any = { + DeleteRuleGroupRequest: serializeAws_json1_1DeleteRuleGroupRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteRuleGroup", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteSizeConstraintSetCommand( + input: DeleteSizeConstraintSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteSizeConstraintSet"; + let body: any = {}; + const wrappedBody: any = { + DeleteSizeConstraintSetRequest: serializeAws_json1_1DeleteSizeConstraintSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteSizeConstraintSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteSqlInjectionMatchSetCommand( + input: DeleteSqlInjectionMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "AWSWAF_Regional_20161128.DeleteSqlInjectionMatchSet"; + let body: any = {}; + const wrappedBody: any = { + DeleteSqlInjectionMatchSetRequest: serializeAws_json1_1DeleteSqlInjectionMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteSqlInjectionMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteWebACLCommand( + input: DeleteWebACLCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteWebACL"; + let body: any = {}; + const wrappedBody: any = { + DeleteWebACLRequest: serializeAws_json1_1DeleteWebACLRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteWebACL", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1DeleteXssMatchSetCommand( + input: DeleteXssMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.DeleteXssMatchSet"; + let body: any = {}; + const wrappedBody: any = { + DeleteXssMatchSetRequest: serializeAws_json1_1DeleteXssMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/DeleteXssMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetByteMatchSetCommand( + input: GetByteMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetByteMatchSet"; + let body: any = {}; + const wrappedBody: any = { + GetByteMatchSetRequest: serializeAws_json1_1GetByteMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetByteMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetChangeTokenCommand( + input: GetChangeTokenCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetChangeToken"; + let body: any = {}; + const wrappedBody: any = { + GetChangeTokenRequest: serializeAws_json1_1GetChangeTokenRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetChangeToken", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetChangeTokenStatusCommand( + input: GetChangeTokenStatusCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetChangeTokenStatus"; + let body: any = {}; + const wrappedBody: any = { + GetChangeTokenStatusRequest: serializeAws_json1_1GetChangeTokenStatusRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetChangeTokenStatus", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetGeoMatchSetCommand( + input: GetGeoMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetGeoMatchSet"; + let body: any = {}; + const wrappedBody: any = { + GetGeoMatchSetRequest: serializeAws_json1_1GetGeoMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetGeoMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetIPSetCommand( + input: GetIPSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetIPSet"; + let body: any = {}; + const wrappedBody: any = { + GetIPSetRequest: serializeAws_json1_1GetIPSetRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetIPSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetLoggingConfigurationCommand( + input: GetLoggingConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetLoggingConfiguration"; + let body: any = {}; + const wrappedBody: any = { + GetLoggingConfigurationRequest: serializeAws_json1_1GetLoggingConfigurationRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetLoggingConfiguration", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetPermissionPolicyCommand( + input: GetPermissionPolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetPermissionPolicy"; + let body: any = {}; + const wrappedBody: any = { + GetPermissionPolicyRequest: serializeAws_json1_1GetPermissionPolicyRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetPermissionPolicy", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetRateBasedRuleCommand( + input: GetRateBasedRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetRateBasedRule"; + let body: any = {}; + const wrappedBody: any = { + GetRateBasedRuleRequest: serializeAws_json1_1GetRateBasedRuleRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetRateBasedRule", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetRateBasedRuleManagedKeysCommand( + input: GetRateBasedRuleManagedKeysCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "AWSWAF_Regional_20161128.GetRateBasedRuleManagedKeys"; + let body: any = {}; + const wrappedBody: any = { + GetRateBasedRuleManagedKeysRequest: serializeAws_json1_1GetRateBasedRuleManagedKeysRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetRateBasedRuleManagedKeys", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetRegexMatchSetCommand( + input: GetRegexMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetRegexMatchSet"; + let body: any = {}; + const wrappedBody: any = { + GetRegexMatchSetRequest: serializeAws_json1_1GetRegexMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetRegexMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetRegexPatternSetCommand( + input: GetRegexPatternSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetRegexPatternSet"; + let body: any = {}; + const wrappedBody: any = { + GetRegexPatternSetRequest: serializeAws_json1_1GetRegexPatternSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetRegexPatternSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetRuleCommand( + input: GetRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetRule"; + let body: any = {}; + const wrappedBody: any = { + GetRuleRequest: serializeAws_json1_1GetRuleRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetRule", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetRuleGroupCommand( + input: GetRuleGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetRuleGroup"; + let body: any = {}; + const wrappedBody: any = { + GetRuleGroupRequest: serializeAws_json1_1GetRuleGroupRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetRuleGroup", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetSampledRequestsCommand( + input: GetSampledRequestsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetSampledRequests"; + let body: any = {}; + const wrappedBody: any = { + GetSampledRequestsRequest: serializeAws_json1_1GetSampledRequestsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetSampledRequests", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetSizeConstraintSetCommand( + input: GetSizeConstraintSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetSizeConstraintSet"; + let body: any = {}; + const wrappedBody: any = { + GetSizeConstraintSetRequest: serializeAws_json1_1GetSizeConstraintSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetSizeConstraintSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetSqlInjectionMatchSetCommand( + input: GetSqlInjectionMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetSqlInjectionMatchSet"; + let body: any = {}; + const wrappedBody: any = { + GetSqlInjectionMatchSetRequest: serializeAws_json1_1GetSqlInjectionMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetSqlInjectionMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetWebACLCommand( + input: GetWebACLCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetWebACL"; + let body: any = {}; + const wrappedBody: any = { + GetWebACLRequest: serializeAws_json1_1GetWebACLRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetWebACL", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1GetXssMatchSetCommand( + input: GetXssMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.GetXssMatchSet"; + let body: any = {}; + const wrappedBody: any = { + GetXssMatchSetRequest: serializeAws_json1_1GetXssMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/GetXssMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListActivatedRulesInRuleGroupCommand( + input: ListActivatedRulesInRuleGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "AWSWAF_Regional_20161128.ListActivatedRulesInRuleGroup"; + let body: any = {}; + const wrappedBody: any = { + ListActivatedRulesInRuleGroupRequest: serializeAws_json1_1ListActivatedRulesInRuleGroupRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListActivatedRulesInRuleGroup", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListByteMatchSetsCommand( + input: ListByteMatchSetsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListByteMatchSets"; + let body: any = {}; + const wrappedBody: any = { + ListByteMatchSetsRequest: serializeAws_json1_1ListByteMatchSetsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListByteMatchSets", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListGeoMatchSetsCommand( + input: ListGeoMatchSetsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListGeoMatchSets"; + let body: any = {}; + const wrappedBody: any = { + ListGeoMatchSetsRequest: serializeAws_json1_1ListGeoMatchSetsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListGeoMatchSets", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListIPSetsCommand( + input: ListIPSetsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListIPSets"; + let body: any = {}; + const wrappedBody: any = { + ListIPSetsRequest: serializeAws_json1_1ListIPSetsRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListIPSets", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListLoggingConfigurationsCommand( + input: ListLoggingConfigurationsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "AWSWAF_Regional_20161128.ListLoggingConfigurations"; + let body: any = {}; + const wrappedBody: any = { + ListLoggingConfigurationsRequest: serializeAws_json1_1ListLoggingConfigurationsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListLoggingConfigurations", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListRateBasedRulesCommand( + input: ListRateBasedRulesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListRateBasedRules"; + let body: any = {}; + const wrappedBody: any = { + ListRateBasedRulesRequest: serializeAws_json1_1ListRateBasedRulesRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListRateBasedRules", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListRegexMatchSetsCommand( + input: ListRegexMatchSetsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListRegexMatchSets"; + let body: any = {}; + const wrappedBody: any = { + ListRegexMatchSetsRequest: serializeAws_json1_1ListRegexMatchSetsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListRegexMatchSets", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListRegexPatternSetsCommand( + input: ListRegexPatternSetsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListRegexPatternSets"; + let body: any = {}; + const wrappedBody: any = { + ListRegexPatternSetsRequest: serializeAws_json1_1ListRegexPatternSetsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListRegexPatternSets", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListRuleGroupsCommand( + input: ListRuleGroupsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListRuleGroups"; + let body: any = {}; + const wrappedBody: any = { + ListRuleGroupsRequest: serializeAws_json1_1ListRuleGroupsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListRuleGroups", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListRulesCommand( + input: ListRulesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListRules"; + let body: any = {}; + const wrappedBody: any = { + ListRulesRequest: serializeAws_json1_1ListRulesRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListRules", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListSizeConstraintSetsCommand( + input: ListSizeConstraintSetsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListSizeConstraintSets"; + let body: any = {}; + const wrappedBody: any = { + ListSizeConstraintSetsRequest: serializeAws_json1_1ListSizeConstraintSetsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListSizeConstraintSets", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListSqlInjectionMatchSetsCommand( + input: ListSqlInjectionMatchSetsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "AWSWAF_Regional_20161128.ListSqlInjectionMatchSets"; + let body: any = {}; + const wrappedBody: any = { + ListSqlInjectionMatchSetsRequest: serializeAws_json1_1ListSqlInjectionMatchSetsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListSqlInjectionMatchSets", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListSubscribedRuleGroupsCommand( + input: ListSubscribedRuleGroupsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListSubscribedRuleGroups"; + let body: any = {}; + const wrappedBody: any = { + ListSubscribedRuleGroupsRequest: serializeAws_json1_1ListSubscribedRuleGroupsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListSubscribedRuleGroups", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListTagsForResourceCommand( + input: ListTagsForResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListTagsForResource"; + let body: any = {}; + const wrappedBody: any = { + ListTagsForResourceRequest: serializeAws_json1_1ListTagsForResourceRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListTagsForResource", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListWebACLsCommand( + input: ListWebACLsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListWebACLs"; + let body: any = {}; + const wrappedBody: any = { + ListWebACLsRequest: serializeAws_json1_1ListWebACLsRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListWebACLs", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1ListXssMatchSetsCommand( + input: ListXssMatchSetsCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.ListXssMatchSets"; + let body: any = {}; + const wrappedBody: any = { + ListXssMatchSetsRequest: serializeAws_json1_1ListXssMatchSetsRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/ListXssMatchSets", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1PutLoggingConfigurationCommand( + input: PutLoggingConfigurationCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.PutLoggingConfiguration"; + let body: any = {}; + const wrappedBody: any = { + PutLoggingConfigurationRequest: serializeAws_json1_1PutLoggingConfigurationRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/PutLoggingConfiguration", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1PutPermissionPolicyCommand( + input: PutPermissionPolicyCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.PutPermissionPolicy"; + let body: any = {}; + const wrappedBody: any = { + PutPermissionPolicyRequest: serializeAws_json1_1PutPermissionPolicyRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/PutPermissionPolicy", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1TagResourceCommand( + input: TagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.TagResource"; + let body: any = {}; + const wrappedBody: any = { + TagResourceRequest: serializeAws_json1_1TagResourceRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/TagResource", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UntagResourceCommand( + input: UntagResourceCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UntagResource"; + let body: any = {}; + const wrappedBody: any = { + UntagResourceRequest: serializeAws_json1_1UntagResourceRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UntagResource", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateByteMatchSetCommand( + input: UpdateByteMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateByteMatchSet"; + let body: any = {}; + const wrappedBody: any = { + UpdateByteMatchSetRequest: serializeAws_json1_1UpdateByteMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateByteMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateGeoMatchSetCommand( + input: UpdateGeoMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateGeoMatchSet"; + let body: any = {}; + const wrappedBody: any = { + UpdateGeoMatchSetRequest: serializeAws_json1_1UpdateGeoMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateGeoMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateIPSetCommand( + input: UpdateIPSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateIPSet"; + let body: any = {}; + const wrappedBody: any = { + UpdateIPSetRequest: serializeAws_json1_1UpdateIPSetRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateIPSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateRateBasedRuleCommand( + input: UpdateRateBasedRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateRateBasedRule"; + let body: any = {}; + const wrappedBody: any = { + UpdateRateBasedRuleRequest: serializeAws_json1_1UpdateRateBasedRuleRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateRateBasedRule", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateRegexMatchSetCommand( + input: UpdateRegexMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateRegexMatchSet"; + let body: any = {}; + const wrappedBody: any = { + UpdateRegexMatchSetRequest: serializeAws_json1_1UpdateRegexMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateRegexMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateRegexPatternSetCommand( + input: UpdateRegexPatternSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateRegexPatternSet"; + let body: any = {}; + const wrappedBody: any = { + UpdateRegexPatternSetRequest: serializeAws_json1_1UpdateRegexPatternSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateRegexPatternSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateRuleCommand( + input: UpdateRuleCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateRule"; + let body: any = {}; + const wrappedBody: any = { + UpdateRuleRequest: serializeAws_json1_1UpdateRuleRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateRule", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateRuleGroupCommand( + input: UpdateRuleGroupCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateRuleGroup"; + let body: any = {}; + const wrappedBody: any = { + UpdateRuleGroupRequest: serializeAws_json1_1UpdateRuleGroupRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateRuleGroup", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateSizeConstraintSetCommand( + input: UpdateSizeConstraintSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateSizeConstraintSet"; + let body: any = {}; + const wrappedBody: any = { + UpdateSizeConstraintSetRequest: serializeAws_json1_1UpdateSizeConstraintSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateSizeConstraintSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateSqlInjectionMatchSetCommand( + input: UpdateSqlInjectionMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = + "AWSWAF_Regional_20161128.UpdateSqlInjectionMatchSet"; + let body: any = {}; + const wrappedBody: any = { + UpdateSqlInjectionMatchSetRequest: serializeAws_json1_1UpdateSqlInjectionMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateSqlInjectionMatchSet", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateWebACLCommand( + input: UpdateWebACLCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateWebACL"; + let body: any = {}; + const wrappedBody: any = { + UpdateWebACLRequest: serializeAws_json1_1UpdateWebACLRequest(input, context) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateWebACL", + headers: headers, + body: body + }); +} + +export async function serializeAws_json1_1UpdateXssMatchSetCommand( + input: UpdateXssMatchSetCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> { + const headers: any = {}; + headers["Content-Type"] = "application/x-amz-json-1.1"; + headers["X-Amz-Target"] = "AWSWAF_Regional_20161128.UpdateXssMatchSet"; + let body: any = {}; + const wrappedBody: any = { + UpdateXssMatchSetRequest: serializeAws_json1_1UpdateXssMatchSetRequest( + input, + context + ) + }; + body = JSON.stringify(wrappedBody); + return new __HttpRequest({ + ...context.endpoint, + protocol: "https", + method: "POST", + path: "/UpdateXssMatchSet", + headers: headers, + body: body + }); +} + +export async function deserializeAws_json1_1AssociateWebACLCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1AssociateWebACLCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1AssociateWebACLResponse( + data.AssociateWebACLResponse, + context + ); + const response: AssociateWebACLCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "AssociateWebACLResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1AssociateWebACLCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFUnavailableEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFUnavailableEntityException": + response = await deserializeAws_json1_1WAFUnavailableEntityExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.regional.v20161128#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DisassociateWebACLCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DisassociateWebACLCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DisassociateWebACLResponse( + data.DisassociateWebACLResponse, + context + ); + const response: DisassociateWebACLCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DisassociateWebACLResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DisassociateWebACLCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.regional.v20161128#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetWebACLForResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetWebACLForResourceCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetWebACLForResourceResponse( + data.GetWebACLForResourceResponse, + context + ); + const response: GetWebACLForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetWebACLForResourceResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetWebACLForResourceCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFUnavailableEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFUnavailableEntityException": + response = await deserializeAws_json1_1WAFUnavailableEntityExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.regional.v20161128#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListResourcesForWebACLCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListResourcesForWebACLCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListResourcesForWebACLResponse( + data.ListResourcesForWebACLResponse, + context + ); + const response: ListResourcesForWebACLCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListResourcesForWebACLResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListResourcesForWebACLCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.regional.v20161128#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateByteMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateByteMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateByteMatchSetResponse( + data.CreateByteMatchSetResponse, + context + ); + const response: CreateByteMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateByteMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateByteMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateGeoMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateGeoMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateGeoMatchSetResponse( + data.CreateGeoMatchSetResponse, + context + ); + const response: CreateGeoMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateGeoMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateGeoMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateIPSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateIPSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateIPSetResponse( + data.CreateIPSetResponse, + context + ); + const response: CreateIPSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateIPSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateIPSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateRateBasedRuleCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateRateBasedRuleCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateRateBasedRuleResponse( + data.CreateRateBasedRuleResponse, + context + ); + const response: CreateRateBasedRuleCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateRateBasedRuleResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateRateBasedRuleCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFBadRequestException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFBadRequestException": + response = await deserializeAws_json1_1WAFBadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateRegexMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateRegexMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateRegexMatchSetResponse( + data.CreateRegexMatchSetResponse, + context + ); + const response: CreateRegexMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateRegexMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateRegexMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateRegexPatternSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateRegexPatternSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateRegexPatternSetResponse( + data.CreateRegexPatternSetResponse, + context + ); + const response: CreateRegexPatternSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateRegexPatternSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateRegexPatternSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateRuleCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateRuleCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateRuleResponse( + data.CreateRuleResponse, + context + ); + const response: CreateRuleCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateRuleResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateRuleCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFBadRequestException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFBadRequestException": + response = await deserializeAws_json1_1WAFBadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateRuleGroupCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateRuleGroupCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateRuleGroupResponse( + data.CreateRuleGroupResponse, + context + ); + const response: CreateRuleGroupCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateRuleGroupResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateRuleGroupCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFBadRequestException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFBadRequestException": + response = await deserializeAws_json1_1WAFBadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateSizeConstraintSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateSizeConstraintSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateSizeConstraintSetResponse( + data.CreateSizeConstraintSetResponse, + context + ); + const response: CreateSizeConstraintSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateSizeConstraintSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateSizeConstraintSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateSqlInjectionMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateSqlInjectionMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateSqlInjectionMatchSetResponse( + data.CreateSqlInjectionMatchSetResponse, + context + ); + const response: CreateSqlInjectionMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateSqlInjectionMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateSqlInjectionMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateWebACLCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateWebACLCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateWebACLResponse( + data.CreateWebACLResponse, + context + ); + const response: CreateWebACLCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateWebACLResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateWebACLCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFBadRequestException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFBadRequestException": + response = await deserializeAws_json1_1WAFBadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1CreateXssMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1CreateXssMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1CreateXssMatchSetResponse( + data.CreateXssMatchSetResponse, + context + ); + const response: CreateXssMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "CreateXssMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1CreateXssMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteByteMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteByteMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteByteMatchSetResponse( + data.DeleteByteMatchSetResponse, + context + ); + const response: DeleteByteMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteByteMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteByteMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteGeoMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteGeoMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteGeoMatchSetResponse( + data.DeleteGeoMatchSetResponse, + context + ); + const response: DeleteGeoMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteGeoMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteGeoMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteIPSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteIPSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteIPSetResponse( + data.DeleteIPSetResponse, + context + ); + const response: DeleteIPSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteIPSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteIPSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteLoggingConfigurationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteLoggingConfigurationCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteLoggingConfigurationResponse( + data.DeleteLoggingConfigurationResponse, + context + ); + const response: DeleteLoggingConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteLoggingConfigurationResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteLoggingConfigurationCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeletePermissionPolicyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeletePermissionPolicyCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeletePermissionPolicyResponse( + data.DeletePermissionPolicyResponse, + context + ); + const response: DeletePermissionPolicyCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeletePermissionPolicyResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeletePermissionPolicyCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteRateBasedRuleCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteRateBasedRuleCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteRateBasedRuleResponse( + data.DeleteRateBasedRuleResponse, + context + ); + const response: DeleteRateBasedRuleCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteRateBasedRuleResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteRateBasedRuleCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteRegexMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteRegexMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteRegexMatchSetResponse( + data.DeleteRegexMatchSetResponse, + context + ); + const response: DeleteRegexMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteRegexMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteRegexMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteRegexPatternSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteRegexPatternSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteRegexPatternSetResponse( + data.DeleteRegexPatternSetResponse, + context + ); + const response: DeleteRegexPatternSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteRegexPatternSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteRegexPatternSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteRuleCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteRuleCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteRuleResponse( + data.DeleteRuleResponse, + context + ); + const response: DeleteRuleCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteRuleResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteRuleCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteRuleGroupCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteRuleGroupCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteRuleGroupResponse( + data.DeleteRuleGroupResponse, + context + ); + const response: DeleteRuleGroupCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteRuleGroupResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteRuleGroupCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteSizeConstraintSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteSizeConstraintSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteSizeConstraintSetResponse( + data.DeleteSizeConstraintSetResponse, + context + ); + const response: DeleteSizeConstraintSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteSizeConstraintSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteSizeConstraintSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteSqlInjectionMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteSqlInjectionMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteSqlInjectionMatchSetResponse( + data.DeleteSqlInjectionMatchSetResponse, + context + ); + const response: DeleteSqlInjectionMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteSqlInjectionMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteSqlInjectionMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteWebACLCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteWebACLCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteWebACLResponse( + data.DeleteWebACLResponse, + context + ); + const response: DeleteWebACLCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteWebACLResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteWebACLCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1DeleteXssMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1DeleteXssMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1DeleteXssMatchSetResponse( + data.DeleteXssMatchSetResponse, + context + ); + const response: DeleteXssMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "DeleteXssMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1DeleteXssMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonEmptyEntityException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonEmptyEntityException": + response = await deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetByteMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetByteMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetByteMatchSetResponse( + data.GetByteMatchSetResponse, + context + ); + const response: GetByteMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetByteMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetByteMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetChangeTokenCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetChangeTokenCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetChangeTokenResponse( + data.GetChangeTokenResponse, + context + ); + const response: GetChangeTokenCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetChangeTokenResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetChangeTokenCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetChangeTokenStatusCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetChangeTokenStatusCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetChangeTokenStatusResponse( + data.GetChangeTokenStatusResponse, + context + ); + const response: GetChangeTokenStatusCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetChangeTokenStatusResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetChangeTokenStatusCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetGeoMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetGeoMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetGeoMatchSetResponse( + data.GetGeoMatchSetResponse, + context + ); + const response: GetGeoMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetGeoMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetGeoMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetIPSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetIPSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetIPSetResponse( + data.GetIPSetResponse, + context + ); + const response: GetIPSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetIPSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetIPSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetLoggingConfigurationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetLoggingConfigurationCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetLoggingConfigurationResponse( + data.GetLoggingConfigurationResponse, + context + ); + const response: GetLoggingConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetLoggingConfigurationResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetLoggingConfigurationCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetPermissionPolicyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetPermissionPolicyCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetPermissionPolicyResponse( + data.GetPermissionPolicyResponse, + context + ); + const response: GetPermissionPolicyCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetPermissionPolicyResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetPermissionPolicyCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetRateBasedRuleCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetRateBasedRuleCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetRateBasedRuleResponse( + data.GetRateBasedRuleResponse, + context + ); + const response: GetRateBasedRuleCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetRateBasedRuleResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetRateBasedRuleCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetRateBasedRuleManagedKeysCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetRateBasedRuleManagedKeysCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetRateBasedRuleManagedKeysResponse( + data.GetRateBasedRuleManagedKeysResponse, + context + ); + const response: GetRateBasedRuleManagedKeysCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetRateBasedRuleManagedKeysResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetRateBasedRuleManagedKeysCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetRegexMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetRegexMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetRegexMatchSetResponse( + data.GetRegexMatchSetResponse, + context + ); + const response: GetRegexMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetRegexMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetRegexMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetRegexPatternSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetRegexPatternSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetRegexPatternSetResponse( + data.GetRegexPatternSetResponse, + context + ); + const response: GetRegexPatternSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetRegexPatternSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetRegexPatternSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetRuleCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetRuleCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetRuleResponse( + data.GetRuleResponse, + context + ); + const response: GetRuleCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetRuleResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetRuleCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetRuleGroupCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetRuleGroupCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetRuleGroupResponse( + data.GetRuleGroupResponse, + context + ); + const response: GetRuleGroupCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetRuleGroupResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetRuleGroupCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetSampledRequestsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetSampledRequestsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetSampledRequestsResponse( + data.GetSampledRequestsResponse, + context + ); + const response: GetSampledRequestsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetSampledRequestsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetSampledRequestsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetSizeConstraintSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetSizeConstraintSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetSizeConstraintSetResponse( + data.GetSizeConstraintSetResponse, + context + ); + const response: GetSizeConstraintSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetSizeConstraintSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetSizeConstraintSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetSqlInjectionMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetSqlInjectionMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetSqlInjectionMatchSetResponse( + data.GetSqlInjectionMatchSetResponse, + context + ); + const response: GetSqlInjectionMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetSqlInjectionMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetSqlInjectionMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetWebACLCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetWebACLCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetWebACLResponse( + data.GetWebACLResponse, + context + ); + const response: GetWebACLCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetWebACLResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetWebACLCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1GetXssMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1GetXssMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1GetXssMatchSetResponse( + data.GetXssMatchSetResponse, + context + ); + const response: GetXssMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "GetXssMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1GetXssMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListActivatedRulesInRuleGroupCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListActivatedRulesInRuleGroupCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListActivatedRulesInRuleGroupResponse( + data.ListActivatedRulesInRuleGroupResponse, + context + ); + const response: ListActivatedRulesInRuleGroupCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListActivatedRulesInRuleGroupResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListActivatedRulesInRuleGroupCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListByteMatchSetsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListByteMatchSetsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListByteMatchSetsResponse( + data.ListByteMatchSetsResponse, + context + ); + const response: ListByteMatchSetsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListByteMatchSetsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListByteMatchSetsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListGeoMatchSetsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListGeoMatchSetsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListGeoMatchSetsResponse( + data.ListGeoMatchSetsResponse, + context + ); + const response: ListGeoMatchSetsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListGeoMatchSetsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListGeoMatchSetsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListIPSetsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListIPSetsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListIPSetsResponse( + data.ListIPSetsResponse, + context + ); + const response: ListIPSetsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListIPSetsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListIPSetsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListLoggingConfigurationsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListLoggingConfigurationsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListLoggingConfigurationsResponse( + data.ListLoggingConfigurationsResponse, + context + ); + const response: ListLoggingConfigurationsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListLoggingConfigurationsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListLoggingConfigurationsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListRateBasedRulesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListRateBasedRulesCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListRateBasedRulesResponse( + data.ListRateBasedRulesResponse, + context + ); + const response: ListRateBasedRulesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListRateBasedRulesResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListRateBasedRulesCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListRegexMatchSetsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListRegexMatchSetsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListRegexMatchSetsResponse( + data.ListRegexMatchSetsResponse, + context + ); + const response: ListRegexMatchSetsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListRegexMatchSetsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListRegexMatchSetsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListRegexPatternSetsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListRegexPatternSetsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListRegexPatternSetsResponse( + data.ListRegexPatternSetsResponse, + context + ); + const response: ListRegexPatternSetsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListRegexPatternSetsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListRegexPatternSetsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListRuleGroupsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListRuleGroupsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListRuleGroupsResponse( + data.ListRuleGroupsResponse, + context + ); + const response: ListRuleGroupsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListRuleGroupsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListRuleGroupsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListRulesCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListRulesCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListRulesResponse( + data.ListRulesResponse, + context + ); + const response: ListRulesCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListRulesResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListRulesCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListSizeConstraintSetsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListSizeConstraintSetsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListSizeConstraintSetsResponse( + data.ListSizeConstraintSetsResponse, + context + ); + const response: ListSizeConstraintSetsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListSizeConstraintSetsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListSizeConstraintSetsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListSqlInjectionMatchSetsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListSqlInjectionMatchSetsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListSqlInjectionMatchSetsResponse( + data.ListSqlInjectionMatchSetsResponse, + context + ); + const response: ListSqlInjectionMatchSetsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListSqlInjectionMatchSetsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListSqlInjectionMatchSetsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListSubscribedRuleGroupsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListSubscribedRuleGroupsCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListSubscribedRuleGroupsResponse( + data.ListSubscribedRuleGroupsResponse, + context + ); + const response: ListSubscribedRuleGroupsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListSubscribedRuleGroupsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListSubscribedRuleGroupsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListTagsForResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListTagsForResourceCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListTagsForResourceResponse( + data.ListTagsForResourceResponse, + context + ); + const response: ListTagsForResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListTagsForResourceResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListTagsForResourceCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFBadRequestException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFBadRequestException": + response = await deserializeAws_json1_1WAFBadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListWebACLsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListWebACLsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListWebACLsResponse( + data.ListWebACLsResponse, + context + ); + const response: ListWebACLsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListWebACLsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListWebACLsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1ListXssMatchSetsCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1ListXssMatchSetsCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1ListXssMatchSetsResponse( + data.ListXssMatchSetsResponse, + context + ); + const response: ListXssMatchSetsCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "ListXssMatchSetsResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1ListXssMatchSetsCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1PutLoggingConfigurationCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1PutLoggingConfigurationCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1PutLoggingConfigurationResponse( + data.PutLoggingConfigurationResponse, + context + ); + const response: PutLoggingConfigurationCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutLoggingConfigurationResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1PutLoggingConfigurationCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFServiceLinkedRoleErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFServiceLinkedRoleErrorException": + response = await deserializeAws_json1_1WAFServiceLinkedRoleErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1PutPermissionPolicyCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1PutPermissionPolicyCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1PutPermissionPolicyResponse( + data.PutPermissionPolicyResponse, + context + ); + const response: PutPermissionPolicyCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "PutPermissionPolicyResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1PutPermissionPolicyCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidPermissionPolicyException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidPermissionPolicyException": + response = await deserializeAws_json1_1WAFInvalidPermissionPolicyExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1TagResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1TagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1TagResourceResponse( + data.TagResourceResponse, + context + ); + const response: TagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "TagResourceResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1TagResourceCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFBadRequestException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFBadRequestException": + response = await deserializeAws_json1_1WAFBadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UntagResourceCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UntagResourceCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UntagResourceResponse( + data.UntagResourceResponse, + context + ); + const response: UntagResourceCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UntagResourceResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UntagResourceCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFBadRequestException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFBadRequestException": + response = await deserializeAws_json1_1WAFBadRequestExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationException": + response = await deserializeAws_json1_1WAFTagOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFTagOperationInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFTagOperationInternalErrorException": + response = await deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateByteMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateByteMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateByteMatchSetResponse( + data.UpdateByteMatchSetResponse, + context + ); + const response: UpdateByteMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateByteMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateByteMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateGeoMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateGeoMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateGeoMatchSetResponse( + data.UpdateGeoMatchSetResponse, + context + ); + const response: UpdateGeoMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateGeoMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateGeoMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateIPSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateIPSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateIPSetResponse( + data.UpdateIPSetResponse, + context + ); + const response: UpdateIPSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateIPSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateIPSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateRateBasedRuleCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateRateBasedRuleCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateRateBasedRuleResponse( + data.UpdateRateBasedRuleResponse, + context + ); + const response: UpdateRateBasedRuleCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateRateBasedRuleResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateRateBasedRuleCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateRegexMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateRegexMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateRegexMatchSetResponse( + data.UpdateRegexMatchSetResponse, + context + ); + const response: UpdateRegexMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateRegexMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateRegexMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFDisallowedNameException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFDisallowedNameException": + response = await deserializeAws_json1_1WAFDisallowedNameExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateRegexPatternSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateRegexPatternSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateRegexPatternSetResponse( + data.UpdateRegexPatternSetResponse, + context + ); + const response: UpdateRegexPatternSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateRegexPatternSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateRegexPatternSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidRegexPatternException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidRegexPatternException": + response = await deserializeAws_json1_1WAFInvalidRegexPatternExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateRuleCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateRuleCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateRuleResponse( + data.UpdateRuleResponse, + context + ); + const response: UpdateRuleCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateRuleResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateRuleCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateRuleGroupCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateRuleGroupCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateRuleGroupResponse( + data.UpdateRuleGroupResponse, + context + ); + const response: UpdateRuleGroupCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateRuleGroupResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateRuleGroupCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateSizeConstraintSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateSizeConstraintSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateSizeConstraintSetResponse( + data.UpdateSizeConstraintSetResponse, + context + ); + const response: UpdateSizeConstraintSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateSizeConstraintSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateSizeConstraintSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateSqlInjectionMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateSqlInjectionMatchSetCommandError( + output, + context + ); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateSqlInjectionMatchSetResponse( + data.UpdateSqlInjectionMatchSetResponse, + context + ); + const response: UpdateSqlInjectionMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateSqlInjectionMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateSqlInjectionMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateWebACLCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateWebACLCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateWebACLResponse( + data.UpdateWebACLResponse, + context + ); + const response: UpdateWebACLCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateWebACLResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateWebACLCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFReferencedItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFReferencedItemException": + response = await deserializeAws_json1_1WAFReferencedItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFSubscriptionNotFoundException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFSubscriptionNotFoundException": + response = await deserializeAws_json1_1WAFSubscriptionNotFoundExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +export async function deserializeAws_json1_1UpdateXssMatchSetCommand( + output: __HttpResponse, + context: __SerdeContext +): Promise { + if (output.statusCode >= 400) { + return deserializeAws_json1_1UpdateXssMatchSetCommandError(output, context); + } + const data: any = await parseBody(output.body, context); + let contents: any = {}; + contents = deserializeAws_json1_1UpdateXssMatchSetResponse( + data.UpdateXssMatchSetResponse, + context + ); + const response: UpdateXssMatchSetCommandOutput = { + $metadata: deserializeMetadata(output), + __type: "UpdateXssMatchSetResponse", + ...contents + }; + return Promise.resolve(response); +} + +async function deserializeAws_json1_1UpdateXssMatchSetCommandError( + output: __HttpResponse, + context: __SerdeContext +): Promise { + const data: any = await parseBody(output.body, context); + const parsedOutput: any = { + ...output, + body: data + }; + let response: __SmithyException & __MetadataBearer; + let errorCode: String; + const errorTypeParts: String = data["__type"].split("#"); + errorCode = + errorTypeParts[1] === undefined ? errorTypeParts[0] : errorTypeParts[1]; + switch (errorCode) { + case "WAFInternalErrorException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInternalErrorException": + response = await deserializeAws_json1_1WAFInternalErrorExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidAccountException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidAccountException": + response = await deserializeAws_json1_1WAFInvalidAccountExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidOperationException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidOperationException": + response = await deserializeAws_json1_1WAFInvalidOperationExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFInvalidParameterException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFInvalidParameterException": + response = await deserializeAws_json1_1WAFInvalidParameterExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFLimitsExceededException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFLimitsExceededException": + response = await deserializeAws_json1_1WAFLimitsExceededExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentContainerException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentContainerException": + response = await deserializeAws_json1_1WAFNonexistentContainerExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFNonexistentItemException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFNonexistentItemException": + response = await deserializeAws_json1_1WAFNonexistentItemExceptionResponse( + parsedOutput, + context + ); + break; + case "WAFStaleDataException": + case "com.amazonaws.gokucustomerapiservice.v20150409#WAFStaleDataException": + response = await deserializeAws_json1_1WAFStaleDataExceptionResponse( + parsedOutput, + context + ); + break; + default: + errorCode = errorCode || "UnknownError"; + response = { + __type: `com.amazonaws.gokucustomerapiservice.v20150409#${errorCode}`, + $fault: "client", + $metadata: deserializeMetadata(output) + }; + } + return Promise.reject(Object.assign(new Error(response.__type), response)); +} + +const deserializeAws_json1_1WAFBadRequestExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFBadRequestException( + output.body, + context + ); + const contents: WAFBadRequestException = { + __type: "WAFBadRequestException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFDisallowedNameExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFDisallowedNameException( + output.body, + context + ); + const contents: WAFDisallowedNameException = { + __type: "WAFDisallowedNameException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFInternalErrorExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFInternalErrorException( + output.body, + context + ); + const contents: WAFInternalErrorException = { + __type: "WAFInternalErrorException", + $fault: "server", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFInvalidAccountExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFInvalidAccountException( + output.body, + context + ); + const contents: WAFInvalidAccountException = { + __type: "WAFInvalidAccountException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFInvalidOperationExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFInvalidOperationException( + output.body, + context + ); + const contents: WAFInvalidOperationException = { + __type: "WAFInvalidOperationException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFInvalidParameterExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFInvalidParameterException( + output.body, + context + ); + const contents: WAFInvalidParameterException = { + __type: "WAFInvalidParameterException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFInvalidPermissionPolicyExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFInvalidPermissionPolicyException( + output.body, + context + ); + const contents: WAFInvalidPermissionPolicyException = { + __type: "WAFInvalidPermissionPolicyException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFInvalidRegexPatternExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFInvalidRegexPatternException( + output.body, + context + ); + const contents: WAFInvalidRegexPatternException = { + __type: "WAFInvalidRegexPatternException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFLimitsExceededExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFLimitsExceededException( + output.body, + context + ); + const contents: WAFLimitsExceededException = { + __type: "WAFLimitsExceededException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFNonEmptyEntityExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFNonEmptyEntityException( + output.body, + context + ); + const contents: WAFNonEmptyEntityException = { + __type: "WAFNonEmptyEntityException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFNonexistentContainerExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFNonexistentContainerException( + output.body, + context + ); + const contents: WAFNonexistentContainerException = { + __type: "WAFNonexistentContainerException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFNonexistentItemExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFNonexistentItemException( + output.body, + context + ); + const contents: WAFNonexistentItemException = { + __type: "WAFNonexistentItemException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFReferencedItemExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFReferencedItemException( + output.body, + context + ); + const contents: WAFReferencedItemException = { + __type: "WAFReferencedItemException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFServiceLinkedRoleErrorExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFServiceLinkedRoleErrorException( + output.body, + context + ); + const contents: WAFServiceLinkedRoleErrorException = { + __type: "WAFServiceLinkedRoleErrorException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFStaleDataExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFStaleDataException( + output.body, + context + ); + const contents: WAFStaleDataException = { + __type: "WAFStaleDataException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFSubscriptionNotFoundExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFSubscriptionNotFoundException( + output.body, + context + ); + const contents: WAFSubscriptionNotFoundException = { + __type: "WAFSubscriptionNotFoundException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFTagOperationExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFTagOperationException( + output.body, + context + ); + const contents: WAFTagOperationException = { + __type: "WAFTagOperationException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFTagOperationInternalErrorExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFTagOperationInternalErrorException( + output.body, + context + ); + const contents: WAFTagOperationInternalErrorException = { + __type: "WAFTagOperationInternalErrorException", + $fault: "server", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const deserializeAws_json1_1WAFUnavailableEntityExceptionResponse = async ( + output: any, + context: __SerdeContext +): Promise => { + const deserialized: any = deserializeAws_json1_1WAFUnavailableEntityException( + output.body, + context + ); + const contents: WAFUnavailableEntityException = { + __type: "WAFUnavailableEntityException", + $fault: "client", + $metadata: deserializeMetadata(output), + ...deserialized + }; + return contents; +}; + +const serializeAws_json1_1AssociateWebACLRequest = ( + input: AssociateWebACLRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + if (input.WebACLId !== undefined) { + bodyParams["WebACLId"] = input.WebACLId; + } + return bodyParams; +}; + +const serializeAws_json1_1DisassociateWebACLRequest = ( + input: DisassociateWebACLRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + return bodyParams; +}; + +const serializeAws_json1_1GetWebACLForResourceRequest = ( + input: GetWebACLForResourceRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + return bodyParams; +}; + +const serializeAws_json1_1ListResourcesForWebACLRequest = ( + input: ListResourcesForWebACLRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceType !== undefined) { + bodyParams["ResourceType"] = input.ResourceType; + } + if (input.WebACLId !== undefined) { + bodyParams["WebACLId"] = input.WebACLId; + } + return bodyParams; +}; + +const serializeAws_json1_1ActivatedRule = ( + input: ActivatedRule, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = serializeAws_json1_1WafAction(input.Action, context); + } + if (input.ExcludedRules !== undefined) { + bodyParams["ExcludedRules"] = serializeAws_json1_1ExcludedRules( + input.ExcludedRules, + context + ); + } + if (input.OverrideAction !== undefined) { + bodyParams["OverrideAction"] = serializeAws_json1_1WafOverrideAction( + input.OverrideAction, + context + ); + } + if (input.Priority !== undefined) { + bodyParams["Priority"] = input.Priority; + } + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1ByteMatchSetUpdate = ( + input: ByteMatchSetUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.ByteMatchTuple !== undefined) { + bodyParams["ByteMatchTuple"] = serializeAws_json1_1ByteMatchTuple( + input.ByteMatchTuple, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1ByteMatchSetUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1ByteMatchSetUpdate(entry, context) + ); +}; + +const serializeAws_json1_1ByteMatchTuple = ( + input: ByteMatchTuple, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.FieldToMatch !== undefined) { + bodyParams["FieldToMatch"] = serializeAws_json1_1FieldToMatch( + input.FieldToMatch, + context + ); + } + if (input.PositionalConstraint !== undefined) { + bodyParams["PositionalConstraint"] = input.PositionalConstraint; + } + if (input.TargetString !== undefined) { + bodyParams["TargetString"] = context.base64Encoder(input.TargetString); + } + if (input.TextTransformation !== undefined) { + bodyParams["TextTransformation"] = input.TextTransformation; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateByteMatchSetRequest = ( + input: CreateByteMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateGeoMatchSetRequest = ( + input: CreateGeoMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateIPSetRequest = ( + input: CreateIPSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateRateBasedRuleRequest = ( + input: CreateRateBasedRuleRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.MetricName !== undefined) { + bodyParams["MetricName"] = input.MetricName; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + if (input.RateKey !== undefined) { + bodyParams["RateKey"] = input.RateKey; + } + if (input.RateLimit !== undefined) { + bodyParams["RateLimit"] = input.RateLimit; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_json1_1TagList(input.Tags, context); + } + return bodyParams; +}; + +const serializeAws_json1_1CreateRegexMatchSetRequest = ( + input: CreateRegexMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateRegexPatternSetRequest = ( + input: CreateRegexPatternSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateRuleGroupRequest = ( + input: CreateRuleGroupRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.MetricName !== undefined) { + bodyParams["MetricName"] = input.MetricName; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_json1_1TagList(input.Tags, context); + } + return bodyParams; +}; + +const serializeAws_json1_1CreateRuleRequest = ( + input: CreateRuleRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.MetricName !== undefined) { + bodyParams["MetricName"] = input.MetricName; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_json1_1TagList(input.Tags, context); + } + return bodyParams; +}; + +const serializeAws_json1_1CreateSizeConstraintSetRequest = ( + input: CreateSizeConstraintSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateSqlInjectionMatchSetRequest = ( + input: CreateSqlInjectionMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + return bodyParams; +}; + +const serializeAws_json1_1CreateWebACLRequest = ( + input: CreateWebACLRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.DefaultAction !== undefined) { + bodyParams["DefaultAction"] = serializeAws_json1_1WafAction( + input.DefaultAction, + context + ); + } + if (input.MetricName !== undefined) { + bodyParams["MetricName"] = input.MetricName; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_json1_1TagList(input.Tags, context); + } + return bodyParams; +}; + +const serializeAws_json1_1CreateXssMatchSetRequest = ( + input: CreateXssMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Name !== undefined) { + bodyParams["Name"] = input.Name; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteByteMatchSetRequest = ( + input: DeleteByteMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ByteMatchSetId !== undefined) { + bodyParams["ByteMatchSetId"] = input.ByteMatchSetId; + } + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteGeoMatchSetRequest = ( + input: DeleteGeoMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.GeoMatchSetId !== undefined) { + bodyParams["GeoMatchSetId"] = input.GeoMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteIPSetRequest = ( + input: DeleteIPSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.IPSetId !== undefined) { + bodyParams["IPSetId"] = input.IPSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteLoggingConfigurationRequest = ( + input: DeleteLoggingConfigurationRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + return bodyParams; +}; + +const serializeAws_json1_1DeletePermissionPolicyRequest = ( + input: DeletePermissionPolicyRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteRateBasedRuleRequest = ( + input: DeleteRateBasedRuleRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteRegexMatchSetRequest = ( + input: DeleteRegexMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RegexMatchSetId !== undefined) { + bodyParams["RegexMatchSetId"] = input.RegexMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteRegexPatternSetRequest = ( + input: DeleteRegexPatternSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RegexPatternSetId !== undefined) { + bodyParams["RegexPatternSetId"] = input.RegexPatternSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteRuleGroupRequest = ( + input: DeleteRuleGroupRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RuleGroupId !== undefined) { + bodyParams["RuleGroupId"] = input.RuleGroupId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteRuleRequest = ( + input: DeleteRuleRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteSizeConstraintSetRequest = ( + input: DeleteSizeConstraintSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.SizeConstraintSetId !== undefined) { + bodyParams["SizeConstraintSetId"] = input.SizeConstraintSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteSqlInjectionMatchSetRequest = ( + input: DeleteSqlInjectionMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.SqlInjectionMatchSetId !== undefined) { + bodyParams["SqlInjectionMatchSetId"] = input.SqlInjectionMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteWebACLRequest = ( + input: DeleteWebACLRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.WebACLId !== undefined) { + bodyParams["WebACLId"] = input.WebACLId; + } + return bodyParams; +}; + +const serializeAws_json1_1DeleteXssMatchSetRequest = ( + input: DeleteXssMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.XssMatchSetId !== undefined) { + bodyParams["XssMatchSetId"] = input.XssMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1ExcludedRule = ( + input: ExcludedRule, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + return bodyParams; +}; + +const serializeAws_json1_1ExcludedRules = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1ExcludedRule(entry, context) + ); +}; + +const serializeAws_json1_1FieldToMatch = ( + input: FieldToMatch, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Data !== undefined) { + bodyParams["Data"] = input.Data; + } + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1GeoMatchConstraint = ( + input: GeoMatchConstraint, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + if (input.Value !== undefined) { + bodyParams["Value"] = input.Value; + } + return bodyParams; +}; + +const serializeAws_json1_1GeoMatchSetUpdate = ( + input: GeoMatchSetUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.GeoMatchConstraint !== undefined) { + bodyParams["GeoMatchConstraint"] = serializeAws_json1_1GeoMatchConstraint( + input.GeoMatchConstraint, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1GeoMatchSetUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1GeoMatchSetUpdate(entry, context) + ); +}; + +const serializeAws_json1_1GetByteMatchSetRequest = ( + input: GetByteMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ByteMatchSetId !== undefined) { + bodyParams["ByteMatchSetId"] = input.ByteMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetChangeTokenRequest = ( + input: GetChangeTokenRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + return bodyParams; +}; + +const serializeAws_json1_1GetChangeTokenStatusRequest = ( + input: GetChangeTokenStatusRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + return bodyParams; +}; + +const serializeAws_json1_1GetGeoMatchSetRequest = ( + input: GetGeoMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.GeoMatchSetId !== undefined) { + bodyParams["GeoMatchSetId"] = input.GeoMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetIPSetRequest = ( + input: GetIPSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.IPSetId !== undefined) { + bodyParams["IPSetId"] = input.IPSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetLoggingConfigurationRequest = ( + input: GetLoggingConfigurationRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + return bodyParams; +}; + +const serializeAws_json1_1GetPermissionPolicyRequest = ( + input: GetPermissionPolicyRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + return bodyParams; +}; + +const serializeAws_json1_1GetRateBasedRuleManagedKeysRequest = ( + input: GetRateBasedRuleManagedKeysRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetRateBasedRuleRequest = ( + input: GetRateBasedRuleRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetRegexMatchSetRequest = ( + input: GetRegexMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.RegexMatchSetId !== undefined) { + bodyParams["RegexMatchSetId"] = input.RegexMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetRegexPatternSetRequest = ( + input: GetRegexPatternSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.RegexPatternSetId !== undefined) { + bodyParams["RegexPatternSetId"] = input.RegexPatternSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetRuleGroupRequest = ( + input: GetRuleGroupRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.RuleGroupId !== undefined) { + bodyParams["RuleGroupId"] = input.RuleGroupId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetRuleRequest = ( + input: GetRuleRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetSampledRequestsRequest = ( + input: GetSampledRequestsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.MaxItems !== undefined) { + bodyParams["MaxItems"] = input.MaxItems; + } + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + if (input.TimeWindow !== undefined) { + bodyParams["TimeWindow"] = serializeAws_json1_1TimeWindow( + input.TimeWindow, + context + ); + } + if (input.WebAclId !== undefined) { + bodyParams["WebAclId"] = input.WebAclId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetSizeConstraintSetRequest = ( + input: GetSizeConstraintSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SizeConstraintSetId !== undefined) { + bodyParams["SizeConstraintSetId"] = input.SizeConstraintSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetSqlInjectionMatchSetRequest = ( + input: GetSqlInjectionMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.SqlInjectionMatchSetId !== undefined) { + bodyParams["SqlInjectionMatchSetId"] = input.SqlInjectionMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetWebACLRequest = ( + input: GetWebACLRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.WebACLId !== undefined) { + bodyParams["WebACLId"] = input.WebACLId; + } + return bodyParams; +}; + +const serializeAws_json1_1GetXssMatchSetRequest = ( + input: GetXssMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.XssMatchSetId !== undefined) { + bodyParams["XssMatchSetId"] = input.XssMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1IPSetDescriptor = ( + input: IPSetDescriptor, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + if (input.Value !== undefined) { + bodyParams["Value"] = input.Value; + } + return bodyParams; +}; + +const serializeAws_json1_1IPSetUpdate = ( + input: IPSetUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.IPSetDescriptor !== undefined) { + bodyParams["IPSetDescriptor"] = serializeAws_json1_1IPSetDescriptor( + input.IPSetDescriptor, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1IPSetUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1IPSetUpdate(entry, context) + ); +}; + +const serializeAws_json1_1ListActivatedRulesInRuleGroupRequest = ( + input: ListActivatedRulesInRuleGroupRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + if (input.RuleGroupId !== undefined) { + bodyParams["RuleGroupId"] = input.RuleGroupId; + } + return bodyParams; +}; + +const serializeAws_json1_1ListByteMatchSetsRequest = ( + input: ListByteMatchSetsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListGeoMatchSetsRequest = ( + input: ListGeoMatchSetsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListIPSetsRequest = ( + input: ListIPSetsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListLoggingConfigurationsRequest = ( + input: ListLoggingConfigurationsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListRateBasedRulesRequest = ( + input: ListRateBasedRulesRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListRegexMatchSetsRequest = ( + input: ListRegexMatchSetsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListRegexPatternSetsRequest = ( + input: ListRegexPatternSetsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListRuleGroupsRequest = ( + input: ListRuleGroupsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListRulesRequest = ( + input: ListRulesRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListSizeConstraintSetsRequest = ( + input: ListSizeConstraintSetsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListSqlInjectionMatchSetsRequest = ( + input: ListSqlInjectionMatchSetsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListSubscribedRuleGroupsRequest = ( + input: ListSubscribedRuleGroupsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListTagsForResourceRequest = ( + input: ListTagsForResourceRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + if (input.ResourceARN !== undefined) { + bodyParams["ResourceARN"] = input.ResourceARN; + } + return bodyParams; +}; + +const serializeAws_json1_1ListWebACLsRequest = ( + input: ListWebACLsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1ListXssMatchSetsRequest = ( + input: ListXssMatchSetsRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Limit !== undefined) { + bodyParams["Limit"] = input.Limit; + } + if (input.NextMarker !== undefined) { + bodyParams["NextMarker"] = input.NextMarker; + } + return bodyParams; +}; + +const serializeAws_json1_1LogDestinationConfigs = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1LoggingConfiguration = ( + input: LoggingConfiguration, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.LogDestinationConfigs !== undefined) { + bodyParams[ + "LogDestinationConfigs" + ] = serializeAws_json1_1LogDestinationConfigs( + input.LogDestinationConfigs, + context + ); + } + if (input.RedactedFields !== undefined) { + bodyParams["RedactedFields"] = serializeAws_json1_1RedactedFields( + input.RedactedFields, + context + ); + } + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + return bodyParams; +}; + +const serializeAws_json1_1Predicate = ( + input: Predicate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.DataId !== undefined) { + bodyParams["DataId"] = input.DataId; + } + if (input.Negated !== undefined) { + bodyParams["Negated"] = input.Negated; + } + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1PutLoggingConfigurationRequest = ( + input: PutLoggingConfigurationRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.LoggingConfiguration !== undefined) { + bodyParams[ + "LoggingConfiguration" + ] = serializeAws_json1_1LoggingConfiguration( + input.LoggingConfiguration, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1PutPermissionPolicyRequest = ( + input: PutPermissionPolicyRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Policy !== undefined) { + bodyParams["Policy"] = input.Policy; + } + if (input.ResourceArn !== undefined) { + bodyParams["ResourceArn"] = input.ResourceArn; + } + return bodyParams; +}; + +const serializeAws_json1_1RedactedFields = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1FieldToMatch(entry, context) + ); +}; + +const serializeAws_json1_1RegexMatchSetUpdate = ( + input: RegexMatchSetUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.RegexMatchTuple !== undefined) { + bodyParams["RegexMatchTuple"] = serializeAws_json1_1RegexMatchTuple( + input.RegexMatchTuple, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1RegexMatchSetUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1RegexMatchSetUpdate(entry, context) + ); +}; + +const serializeAws_json1_1RegexMatchTuple = ( + input: RegexMatchTuple, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.FieldToMatch !== undefined) { + bodyParams["FieldToMatch"] = serializeAws_json1_1FieldToMatch( + input.FieldToMatch, + context + ); + } + if (input.RegexPatternSetId !== undefined) { + bodyParams["RegexPatternSetId"] = input.RegexPatternSetId; + } + if (input.TextTransformation !== undefined) { + bodyParams["TextTransformation"] = input.TextTransformation; + } + return bodyParams; +}; + +const serializeAws_json1_1RegexPatternSetUpdate = ( + input: RegexPatternSetUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.RegexPatternString !== undefined) { + bodyParams["RegexPatternString"] = input.RegexPatternString; + } + return bodyParams; +}; + +const serializeAws_json1_1RegexPatternSetUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1RegexPatternSetUpdate(entry, context) + ); +}; + +const serializeAws_json1_1RuleGroupUpdate = ( + input: RuleGroupUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.ActivatedRule !== undefined) { + bodyParams["ActivatedRule"] = serializeAws_json1_1ActivatedRule( + input.ActivatedRule, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1RuleGroupUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1RuleGroupUpdate(entry, context) + ); +}; + +const serializeAws_json1_1RuleUpdate = ( + input: RuleUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.Predicate !== undefined) { + bodyParams["Predicate"] = serializeAws_json1_1Predicate( + input.Predicate, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1RuleUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1RuleUpdate(entry, context) + ); +}; + +const serializeAws_json1_1SizeConstraint = ( + input: SizeConstraint, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ComparisonOperator !== undefined) { + bodyParams["ComparisonOperator"] = input.ComparisonOperator; + } + if (input.FieldToMatch !== undefined) { + bodyParams["FieldToMatch"] = serializeAws_json1_1FieldToMatch( + input.FieldToMatch, + context + ); + } + if (input.Size !== undefined) { + bodyParams["Size"] = input.Size; + } + if (input.TextTransformation !== undefined) { + bodyParams["TextTransformation"] = input.TextTransformation; + } + return bodyParams; +}; + +const serializeAws_json1_1SizeConstraintSetUpdate = ( + input: SizeConstraintSetUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.SizeConstraint !== undefined) { + bodyParams["SizeConstraint"] = serializeAws_json1_1SizeConstraint( + input.SizeConstraint, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1SizeConstraintSetUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1SizeConstraintSetUpdate(entry, context) + ); +}; + +const serializeAws_json1_1SqlInjectionMatchSetUpdate = ( + input: SqlInjectionMatchSetUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.SqlInjectionMatchTuple !== undefined) { + bodyParams[ + "SqlInjectionMatchTuple" + ] = serializeAws_json1_1SqlInjectionMatchTuple( + input.SqlInjectionMatchTuple, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1SqlInjectionMatchSetUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1SqlInjectionMatchSetUpdate(entry, context) + ); +}; + +const serializeAws_json1_1SqlInjectionMatchTuple = ( + input: SqlInjectionMatchTuple, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.FieldToMatch !== undefined) { + bodyParams["FieldToMatch"] = serializeAws_json1_1FieldToMatch( + input.FieldToMatch, + context + ); + } + if (input.TextTransformation !== undefined) { + bodyParams["TextTransformation"] = input.TextTransformation; + } + return bodyParams; +}; + +const serializeAws_json1_1Tag = (input: Tag, context: __SerdeContext): any => { + let bodyParams: any = {}; + if (input.Key !== undefined) { + bodyParams["Key"] = input.Key; + } + if (input.Value !== undefined) { + bodyParams["Value"] = input.Value; + } + return bodyParams; +}; + +const serializeAws_json1_1TagKeyList = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => entry); +}; + +const serializeAws_json1_1TagList = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => serializeAws_json1_1Tag(entry, context)); +}; + +const serializeAws_json1_1TagResourceRequest = ( + input: TagResourceRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceARN !== undefined) { + bodyParams["ResourceARN"] = input.ResourceARN; + } + if (input.Tags !== undefined) { + bodyParams["Tags"] = serializeAws_json1_1TagList(input.Tags, context); + } + return bodyParams; +}; + +const serializeAws_json1_1TimeWindow = ( + input: TimeWindow, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.EndTime !== undefined) { + bodyParams["EndTime"] = Math.round(input.EndTime.getTime() / 1000); + } + if (input.StartTime !== undefined) { + bodyParams["StartTime"] = Math.round(input.StartTime.getTime() / 1000); + } + return bodyParams; +}; + +const serializeAws_json1_1UntagResourceRequest = ( + input: UntagResourceRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ResourceARN !== undefined) { + bodyParams["ResourceARN"] = input.ResourceARN; + } + if (input.TagKeys !== undefined) { + bodyParams["TagKeys"] = serializeAws_json1_1TagKeyList( + input.TagKeys, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateByteMatchSetRequest = ( + input: UpdateByteMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ByteMatchSetId !== undefined) { + bodyParams["ByteMatchSetId"] = input.ByteMatchSetId; + } + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1ByteMatchSetUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateGeoMatchSetRequest = ( + input: UpdateGeoMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.GeoMatchSetId !== undefined) { + bodyParams["GeoMatchSetId"] = input.GeoMatchSetId; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1GeoMatchSetUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateIPSetRequest = ( + input: UpdateIPSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.IPSetId !== undefined) { + bodyParams["IPSetId"] = input.IPSetId; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1IPSetUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateRateBasedRuleRequest = ( + input: UpdateRateBasedRuleRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RateLimit !== undefined) { + bodyParams["RateLimit"] = input.RateLimit; + } + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1RuleUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateRegexMatchSetRequest = ( + input: UpdateRegexMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RegexMatchSetId !== undefined) { + bodyParams["RegexMatchSetId"] = input.RegexMatchSetId; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1RegexMatchSetUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateRegexPatternSetRequest = ( + input: UpdateRegexPatternSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RegexPatternSetId !== undefined) { + bodyParams["RegexPatternSetId"] = input.RegexPatternSetId; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1RegexPatternSetUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateRuleGroupRequest = ( + input: UpdateRuleGroupRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RuleGroupId !== undefined) { + bodyParams["RuleGroupId"] = input.RuleGroupId; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1RuleGroupUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateRuleRequest = ( + input: UpdateRuleRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.RuleId !== undefined) { + bodyParams["RuleId"] = input.RuleId; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1RuleUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateSizeConstraintSetRequest = ( + input: UpdateSizeConstraintSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.SizeConstraintSetId !== undefined) { + bodyParams["SizeConstraintSetId"] = input.SizeConstraintSetId; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1SizeConstraintSetUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateSqlInjectionMatchSetRequest = ( + input: UpdateSqlInjectionMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.SqlInjectionMatchSetId !== undefined) { + bodyParams["SqlInjectionMatchSetId"] = input.SqlInjectionMatchSetId; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1SqlInjectionMatchSetUpdates( + input.Updates, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateWebACLRequest = ( + input: UpdateWebACLRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.DefaultAction !== undefined) { + bodyParams["DefaultAction"] = serializeAws_json1_1WafAction( + input.DefaultAction, + context + ); + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1WebACLUpdates( + input.Updates, + context + ); + } + if (input.WebACLId !== undefined) { + bodyParams["WebACLId"] = input.WebACLId; + } + return bodyParams; +}; + +const serializeAws_json1_1UpdateXssMatchSetRequest = ( + input: UpdateXssMatchSetRequest, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.ChangeToken !== undefined) { + bodyParams["ChangeToken"] = input.ChangeToken; + } + if (input.Updates !== undefined) { + bodyParams["Updates"] = serializeAws_json1_1XssMatchSetUpdates( + input.Updates, + context + ); + } + if (input.XssMatchSetId !== undefined) { + bodyParams["XssMatchSetId"] = input.XssMatchSetId; + } + return bodyParams; +}; + +const serializeAws_json1_1WafAction = ( + input: WafAction, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1WafOverrideAction = ( + input: WafOverrideAction, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Type !== undefined) { + bodyParams["Type"] = input.Type; + } + return bodyParams; +}; + +const serializeAws_json1_1WebACLUpdate = ( + input: WebACLUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.ActivatedRule !== undefined) { + bodyParams["ActivatedRule"] = serializeAws_json1_1ActivatedRule( + input.ActivatedRule, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1WebACLUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1WebACLUpdate(entry, context) + ); +}; + +const serializeAws_json1_1XssMatchSetUpdate = ( + input: XssMatchSetUpdate, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.Action !== undefined) { + bodyParams["Action"] = input.Action; + } + if (input.XssMatchTuple !== undefined) { + bodyParams["XssMatchTuple"] = serializeAws_json1_1XssMatchTuple( + input.XssMatchTuple, + context + ); + } + return bodyParams; +}; + +const serializeAws_json1_1XssMatchSetUpdates = ( + input: Array, + context: __SerdeContext +): any => { + return (input || []).map(entry => + serializeAws_json1_1XssMatchSetUpdate(entry, context) + ); +}; + +const serializeAws_json1_1XssMatchTuple = ( + input: XssMatchTuple, + context: __SerdeContext +): any => { + let bodyParams: any = {}; + if (input.FieldToMatch !== undefined) { + bodyParams["FieldToMatch"] = serializeAws_json1_1FieldToMatch( + input.FieldToMatch, + context + ); + } + if (input.TextTransformation !== undefined) { + bodyParams["TextTransformation"] = input.TextTransformation; + } + return bodyParams; +}; + +const deserializeAws_json1_1AssociateWebACLResponse = ( + output: any, + context: __SerdeContext +): AssociateWebACLResponse => { + let contents: any = { + __type: "AssociateWebACLResponse" + }; + return contents; +}; + +const deserializeAws_json1_1DisassociateWebACLResponse = ( + output: any, + context: __SerdeContext +): DisassociateWebACLResponse => { + let contents: any = { + __type: "DisassociateWebACLResponse" + }; + return contents; +}; + +const deserializeAws_json1_1GetWebACLForResourceResponse = ( + output: any, + context: __SerdeContext +): GetWebACLForResourceResponse => { + let contents: any = { + __type: "GetWebACLForResourceResponse", + WebACLSummary: undefined + }; + if (output.WebACLSummary !== undefined) { + contents.WebACLSummary = deserializeAws_json1_1WebACLSummary( + output.WebACLSummary, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListResourcesForWebACLResponse = ( + output: any, + context: __SerdeContext +): ListResourcesForWebACLResponse => { + let contents: any = { + __type: "ListResourcesForWebACLResponse", + ResourceArns: undefined + }; + if (output.ResourceArns !== undefined) { + contents.ResourceArns = deserializeAws_json1_1ResourceArns( + output.ResourceArns, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ActivatedRule = ( + output: any, + context: __SerdeContext +): ActivatedRule => { + let contents: any = { + __type: "ActivatedRule", + Action: undefined, + ExcludedRules: undefined, + OverrideAction: undefined, + Priority: undefined, + RuleId: undefined, + Type: undefined + }; + if (output.Action !== undefined) { + contents.Action = deserializeAws_json1_1WafAction(output.Action, context); + } + if (output.ExcludedRules !== undefined) { + contents.ExcludedRules = deserializeAws_json1_1ExcludedRules( + output.ExcludedRules, + context + ); + } + if (output.OverrideAction !== undefined) { + contents.OverrideAction = deserializeAws_json1_1WafOverrideAction( + output.OverrideAction, + context + ); + } + if (output.Priority !== undefined) { + contents.Priority = output.Priority; + } + if (output.RuleId !== undefined) { + contents.RuleId = output.RuleId; + } + if (output.Type !== undefined) { + contents.Type = output.Type; + } + return contents; +}; + +const deserializeAws_json1_1ActivatedRules = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1ActivatedRule(entry, context) + ); +}; + +const deserializeAws_json1_1ByteMatchSet = ( + output: any, + context: __SerdeContext +): ByteMatchSet => { + let contents: any = { + __type: "ByteMatchSet", + ByteMatchSetId: undefined, + ByteMatchTuples: undefined, + Name: undefined + }; + if (output.ByteMatchSetId !== undefined) { + contents.ByteMatchSetId = output.ByteMatchSetId; + } + if (output.ByteMatchTuples !== undefined) { + contents.ByteMatchTuples = deserializeAws_json1_1ByteMatchTuples( + output.ByteMatchTuples, + context + ); + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + return contents; +}; + +const deserializeAws_json1_1ByteMatchSetSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1ByteMatchSetSummary(entry, context) + ); +}; + +const deserializeAws_json1_1ByteMatchSetSummary = ( + output: any, + context: __SerdeContext +): ByteMatchSetSummary => { + let contents: any = { + __type: "ByteMatchSetSummary", + ByteMatchSetId: undefined, + Name: undefined + }; + if (output.ByteMatchSetId !== undefined) { + contents.ByteMatchSetId = output.ByteMatchSetId; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + return contents; +}; + +const deserializeAws_json1_1ByteMatchTuple = ( + output: any, + context: __SerdeContext +): ByteMatchTuple => { + let contents: any = { + __type: "ByteMatchTuple", + FieldToMatch: undefined, + PositionalConstraint: undefined, + TargetString: undefined, + TextTransformation: undefined + }; + if (output.FieldToMatch !== undefined) { + contents.FieldToMatch = deserializeAws_json1_1FieldToMatch( + output.FieldToMatch, + context + ); + } + if (output.PositionalConstraint !== undefined) { + contents.PositionalConstraint = output.PositionalConstraint; + } + if (output.TargetString !== undefined) { + contents.TargetString = context.base64Decoder(output.TargetString); + } + if (output.TextTransformation !== undefined) { + contents.TextTransformation = output.TextTransformation; + } + return contents; +}; + +const deserializeAws_json1_1ByteMatchTuples = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1ByteMatchTuple(entry, context) + ); +}; + +const deserializeAws_json1_1CreateByteMatchSetResponse = ( + output: any, + context: __SerdeContext +): CreateByteMatchSetResponse => { + let contents: any = { + __type: "CreateByteMatchSetResponse", + ByteMatchSet: undefined, + ChangeToken: undefined + }; + if (output.ByteMatchSet !== undefined) { + contents.ByteMatchSet = deserializeAws_json1_1ByteMatchSet( + output.ByteMatchSet, + context + ); + } + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1CreateGeoMatchSetResponse = ( + output: any, + context: __SerdeContext +): CreateGeoMatchSetResponse => { + let contents: any = { + __type: "CreateGeoMatchSetResponse", + ChangeToken: undefined, + GeoMatchSet: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.GeoMatchSet !== undefined) { + contents.GeoMatchSet = deserializeAws_json1_1GeoMatchSet( + output.GeoMatchSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1CreateIPSetResponse = ( + output: any, + context: __SerdeContext +): CreateIPSetResponse => { + let contents: any = { + __type: "CreateIPSetResponse", + ChangeToken: undefined, + IPSet: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.IPSet !== undefined) { + contents.IPSet = deserializeAws_json1_1IPSet(output.IPSet, context); + } + return contents; +}; + +const deserializeAws_json1_1CreateRateBasedRuleResponse = ( + output: any, + context: __SerdeContext +): CreateRateBasedRuleResponse => { + let contents: any = { + __type: "CreateRateBasedRuleResponse", + ChangeToken: undefined, + Rule: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.Rule !== undefined) { + contents.Rule = deserializeAws_json1_1RateBasedRule(output.Rule, context); + } + return contents; +}; + +const deserializeAws_json1_1CreateRegexMatchSetResponse = ( + output: any, + context: __SerdeContext +): CreateRegexMatchSetResponse => { + let contents: any = { + __type: "CreateRegexMatchSetResponse", + ChangeToken: undefined, + RegexMatchSet: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.RegexMatchSet !== undefined) { + contents.RegexMatchSet = deserializeAws_json1_1RegexMatchSet( + output.RegexMatchSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1CreateRegexPatternSetResponse = ( + output: any, + context: __SerdeContext +): CreateRegexPatternSetResponse => { + let contents: any = { + __type: "CreateRegexPatternSetResponse", + ChangeToken: undefined, + RegexPatternSet: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.RegexPatternSet !== undefined) { + contents.RegexPatternSet = deserializeAws_json1_1RegexPatternSet( + output.RegexPatternSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1CreateRuleGroupResponse = ( + output: any, + context: __SerdeContext +): CreateRuleGroupResponse => { + let contents: any = { + __type: "CreateRuleGroupResponse", + ChangeToken: undefined, + RuleGroup: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.RuleGroup !== undefined) { + contents.RuleGroup = deserializeAws_json1_1RuleGroup( + output.RuleGroup, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1CreateRuleResponse = ( + output: any, + context: __SerdeContext +): CreateRuleResponse => { + let contents: any = { + __type: "CreateRuleResponse", + ChangeToken: undefined, + Rule: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.Rule !== undefined) { + contents.Rule = deserializeAws_json1_1Rule(output.Rule, context); + } + return contents; +}; + +const deserializeAws_json1_1CreateSizeConstraintSetResponse = ( + output: any, + context: __SerdeContext +): CreateSizeConstraintSetResponse => { + let contents: any = { + __type: "CreateSizeConstraintSetResponse", + ChangeToken: undefined, + SizeConstraintSet: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.SizeConstraintSet !== undefined) { + contents.SizeConstraintSet = deserializeAws_json1_1SizeConstraintSet( + output.SizeConstraintSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1CreateSqlInjectionMatchSetResponse = ( + output: any, + context: __SerdeContext +): CreateSqlInjectionMatchSetResponse => { + let contents: any = { + __type: "CreateSqlInjectionMatchSetResponse", + ChangeToken: undefined, + SqlInjectionMatchSet: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.SqlInjectionMatchSet !== undefined) { + contents.SqlInjectionMatchSet = deserializeAws_json1_1SqlInjectionMatchSet( + output.SqlInjectionMatchSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1CreateWebACLResponse = ( + output: any, + context: __SerdeContext +): CreateWebACLResponse => { + let contents: any = { + __type: "CreateWebACLResponse", + ChangeToken: undefined, + WebACL: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.WebACL !== undefined) { + contents.WebACL = deserializeAws_json1_1WebACL(output.WebACL, context); + } + return contents; +}; + +const deserializeAws_json1_1CreateXssMatchSetResponse = ( + output: any, + context: __SerdeContext +): CreateXssMatchSetResponse => { + let contents: any = { + __type: "CreateXssMatchSetResponse", + ChangeToken: undefined, + XssMatchSet: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + if (output.XssMatchSet !== undefined) { + contents.XssMatchSet = deserializeAws_json1_1XssMatchSet( + output.XssMatchSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1DeleteByteMatchSetResponse = ( + output: any, + context: __SerdeContext +): DeleteByteMatchSetResponse => { + let contents: any = { + __type: "DeleteByteMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteGeoMatchSetResponse = ( + output: any, + context: __SerdeContext +): DeleteGeoMatchSetResponse => { + let contents: any = { + __type: "DeleteGeoMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteIPSetResponse = ( + output: any, + context: __SerdeContext +): DeleteIPSetResponse => { + let contents: any = { + __type: "DeleteIPSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteLoggingConfigurationResponse = ( + output: any, + context: __SerdeContext +): DeleteLoggingConfigurationResponse => { + let contents: any = { + __type: "DeleteLoggingConfigurationResponse" + }; + return contents; +}; + +const deserializeAws_json1_1DeletePermissionPolicyResponse = ( + output: any, + context: __SerdeContext +): DeletePermissionPolicyResponse => { + let contents: any = { + __type: "DeletePermissionPolicyResponse" + }; + return contents; +}; + +const deserializeAws_json1_1DeleteRateBasedRuleResponse = ( + output: any, + context: __SerdeContext +): DeleteRateBasedRuleResponse => { + let contents: any = { + __type: "DeleteRateBasedRuleResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteRegexMatchSetResponse = ( + output: any, + context: __SerdeContext +): DeleteRegexMatchSetResponse => { + let contents: any = { + __type: "DeleteRegexMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteRegexPatternSetResponse = ( + output: any, + context: __SerdeContext +): DeleteRegexPatternSetResponse => { + let contents: any = { + __type: "DeleteRegexPatternSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteRuleGroupResponse = ( + output: any, + context: __SerdeContext +): DeleteRuleGroupResponse => { + let contents: any = { + __type: "DeleteRuleGroupResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteRuleResponse = ( + output: any, + context: __SerdeContext +): DeleteRuleResponse => { + let contents: any = { + __type: "DeleteRuleResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteSizeConstraintSetResponse = ( + output: any, + context: __SerdeContext +): DeleteSizeConstraintSetResponse => { + let contents: any = { + __type: "DeleteSizeConstraintSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteSqlInjectionMatchSetResponse = ( + output: any, + context: __SerdeContext +): DeleteSqlInjectionMatchSetResponse => { + let contents: any = { + __type: "DeleteSqlInjectionMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteWebACLResponse = ( + output: any, + context: __SerdeContext +): DeleteWebACLResponse => { + let contents: any = { + __type: "DeleteWebACLResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1DeleteXssMatchSetResponse = ( + output: any, + context: __SerdeContext +): DeleteXssMatchSetResponse => { + let contents: any = { + __type: "DeleteXssMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1ExcludedRule = ( + output: any, + context: __SerdeContext +): ExcludedRule => { + let contents: any = { + __type: "ExcludedRule", + RuleId: undefined + }; + if (output.RuleId !== undefined) { + contents.RuleId = output.RuleId; + } + return contents; +}; + +const deserializeAws_json1_1ExcludedRules = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1ExcludedRule(entry, context) + ); +}; + +const deserializeAws_json1_1FieldToMatch = ( + output: any, + context: __SerdeContext +): FieldToMatch => { + let contents: any = { + __type: "FieldToMatch", + Data: undefined, + Type: undefined + }; + if (output.Data !== undefined) { + contents.Data = output.Data; + } + if (output.Type !== undefined) { + contents.Type = output.Type; + } + return contents; +}; + +const deserializeAws_json1_1GeoMatchConstraint = ( + output: any, + context: __SerdeContext +): GeoMatchConstraint => { + let contents: any = { + __type: "GeoMatchConstraint", + Type: undefined, + Value: undefined + }; + if (output.Type !== undefined) { + contents.Type = output.Type; + } + if (output.Value !== undefined) { + contents.Value = output.Value; + } + return contents; +}; + +const deserializeAws_json1_1GeoMatchConstraints = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1GeoMatchConstraint(entry, context) + ); +}; + +const deserializeAws_json1_1GeoMatchSet = ( + output: any, + context: __SerdeContext +): GeoMatchSet => { + let contents: any = { + __type: "GeoMatchSet", + GeoMatchConstraints: undefined, + GeoMatchSetId: undefined, + Name: undefined + }; + if (output.GeoMatchConstraints !== undefined) { + contents.GeoMatchConstraints = deserializeAws_json1_1GeoMatchConstraints( + output.GeoMatchConstraints, + context + ); + } + if (output.GeoMatchSetId !== undefined) { + contents.GeoMatchSetId = output.GeoMatchSetId; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + return contents; +}; + +const deserializeAws_json1_1GeoMatchSetSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1GeoMatchSetSummary(entry, context) + ); +}; + +const deserializeAws_json1_1GeoMatchSetSummary = ( + output: any, + context: __SerdeContext +): GeoMatchSetSummary => { + let contents: any = { + __type: "GeoMatchSetSummary", + GeoMatchSetId: undefined, + Name: undefined + }; + if (output.GeoMatchSetId !== undefined) { + contents.GeoMatchSetId = output.GeoMatchSetId; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + return contents; +}; + +const deserializeAws_json1_1GetByteMatchSetResponse = ( + output: any, + context: __SerdeContext +): GetByteMatchSetResponse => { + let contents: any = { + __type: "GetByteMatchSetResponse", + ByteMatchSet: undefined + }; + if (output.ByteMatchSet !== undefined) { + contents.ByteMatchSet = deserializeAws_json1_1ByteMatchSet( + output.ByteMatchSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetChangeTokenResponse = ( + output: any, + context: __SerdeContext +): GetChangeTokenResponse => { + let contents: any = { + __type: "GetChangeTokenResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1GetChangeTokenStatusResponse = ( + output: any, + context: __SerdeContext +): GetChangeTokenStatusResponse => { + let contents: any = { + __type: "GetChangeTokenStatusResponse", + ChangeTokenStatus: undefined + }; + if (output.ChangeTokenStatus !== undefined) { + contents.ChangeTokenStatus = output.ChangeTokenStatus; + } + return contents; +}; + +const deserializeAws_json1_1GetGeoMatchSetResponse = ( + output: any, + context: __SerdeContext +): GetGeoMatchSetResponse => { + let contents: any = { + __type: "GetGeoMatchSetResponse", + GeoMatchSet: undefined + }; + if (output.GeoMatchSet !== undefined) { + contents.GeoMatchSet = deserializeAws_json1_1GeoMatchSet( + output.GeoMatchSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetIPSetResponse = ( + output: any, + context: __SerdeContext +): GetIPSetResponse => { + let contents: any = { + __type: "GetIPSetResponse", + IPSet: undefined + }; + if (output.IPSet !== undefined) { + contents.IPSet = deserializeAws_json1_1IPSet(output.IPSet, context); + } + return contents; +}; + +const deserializeAws_json1_1GetLoggingConfigurationResponse = ( + output: any, + context: __SerdeContext +): GetLoggingConfigurationResponse => { + let contents: any = { + __type: "GetLoggingConfigurationResponse", + LoggingConfiguration: undefined + }; + if (output.LoggingConfiguration !== undefined) { + contents.LoggingConfiguration = deserializeAws_json1_1LoggingConfiguration( + output.LoggingConfiguration, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetPermissionPolicyResponse = ( + output: any, + context: __SerdeContext +): GetPermissionPolicyResponse => { + let contents: any = { + __type: "GetPermissionPolicyResponse", + Policy: undefined + }; + if (output.Policy !== undefined) { + contents.Policy = output.Policy; + } + return contents; +}; + +const deserializeAws_json1_1GetRateBasedRuleManagedKeysResponse = ( + output: any, + context: __SerdeContext +): GetRateBasedRuleManagedKeysResponse => { + let contents: any = { + __type: "GetRateBasedRuleManagedKeysResponse", + ManagedKeys: undefined, + NextMarker: undefined + }; + if (output.ManagedKeys !== undefined) { + contents.ManagedKeys = deserializeAws_json1_1ManagedKeys( + output.ManagedKeys, + context + ); + } + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + return contents; +}; + +const deserializeAws_json1_1GetRateBasedRuleResponse = ( + output: any, + context: __SerdeContext +): GetRateBasedRuleResponse => { + let contents: any = { + __type: "GetRateBasedRuleResponse", + Rule: undefined + }; + if (output.Rule !== undefined) { + contents.Rule = deserializeAws_json1_1RateBasedRule(output.Rule, context); + } + return contents; +}; + +const deserializeAws_json1_1GetRegexMatchSetResponse = ( + output: any, + context: __SerdeContext +): GetRegexMatchSetResponse => { + let contents: any = { + __type: "GetRegexMatchSetResponse", + RegexMatchSet: undefined + }; + if (output.RegexMatchSet !== undefined) { + contents.RegexMatchSet = deserializeAws_json1_1RegexMatchSet( + output.RegexMatchSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetRegexPatternSetResponse = ( + output: any, + context: __SerdeContext +): GetRegexPatternSetResponse => { + let contents: any = { + __type: "GetRegexPatternSetResponse", + RegexPatternSet: undefined + }; + if (output.RegexPatternSet !== undefined) { + contents.RegexPatternSet = deserializeAws_json1_1RegexPatternSet( + output.RegexPatternSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetRuleGroupResponse = ( + output: any, + context: __SerdeContext +): GetRuleGroupResponse => { + let contents: any = { + __type: "GetRuleGroupResponse", + RuleGroup: undefined + }; + if (output.RuleGroup !== undefined) { + contents.RuleGroup = deserializeAws_json1_1RuleGroup( + output.RuleGroup, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetRuleResponse = ( + output: any, + context: __SerdeContext +): GetRuleResponse => { + let contents: any = { + __type: "GetRuleResponse", + Rule: undefined + }; + if (output.Rule !== undefined) { + contents.Rule = deserializeAws_json1_1Rule(output.Rule, context); + } + return contents; +}; + +const deserializeAws_json1_1GetSampledRequestsResponse = ( + output: any, + context: __SerdeContext +): GetSampledRequestsResponse => { + let contents: any = { + __type: "GetSampledRequestsResponse", + PopulationSize: undefined, + SampledRequests: undefined, + TimeWindow: undefined + }; + if (output.PopulationSize !== undefined) { + contents.PopulationSize = output.PopulationSize; + } + if (output.SampledRequests !== undefined) { + contents.SampledRequests = deserializeAws_json1_1SampledHTTPRequests( + output.SampledRequests, + context + ); + } + if (output.TimeWindow !== undefined) { + contents.TimeWindow = deserializeAws_json1_1TimeWindow( + output.TimeWindow, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetSizeConstraintSetResponse = ( + output: any, + context: __SerdeContext +): GetSizeConstraintSetResponse => { + let contents: any = { + __type: "GetSizeConstraintSetResponse", + SizeConstraintSet: undefined + }; + if (output.SizeConstraintSet !== undefined) { + contents.SizeConstraintSet = deserializeAws_json1_1SizeConstraintSet( + output.SizeConstraintSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetSqlInjectionMatchSetResponse = ( + output: any, + context: __SerdeContext +): GetSqlInjectionMatchSetResponse => { + let contents: any = { + __type: "GetSqlInjectionMatchSetResponse", + SqlInjectionMatchSet: undefined + }; + if (output.SqlInjectionMatchSet !== undefined) { + contents.SqlInjectionMatchSet = deserializeAws_json1_1SqlInjectionMatchSet( + output.SqlInjectionMatchSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1GetWebACLResponse = ( + output: any, + context: __SerdeContext +): GetWebACLResponse => { + let contents: any = { + __type: "GetWebACLResponse", + WebACL: undefined + }; + if (output.WebACL !== undefined) { + contents.WebACL = deserializeAws_json1_1WebACL(output.WebACL, context); + } + return contents; +}; + +const deserializeAws_json1_1GetXssMatchSetResponse = ( + output: any, + context: __SerdeContext +): GetXssMatchSetResponse => { + let contents: any = { + __type: "GetXssMatchSetResponse", + XssMatchSet: undefined + }; + if (output.XssMatchSet !== undefined) { + contents.XssMatchSet = deserializeAws_json1_1XssMatchSet( + output.XssMatchSet, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1HTTPHeader = ( + output: any, + context: __SerdeContext +): HTTPHeader => { + let contents: any = { + __type: "HTTPHeader", + Name: undefined, + Value: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.Value !== undefined) { + contents.Value = output.Value; + } + return contents; +}; + +const deserializeAws_json1_1HTTPHeaders = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1HTTPHeader(entry, context) + ); +}; + +const deserializeAws_json1_1HTTPRequest = ( + output: any, + context: __SerdeContext +): HTTPRequest => { + let contents: any = { + __type: "HTTPRequest", + ClientIP: undefined, + Country: undefined, + HTTPVersion: undefined, + Headers: undefined, + Method: undefined, + URI: undefined + }; + if (output.ClientIP !== undefined) { + contents.ClientIP = output.ClientIP; + } + if (output.Country !== undefined) { + contents.Country = output.Country; + } + if (output.HTTPVersion !== undefined) { + contents.HTTPVersion = output.HTTPVersion; + } + if (output.Headers !== undefined) { + contents.Headers = deserializeAws_json1_1HTTPHeaders( + output.Headers, + context + ); + } + if (output.Method !== undefined) { + contents.Method = output.Method; + } + if (output.URI !== undefined) { + contents.URI = output.URI; + } + return contents; +}; + +const deserializeAws_json1_1IPSet = ( + output: any, + context: __SerdeContext +): IPSet => { + let contents: any = { + __type: "IPSet", + IPSetDescriptors: undefined, + IPSetId: undefined, + Name: undefined + }; + if (output.IPSetDescriptors !== undefined) { + contents.IPSetDescriptors = deserializeAws_json1_1IPSetDescriptors( + output.IPSetDescriptors, + context + ); + } + if (output.IPSetId !== undefined) { + contents.IPSetId = output.IPSetId; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + return contents; +}; + +const deserializeAws_json1_1IPSetDescriptor = ( + output: any, + context: __SerdeContext +): IPSetDescriptor => { + let contents: any = { + __type: "IPSetDescriptor", + Type: undefined, + Value: undefined + }; + if (output.Type !== undefined) { + contents.Type = output.Type; + } + if (output.Value !== undefined) { + contents.Value = output.Value; + } + return contents; +}; + +const deserializeAws_json1_1IPSetDescriptors = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1IPSetDescriptor(entry, context) + ); +}; + +const deserializeAws_json1_1IPSetSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1IPSetSummary(entry, context) + ); +}; + +const deserializeAws_json1_1IPSetSummary = ( + output: any, + context: __SerdeContext +): IPSetSummary => { + let contents: any = { + __type: "IPSetSummary", + IPSetId: undefined, + Name: undefined + }; + if (output.IPSetId !== undefined) { + contents.IPSetId = output.IPSetId; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + return contents; +}; + +const deserializeAws_json1_1ListActivatedRulesInRuleGroupResponse = ( + output: any, + context: __SerdeContext +): ListActivatedRulesInRuleGroupResponse => { + let contents: any = { + __type: "ListActivatedRulesInRuleGroupResponse", + ActivatedRules: undefined, + NextMarker: undefined + }; + if (output.ActivatedRules !== undefined) { + contents.ActivatedRules = deserializeAws_json1_1ActivatedRules( + output.ActivatedRules, + context + ); + } + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + return contents; +}; + +const deserializeAws_json1_1ListByteMatchSetsResponse = ( + output: any, + context: __SerdeContext +): ListByteMatchSetsResponse => { + let contents: any = { + __type: "ListByteMatchSetsResponse", + ByteMatchSets: undefined, + NextMarker: undefined + }; + if (output.ByteMatchSets !== undefined) { + contents.ByteMatchSets = deserializeAws_json1_1ByteMatchSetSummaries( + output.ByteMatchSets, + context + ); + } + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + return contents; +}; + +const deserializeAws_json1_1ListGeoMatchSetsResponse = ( + output: any, + context: __SerdeContext +): ListGeoMatchSetsResponse => { + let contents: any = { + __type: "ListGeoMatchSetsResponse", + GeoMatchSets: undefined, + NextMarker: undefined + }; + if (output.GeoMatchSets !== undefined) { + contents.GeoMatchSets = deserializeAws_json1_1GeoMatchSetSummaries( + output.GeoMatchSets, + context + ); + } + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + return contents; +}; + +const deserializeAws_json1_1ListIPSetsResponse = ( + output: any, + context: __SerdeContext +): ListIPSetsResponse => { + let contents: any = { + __type: "ListIPSetsResponse", + IPSets: undefined, + NextMarker: undefined + }; + if (output.IPSets !== undefined) { + contents.IPSets = deserializeAws_json1_1IPSetSummaries( + output.IPSets, + context + ); + } + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + return contents; +}; + +const deserializeAws_json1_1ListLoggingConfigurationsResponse = ( + output: any, + context: __SerdeContext +): ListLoggingConfigurationsResponse => { + let contents: any = { + __type: "ListLoggingConfigurationsResponse", + LoggingConfigurations: undefined, + NextMarker: undefined + }; + if (output.LoggingConfigurations !== undefined) { + contents.LoggingConfigurations = deserializeAws_json1_1LoggingConfigurations( + output.LoggingConfigurations, + context + ); + } + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + return contents; +}; + +const deserializeAws_json1_1ListRateBasedRulesResponse = ( + output: any, + context: __SerdeContext +): ListRateBasedRulesResponse => { + let contents: any = { + __type: "ListRateBasedRulesResponse", + NextMarker: undefined, + Rules: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.Rules !== undefined) { + contents.Rules = deserializeAws_json1_1RuleSummaries(output.Rules, context); + } + return contents; +}; + +const deserializeAws_json1_1ListRegexMatchSetsResponse = ( + output: any, + context: __SerdeContext +): ListRegexMatchSetsResponse => { + let contents: any = { + __type: "ListRegexMatchSetsResponse", + NextMarker: undefined, + RegexMatchSets: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.RegexMatchSets !== undefined) { + contents.RegexMatchSets = deserializeAws_json1_1RegexMatchSetSummaries( + output.RegexMatchSets, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListRegexPatternSetsResponse = ( + output: any, + context: __SerdeContext +): ListRegexPatternSetsResponse => { + let contents: any = { + __type: "ListRegexPatternSetsResponse", + NextMarker: undefined, + RegexPatternSets: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.RegexPatternSets !== undefined) { + contents.RegexPatternSets = deserializeAws_json1_1RegexPatternSetSummaries( + output.RegexPatternSets, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListRuleGroupsResponse = ( + output: any, + context: __SerdeContext +): ListRuleGroupsResponse => { + let contents: any = { + __type: "ListRuleGroupsResponse", + NextMarker: undefined, + RuleGroups: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.RuleGroups !== undefined) { + contents.RuleGroups = deserializeAws_json1_1RuleGroupSummaries( + output.RuleGroups, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListRulesResponse = ( + output: any, + context: __SerdeContext +): ListRulesResponse => { + let contents: any = { + __type: "ListRulesResponse", + NextMarker: undefined, + Rules: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.Rules !== undefined) { + contents.Rules = deserializeAws_json1_1RuleSummaries(output.Rules, context); + } + return contents; +}; + +const deserializeAws_json1_1ListSizeConstraintSetsResponse = ( + output: any, + context: __SerdeContext +): ListSizeConstraintSetsResponse => { + let contents: any = { + __type: "ListSizeConstraintSetsResponse", + NextMarker: undefined, + SizeConstraintSets: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.SizeConstraintSets !== undefined) { + contents.SizeConstraintSets = deserializeAws_json1_1SizeConstraintSetSummaries( + output.SizeConstraintSets, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListSqlInjectionMatchSetsResponse = ( + output: any, + context: __SerdeContext +): ListSqlInjectionMatchSetsResponse => { + let contents: any = { + __type: "ListSqlInjectionMatchSetsResponse", + NextMarker: undefined, + SqlInjectionMatchSets: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.SqlInjectionMatchSets !== undefined) { + contents.SqlInjectionMatchSets = deserializeAws_json1_1SqlInjectionMatchSetSummaries( + output.SqlInjectionMatchSets, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListSubscribedRuleGroupsResponse = ( + output: any, + context: __SerdeContext +): ListSubscribedRuleGroupsResponse => { + let contents: any = { + __type: "ListSubscribedRuleGroupsResponse", + NextMarker: undefined, + RuleGroups: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.RuleGroups !== undefined) { + contents.RuleGroups = deserializeAws_json1_1SubscribedRuleGroupSummaries( + output.RuleGroups, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListTagsForResourceResponse = ( + output: any, + context: __SerdeContext +): ListTagsForResourceResponse => { + let contents: any = { + __type: "ListTagsForResourceResponse", + NextMarker: undefined, + TagInfoForResource: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.TagInfoForResource !== undefined) { + contents.TagInfoForResource = deserializeAws_json1_1TagInfoForResource( + output.TagInfoForResource, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListWebACLsResponse = ( + output: any, + context: __SerdeContext +): ListWebACLsResponse => { + let contents: any = { + __type: "ListWebACLsResponse", + NextMarker: undefined, + WebACLs: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.WebACLs !== undefined) { + contents.WebACLs = deserializeAws_json1_1WebACLSummaries( + output.WebACLs, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1ListXssMatchSetsResponse = ( + output: any, + context: __SerdeContext +): ListXssMatchSetsResponse => { + let contents: any = { + __type: "ListXssMatchSetsResponse", + NextMarker: undefined, + XssMatchSets: undefined + }; + if (output.NextMarker !== undefined) { + contents.NextMarker = output.NextMarker; + } + if (output.XssMatchSets !== undefined) { + contents.XssMatchSets = deserializeAws_json1_1XssMatchSetSummaries( + output.XssMatchSets, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1LogDestinationConfigs = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_json1_1LoggingConfiguration = ( + output: any, + context: __SerdeContext +): LoggingConfiguration => { + let contents: any = { + __type: "LoggingConfiguration", + LogDestinationConfigs: undefined, + RedactedFields: undefined, + ResourceArn: undefined + }; + if (output.LogDestinationConfigs !== undefined) { + contents.LogDestinationConfigs = deserializeAws_json1_1LogDestinationConfigs( + output.LogDestinationConfigs, + context + ); + } + if (output.RedactedFields !== undefined) { + contents.RedactedFields = deserializeAws_json1_1RedactedFields( + output.RedactedFields, + context + ); + } + if (output.ResourceArn !== undefined) { + contents.ResourceArn = output.ResourceArn; + } + return contents; +}; + +const deserializeAws_json1_1LoggingConfigurations = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1LoggingConfiguration(entry, context) + ); +}; + +const deserializeAws_json1_1ManagedKeys = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_json1_1Predicate = ( + output: any, + context: __SerdeContext +): Predicate => { + let contents: any = { + __type: "Predicate", + DataId: undefined, + Negated: undefined, + Type: undefined + }; + if (output.DataId !== undefined) { + contents.DataId = output.DataId; + } + if (output.Negated !== undefined) { + contents.Negated = output.Negated; + } + if (output.Type !== undefined) { + contents.Type = output.Type; + } + return contents; +}; + +const deserializeAws_json1_1Predicates = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1Predicate(entry, context) + ); +}; + +const deserializeAws_json1_1PutLoggingConfigurationResponse = ( + output: any, + context: __SerdeContext +): PutLoggingConfigurationResponse => { + let contents: any = { + __type: "PutLoggingConfigurationResponse", + LoggingConfiguration: undefined + }; + if (output.LoggingConfiguration !== undefined) { + contents.LoggingConfiguration = deserializeAws_json1_1LoggingConfiguration( + output.LoggingConfiguration, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1PutPermissionPolicyResponse = ( + output: any, + context: __SerdeContext +): PutPermissionPolicyResponse => { + let contents: any = { + __type: "PutPermissionPolicyResponse" + }; + return contents; +}; + +const deserializeAws_json1_1RateBasedRule = ( + output: any, + context: __SerdeContext +): RateBasedRule => { + let contents: any = { + __type: "RateBasedRule", + MatchPredicates: undefined, + MetricName: undefined, + Name: undefined, + RateKey: undefined, + RateLimit: undefined, + RuleId: undefined + }; + if (output.MatchPredicates !== undefined) { + contents.MatchPredicates = deserializeAws_json1_1Predicates( + output.MatchPredicates, + context + ); + } + if (output.MetricName !== undefined) { + contents.MetricName = output.MetricName; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.RateKey !== undefined) { + contents.RateKey = output.RateKey; + } + if (output.RateLimit !== undefined) { + contents.RateLimit = output.RateLimit; + } + if (output.RuleId !== undefined) { + contents.RuleId = output.RuleId; + } + return contents; +}; + +const deserializeAws_json1_1RedactedFields = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1FieldToMatch(entry, context) + ); +}; + +const deserializeAws_json1_1RegexMatchSet = ( + output: any, + context: __SerdeContext +): RegexMatchSet => { + let contents: any = { + __type: "RegexMatchSet", + Name: undefined, + RegexMatchSetId: undefined, + RegexMatchTuples: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.RegexMatchSetId !== undefined) { + contents.RegexMatchSetId = output.RegexMatchSetId; + } + if (output.RegexMatchTuples !== undefined) { + contents.RegexMatchTuples = deserializeAws_json1_1RegexMatchTuples( + output.RegexMatchTuples, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1RegexMatchSetSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1RegexMatchSetSummary(entry, context) + ); +}; + +const deserializeAws_json1_1RegexMatchSetSummary = ( + output: any, + context: __SerdeContext +): RegexMatchSetSummary => { + let contents: any = { + __type: "RegexMatchSetSummary", + Name: undefined, + RegexMatchSetId: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.RegexMatchSetId !== undefined) { + contents.RegexMatchSetId = output.RegexMatchSetId; + } + return contents; +}; + +const deserializeAws_json1_1RegexMatchTuple = ( + output: any, + context: __SerdeContext +): RegexMatchTuple => { + let contents: any = { + __type: "RegexMatchTuple", + FieldToMatch: undefined, + RegexPatternSetId: undefined, + TextTransformation: undefined + }; + if (output.FieldToMatch !== undefined) { + contents.FieldToMatch = deserializeAws_json1_1FieldToMatch( + output.FieldToMatch, + context + ); + } + if (output.RegexPatternSetId !== undefined) { + contents.RegexPatternSetId = output.RegexPatternSetId; + } + if (output.TextTransformation !== undefined) { + contents.TextTransformation = output.TextTransformation; + } + return contents; +}; + +const deserializeAws_json1_1RegexMatchTuples = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1RegexMatchTuple(entry, context) + ); +}; + +const deserializeAws_json1_1RegexPatternSet = ( + output: any, + context: __SerdeContext +): RegexPatternSet => { + let contents: any = { + __type: "RegexPatternSet", + Name: undefined, + RegexPatternSetId: undefined, + RegexPatternStrings: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.RegexPatternSetId !== undefined) { + contents.RegexPatternSetId = output.RegexPatternSetId; + } + if (output.RegexPatternStrings !== undefined) { + contents.RegexPatternStrings = deserializeAws_json1_1RegexPatternStrings( + output.RegexPatternStrings, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1RegexPatternSetSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1RegexPatternSetSummary(entry, context) + ); +}; + +const deserializeAws_json1_1RegexPatternSetSummary = ( + output: any, + context: __SerdeContext +): RegexPatternSetSummary => { + let contents: any = { + __type: "RegexPatternSetSummary", + Name: undefined, + RegexPatternSetId: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.RegexPatternSetId !== undefined) { + contents.RegexPatternSetId = output.RegexPatternSetId; + } + return contents; +}; + +const deserializeAws_json1_1RegexPatternStrings = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_json1_1ResourceArns = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => entry); +}; + +const deserializeAws_json1_1Rule = ( + output: any, + context: __SerdeContext +): Rule => { + let contents: any = { + __type: "Rule", + MetricName: undefined, + Name: undefined, + Predicates: undefined, + RuleId: undefined + }; + if (output.MetricName !== undefined) { + contents.MetricName = output.MetricName; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.Predicates !== undefined) { + contents.Predicates = deserializeAws_json1_1Predicates( + output.Predicates, + context + ); + } + if (output.RuleId !== undefined) { + contents.RuleId = output.RuleId; + } + return contents; +}; + +const deserializeAws_json1_1RuleGroup = ( + output: any, + context: __SerdeContext +): RuleGroup => { + let contents: any = { + __type: "RuleGroup", + MetricName: undefined, + Name: undefined, + RuleGroupId: undefined + }; + if (output.MetricName !== undefined) { + contents.MetricName = output.MetricName; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.RuleGroupId !== undefined) { + contents.RuleGroupId = output.RuleGroupId; + } + return contents; +}; + +const deserializeAws_json1_1RuleGroupSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1RuleGroupSummary(entry, context) + ); +}; + +const deserializeAws_json1_1RuleGroupSummary = ( + output: any, + context: __SerdeContext +): RuleGroupSummary => { + let contents: any = { + __type: "RuleGroupSummary", + Name: undefined, + RuleGroupId: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.RuleGroupId !== undefined) { + contents.RuleGroupId = output.RuleGroupId; + } + return contents; +}; + +const deserializeAws_json1_1RuleSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1RuleSummary(entry, context) + ); +}; + +const deserializeAws_json1_1RuleSummary = ( + output: any, + context: __SerdeContext +): RuleSummary => { + let contents: any = { + __type: "RuleSummary", + Name: undefined, + RuleId: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.RuleId !== undefined) { + contents.RuleId = output.RuleId; + } + return contents; +}; + +const deserializeAws_json1_1SampledHTTPRequest = ( + output: any, + context: __SerdeContext +): SampledHTTPRequest => { + let contents: any = { + __type: "SampledHTTPRequest", + Action: undefined, + Request: undefined, + RuleWithinRuleGroup: undefined, + Timestamp: undefined, + Weight: undefined + }; + if (output.Action !== undefined) { + contents.Action = output.Action; + } + if (output.Request !== undefined) { + contents.Request = deserializeAws_json1_1HTTPRequest( + output.Request, + context + ); + } + if (output.RuleWithinRuleGroup !== undefined) { + contents.RuleWithinRuleGroup = output.RuleWithinRuleGroup; + } + if (output.Timestamp !== undefined) { + contents.Timestamp = new Date( + output.Timestamp % 1 != 0 + ? Math.round(output.Timestamp * 1000) + : output.Timestamp + ); + } + if (output.Weight !== undefined) { + contents.Weight = output.Weight; + } + return contents; +}; + +const deserializeAws_json1_1SampledHTTPRequests = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1SampledHTTPRequest(entry, context) + ); +}; + +const deserializeAws_json1_1SizeConstraint = ( + output: any, + context: __SerdeContext +): SizeConstraint => { + let contents: any = { + __type: "SizeConstraint", + ComparisonOperator: undefined, + FieldToMatch: undefined, + Size: undefined, + TextTransformation: undefined + }; + if (output.ComparisonOperator !== undefined) { + contents.ComparisonOperator = output.ComparisonOperator; + } + if (output.FieldToMatch !== undefined) { + contents.FieldToMatch = deserializeAws_json1_1FieldToMatch( + output.FieldToMatch, + context + ); + } + if (output.Size !== undefined) { + contents.Size = output.Size; + } + if (output.TextTransformation !== undefined) { + contents.TextTransformation = output.TextTransformation; + } + return contents; +}; + +const deserializeAws_json1_1SizeConstraintSet = ( + output: any, + context: __SerdeContext +): SizeConstraintSet => { + let contents: any = { + __type: "SizeConstraintSet", + Name: undefined, + SizeConstraintSetId: undefined, + SizeConstraints: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.SizeConstraintSetId !== undefined) { + contents.SizeConstraintSetId = output.SizeConstraintSetId; + } + if (output.SizeConstraints !== undefined) { + contents.SizeConstraints = deserializeAws_json1_1SizeConstraints( + output.SizeConstraints, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1SizeConstraintSetSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1SizeConstraintSetSummary(entry, context) + ); +}; + +const deserializeAws_json1_1SizeConstraintSetSummary = ( + output: any, + context: __SerdeContext +): SizeConstraintSetSummary => { + let contents: any = { + __type: "SizeConstraintSetSummary", + Name: undefined, + SizeConstraintSetId: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.SizeConstraintSetId !== undefined) { + contents.SizeConstraintSetId = output.SizeConstraintSetId; + } + return contents; +}; + +const deserializeAws_json1_1SizeConstraints = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1SizeConstraint(entry, context) + ); +}; + +const deserializeAws_json1_1SqlInjectionMatchSet = ( + output: any, + context: __SerdeContext +): SqlInjectionMatchSet => { + let contents: any = { + __type: "SqlInjectionMatchSet", + Name: undefined, + SqlInjectionMatchSetId: undefined, + SqlInjectionMatchTuples: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.SqlInjectionMatchSetId !== undefined) { + contents.SqlInjectionMatchSetId = output.SqlInjectionMatchSetId; + } + if (output.SqlInjectionMatchTuples !== undefined) { + contents.SqlInjectionMatchTuples = deserializeAws_json1_1SqlInjectionMatchTuples( + output.SqlInjectionMatchTuples, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1SqlInjectionMatchSetSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1SqlInjectionMatchSetSummary(entry, context) + ); +}; + +const deserializeAws_json1_1SqlInjectionMatchSetSummary = ( + output: any, + context: __SerdeContext +): SqlInjectionMatchSetSummary => { + let contents: any = { + __type: "SqlInjectionMatchSetSummary", + Name: undefined, + SqlInjectionMatchSetId: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.SqlInjectionMatchSetId !== undefined) { + contents.SqlInjectionMatchSetId = output.SqlInjectionMatchSetId; + } + return contents; +}; + +const deserializeAws_json1_1SqlInjectionMatchTuple = ( + output: any, + context: __SerdeContext +): SqlInjectionMatchTuple => { + let contents: any = { + __type: "SqlInjectionMatchTuple", + FieldToMatch: undefined, + TextTransformation: undefined + }; + if (output.FieldToMatch !== undefined) { + contents.FieldToMatch = deserializeAws_json1_1FieldToMatch( + output.FieldToMatch, + context + ); + } + if (output.TextTransformation !== undefined) { + contents.TextTransformation = output.TextTransformation; + } + return contents; +}; + +const deserializeAws_json1_1SqlInjectionMatchTuples = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1SqlInjectionMatchTuple(entry, context) + ); +}; + +const deserializeAws_json1_1SubscribedRuleGroupSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1SubscribedRuleGroupSummary(entry, context) + ); +}; + +const deserializeAws_json1_1SubscribedRuleGroupSummary = ( + output: any, + context: __SerdeContext +): SubscribedRuleGroupSummary => { + let contents: any = { + __type: "SubscribedRuleGroupSummary", + MetricName: undefined, + Name: undefined, + RuleGroupId: undefined + }; + if (output.MetricName !== undefined) { + contents.MetricName = output.MetricName; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.RuleGroupId !== undefined) { + contents.RuleGroupId = output.RuleGroupId; + } + return contents; +}; + +const deserializeAws_json1_1Tag = ( + output: any, + context: __SerdeContext +): Tag => { + let contents: any = { + __type: "Tag", + Key: undefined, + Value: undefined + }; + if (output.Key !== undefined) { + contents.Key = output.Key; + } + if (output.Value !== undefined) { + contents.Value = output.Value; + } + return contents; +}; + +const deserializeAws_json1_1TagInfoForResource = ( + output: any, + context: __SerdeContext +): TagInfoForResource => { + let contents: any = { + __type: "TagInfoForResource", + ResourceARN: undefined, + TagList: undefined + }; + if (output.ResourceARN !== undefined) { + contents.ResourceARN = output.ResourceARN; + } + if (output.TagList !== undefined) { + contents.TagList = deserializeAws_json1_1TagList(output.TagList, context); + } + return contents; +}; + +const deserializeAws_json1_1TagList = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1Tag(entry, context) + ); +}; + +const deserializeAws_json1_1TagResourceResponse = ( + output: any, + context: __SerdeContext +): TagResourceResponse => { + let contents: any = { + __type: "TagResourceResponse" + }; + return contents; +}; + +const deserializeAws_json1_1TimeWindow = ( + output: any, + context: __SerdeContext +): TimeWindow => { + let contents: any = { + __type: "TimeWindow", + EndTime: undefined, + StartTime: undefined + }; + if (output.EndTime !== undefined) { + contents.EndTime = new Date( + output.EndTime % 1 != 0 + ? Math.round(output.EndTime * 1000) + : output.EndTime + ); + } + if (output.StartTime !== undefined) { + contents.StartTime = new Date( + output.StartTime % 1 != 0 + ? Math.round(output.StartTime * 1000) + : output.StartTime + ); + } + return contents; +}; + +const deserializeAws_json1_1UntagResourceResponse = ( + output: any, + context: __SerdeContext +): UntagResourceResponse => { + let contents: any = { + __type: "UntagResourceResponse" + }; + return contents; +}; + +const deserializeAws_json1_1UpdateByteMatchSetResponse = ( + output: any, + context: __SerdeContext +): UpdateByteMatchSetResponse => { + let contents: any = { + __type: "UpdateByteMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateGeoMatchSetResponse = ( + output: any, + context: __SerdeContext +): UpdateGeoMatchSetResponse => { + let contents: any = { + __type: "UpdateGeoMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateIPSetResponse = ( + output: any, + context: __SerdeContext +): UpdateIPSetResponse => { + let contents: any = { + __type: "UpdateIPSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateRateBasedRuleResponse = ( + output: any, + context: __SerdeContext +): UpdateRateBasedRuleResponse => { + let contents: any = { + __type: "UpdateRateBasedRuleResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateRegexMatchSetResponse = ( + output: any, + context: __SerdeContext +): UpdateRegexMatchSetResponse => { + let contents: any = { + __type: "UpdateRegexMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateRegexPatternSetResponse = ( + output: any, + context: __SerdeContext +): UpdateRegexPatternSetResponse => { + let contents: any = { + __type: "UpdateRegexPatternSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateRuleGroupResponse = ( + output: any, + context: __SerdeContext +): UpdateRuleGroupResponse => { + let contents: any = { + __type: "UpdateRuleGroupResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateRuleResponse = ( + output: any, + context: __SerdeContext +): UpdateRuleResponse => { + let contents: any = { + __type: "UpdateRuleResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateSizeConstraintSetResponse = ( + output: any, + context: __SerdeContext +): UpdateSizeConstraintSetResponse => { + let contents: any = { + __type: "UpdateSizeConstraintSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateSqlInjectionMatchSetResponse = ( + output: any, + context: __SerdeContext +): UpdateSqlInjectionMatchSetResponse => { + let contents: any = { + __type: "UpdateSqlInjectionMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateWebACLResponse = ( + output: any, + context: __SerdeContext +): UpdateWebACLResponse => { + let contents: any = { + __type: "UpdateWebACLResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1UpdateXssMatchSetResponse = ( + output: any, + context: __SerdeContext +): UpdateXssMatchSetResponse => { + let contents: any = { + __type: "UpdateXssMatchSetResponse", + ChangeToken: undefined + }; + if (output.ChangeToken !== undefined) { + contents.ChangeToken = output.ChangeToken; + } + return contents; +}; + +const deserializeAws_json1_1WAFBadRequestException = ( + output: any, + context: __SerdeContext +): WAFBadRequestException => { + let contents: any = { + __type: "WAFBadRequestException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFDisallowedNameException = ( + output: any, + context: __SerdeContext +): WAFDisallowedNameException => { + let contents: any = { + __type: "WAFDisallowedNameException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFInternalErrorException = ( + output: any, + context: __SerdeContext +): WAFInternalErrorException => { + let contents: any = { + __type: "WAFInternalErrorException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFInvalidAccountException = ( + output: any, + context: __SerdeContext +): WAFInvalidAccountException => { + let contents: any = { + __type: "WAFInvalidAccountException" + }; + return contents; +}; + +const deserializeAws_json1_1WAFInvalidOperationException = ( + output: any, + context: __SerdeContext +): WAFInvalidOperationException => { + let contents: any = { + __type: "WAFInvalidOperationException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFInvalidParameterException = ( + output: any, + context: __SerdeContext +): WAFInvalidParameterException => { + let contents: any = { + __type: "WAFInvalidParameterException", + field: undefined, + parameter: undefined, + reason: undefined + }; + if (output.field !== undefined) { + contents.field = output.field; + } + if (output.parameter !== undefined) { + contents.parameter = output.parameter; + } + if (output.reason !== undefined) { + contents.reason = output.reason; + } + return contents; +}; + +const deserializeAws_json1_1WAFInvalidPermissionPolicyException = ( + output: any, + context: __SerdeContext +): WAFInvalidPermissionPolicyException => { + let contents: any = { + __type: "WAFInvalidPermissionPolicyException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFInvalidRegexPatternException = ( + output: any, + context: __SerdeContext +): WAFInvalidRegexPatternException => { + let contents: any = { + __type: "WAFInvalidRegexPatternException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFLimitsExceededException = ( + output: any, + context: __SerdeContext +): WAFLimitsExceededException => { + let contents: any = { + __type: "WAFLimitsExceededException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFNonEmptyEntityException = ( + output: any, + context: __SerdeContext +): WAFNonEmptyEntityException => { + let contents: any = { + __type: "WAFNonEmptyEntityException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFNonexistentContainerException = ( + output: any, + context: __SerdeContext +): WAFNonexistentContainerException => { + let contents: any = { + __type: "WAFNonexistentContainerException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFNonexistentItemException = ( + output: any, + context: __SerdeContext +): WAFNonexistentItemException => { + let contents: any = { + __type: "WAFNonexistentItemException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFReferencedItemException = ( + output: any, + context: __SerdeContext +): WAFReferencedItemException => { + let contents: any = { + __type: "WAFReferencedItemException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFServiceLinkedRoleErrorException = ( + output: any, + context: __SerdeContext +): WAFServiceLinkedRoleErrorException => { + let contents: any = { + __type: "WAFServiceLinkedRoleErrorException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFStaleDataException = ( + output: any, + context: __SerdeContext +): WAFStaleDataException => { + let contents: any = { + __type: "WAFStaleDataException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFSubscriptionNotFoundException = ( + output: any, + context: __SerdeContext +): WAFSubscriptionNotFoundException => { + let contents: any = { + __type: "WAFSubscriptionNotFoundException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFTagOperationException = ( + output: any, + context: __SerdeContext +): WAFTagOperationException => { + let contents: any = { + __type: "WAFTagOperationException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFTagOperationInternalErrorException = ( + output: any, + context: __SerdeContext +): WAFTagOperationInternalErrorException => { + let contents: any = { + __type: "WAFTagOperationInternalErrorException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WAFUnavailableEntityException = ( + output: any, + context: __SerdeContext +): WAFUnavailableEntityException => { + let contents: any = { + __type: "WAFUnavailableEntityException", + message: undefined + }; + if (output.message !== undefined) { + contents.message = output.message; + } + return contents; +}; + +const deserializeAws_json1_1WafAction = ( + output: any, + context: __SerdeContext +): WafAction => { + let contents: any = { + __type: "WafAction", + Type: undefined + }; + if (output.Type !== undefined) { + contents.Type = output.Type; + } + return contents; +}; + +const deserializeAws_json1_1WafOverrideAction = ( + output: any, + context: __SerdeContext +): WafOverrideAction => { + let contents: any = { + __type: "WafOverrideAction", + Type: undefined + }; + if (output.Type !== undefined) { + contents.Type = output.Type; + } + return contents; +}; + +const deserializeAws_json1_1WebACL = ( + output: any, + context: __SerdeContext +): WebACL => { + let contents: any = { + __type: "WebACL", + DefaultAction: undefined, + MetricName: undefined, + Name: undefined, + Rules: undefined, + WebACLArn: undefined, + WebACLId: undefined + }; + if (output.DefaultAction !== undefined) { + contents.DefaultAction = deserializeAws_json1_1WafAction( + output.DefaultAction, + context + ); + } + if (output.MetricName !== undefined) { + contents.MetricName = output.MetricName; + } + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.Rules !== undefined) { + contents.Rules = deserializeAws_json1_1ActivatedRules( + output.Rules, + context + ); + } + if (output.WebACLArn !== undefined) { + contents.WebACLArn = output.WebACLArn; + } + if (output.WebACLId !== undefined) { + contents.WebACLId = output.WebACLId; + } + return contents; +}; + +const deserializeAws_json1_1WebACLSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1WebACLSummary(entry, context) + ); +}; + +const deserializeAws_json1_1WebACLSummary = ( + output: any, + context: __SerdeContext +): WebACLSummary => { + let contents: any = { + __type: "WebACLSummary", + Name: undefined, + WebACLId: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.WebACLId !== undefined) { + contents.WebACLId = output.WebACLId; + } + return contents; +}; + +const deserializeAws_json1_1XssMatchSet = ( + output: any, + context: __SerdeContext +): XssMatchSet => { + let contents: any = { + __type: "XssMatchSet", + Name: undefined, + XssMatchSetId: undefined, + XssMatchTuples: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.XssMatchSetId !== undefined) { + contents.XssMatchSetId = output.XssMatchSetId; + } + if (output.XssMatchTuples !== undefined) { + contents.XssMatchTuples = deserializeAws_json1_1XssMatchTuples( + output.XssMatchTuples, + context + ); + } + return contents; +}; + +const deserializeAws_json1_1XssMatchSetSummaries = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1XssMatchSetSummary(entry, context) + ); +}; + +const deserializeAws_json1_1XssMatchSetSummary = ( + output: any, + context: __SerdeContext +): XssMatchSetSummary => { + let contents: any = { + __type: "XssMatchSetSummary", + Name: undefined, + XssMatchSetId: undefined + }; + if (output.Name !== undefined) { + contents.Name = output.Name; + } + if (output.XssMatchSetId !== undefined) { + contents.XssMatchSetId = output.XssMatchSetId; + } + return contents; +}; + +const deserializeAws_json1_1XssMatchTuple = ( + output: any, + context: __SerdeContext +): XssMatchTuple => { + let contents: any = { + __type: "XssMatchTuple", + FieldToMatch: undefined, + TextTransformation: undefined + }; + if (output.FieldToMatch !== undefined) { + contents.FieldToMatch = deserializeAws_json1_1FieldToMatch( + output.FieldToMatch, + context + ); + } + if (output.TextTransformation !== undefined) { + contents.TextTransformation = output.TextTransformation; + } + return contents; +}; + +const deserializeAws_json1_1XssMatchTuples = ( + output: any, + context: __SerdeContext +): Array => { + return (output || []).map((entry: any) => + deserializeAws_json1_1XssMatchTuple(entry, context) + ); +}; + +const deserializeMetadata = (output: __HttpResponse): __ResponseMetadata => ({ + httpStatusCode: output.statusCode, + httpHeaders: output.headers, + requestId: output.headers["x-amzn-requestid"] +}); + +const parseBody = (streamBody: any, context: __SerdeContext): any => { + return context.streamCollector(streamBody).then((body: any) => { + const encoded = context.utf8Encoder(body); + if (encoded.length) { + return JSON.parse(encoded); + } + return {}; + }); +}; diff --git a/clients/client-waf-regional/runtimeConfig.browser.ts b/clients/client-waf-regional/runtimeConfig.browser.ts new file mode 100644 index 000000000000..f9cf0d35ad35 --- /dev/null +++ b/clients/client-waf-regional/runtimeConfig.browser.ts @@ -0,0 +1,30 @@ +import { invalidFunction } from "@aws-sdk/invalid-dependency"; +import { Sha256 } from "@aws-crypto/sha256-browser"; +import { FetchHttpHandler } from "@aws-sdk/fetch-http-handler"; +import { parseUrl } from "@aws-sdk/url-parser-browser"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-browser"; +import { streamCollector } from "@aws-sdk/stream-collector-browser"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-browser"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-browser"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-browser"; +import { name, version } from "./package.json"; +import { ClientDefaults } from "./WAFRegionalClient"; +import { ClientSharedValues } from "./runtimeConfig.shared"; + +export const ClientDefaultValues: Required = { + ...ClientSharedValues, + requestHandler: new FetchHttpHandler(), + sha256: Sha256, + urlParser: parseUrl, + bodyLengthChecker: calculateBodyLength, + streamCollector, + base64Decoder: fromBase64, + base64Encoder: toBase64, + utf8Decoder: fromUtf8, + utf8Encoder: toUtf8, + defaultUserAgent: defaultUserAgent(name, version), + runtime: "browser", + signingName: "waf-regional", + credentialDefaultProvider: invalidFunction("Credential is missing") as any, + regionDefaultProvider: invalidFunction("Region is missing") as any +}; diff --git a/clients/client-waf-regional/runtimeConfig.shared.ts b/clients/client-waf-regional/runtimeConfig.shared.ts new file mode 100644 index 000000000000..501449185423 --- /dev/null +++ b/clients/client-waf-regional/runtimeConfig.shared.ts @@ -0,0 +1,7 @@ +import { defaultRegionInfoProvider } from "./endpoints"; + +export const ClientSharedValues = { + apiVersion: "2016-11-28", + signingName: "waf-regional", + regionInfoProvider: defaultRegionInfoProvider +}; diff --git a/clients/client-waf-regional/runtimeConfig.ts b/clients/client-waf-regional/runtimeConfig.ts new file mode 100644 index 000000000000..024b1ee598f4 --- /dev/null +++ b/clients/client-waf-regional/runtimeConfig.ts @@ -0,0 +1,31 @@ +import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node"; +import { defaultProvider as regionDefaultProvider } from "@aws-sdk/region-provider"; +import { Hash } from "@aws-sdk/hash-node"; +import { NodeHttpHandler } from "@aws-sdk/node-http-handler"; +import { parseUrl } from "@aws-sdk/url-parser-node"; +import { calculateBodyLength } from "@aws-sdk/util-body-length-node"; +import { streamCollector } from "@aws-sdk/stream-collector-node"; +import { fromUtf8, toUtf8 } from "@aws-sdk/util-utf8-node"; +import { fromBase64, toBase64 } from "@aws-sdk/util-base64-node"; +import { defaultUserAgent } from "@aws-sdk/util-user-agent-node"; +import { name, version } from "./package.json"; +import { ClientDefaults } from "./WAFRegionalClient"; +import { ClientSharedValues } from "./runtimeConfig.shared"; + +export const ClientDefaultValues: Required = { + ...ClientSharedValues, + requestHandler: new NodeHttpHandler(), + sha256: Hash.bind(null, "sha256"), + urlParser: parseUrl, + bodyLengthChecker: calculateBodyLength, + streamCollector, + base64Decoder: fromBase64, + base64Encoder: toBase64, + utf8Decoder: fromUtf8, + utf8Encoder: toUtf8, + defaultUserAgent: defaultUserAgent(name, version), + runtime: "node", + signingName: "waf-regional", + credentialDefaultProvider, + regionDefaultProvider +}; diff --git a/clients/client-waf-regional/tsconfig.es.json b/clients/client-waf-regional/tsconfig.es.json new file mode 100644 index 000000000000..9add6a7c2445 --- /dev/null +++ b/clients/client-waf-regional/tsconfig.es.json @@ -0,0 +1,19 @@ +{ + "extends": "./tsconfig", + "compilerOptions": { + "target": "es5", + "module": "esnext", + "moduleResolution": "node", + "declaration": false, + "declarationDir": null, + "lib": [ + "dom", + "es5", + "es2015.promise", + "es2015.collection", + "es2015.iterable", + "es2015.symbol.wellknown" + ], + "outDir": "dist/es" + } +} diff --git a/clients/client-waf-regional/tsconfig.json b/clients/client-waf-regional/tsconfig.json new file mode 100644 index 000000000000..ca2fadc08187 --- /dev/null +++ b/clients/client-waf-regional/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "alwaysStrict": true, + "target": "es2017", + "module": "commonjs", + "declaration": true, + "strict": true, + "sourceMap": true, + "downlevelIteration": true, + "importHelpers": true, + "noEmitHelpers": true, + "incremental": true, + "resolveJsonModule": true, + "declarationDir": "./types", + "outDir": "dist/cjs" + }, + "typedocOptions": { + "exclude": "**/node_modules/**", + "excludedNotExported": true, + "excludePrivate": true, + "hideGenerator": true, + "ignoreCompilerErrors": true, + "mode": "file", + "out": "./docs", + "plugin": "@aws-sdk/client-documentation-generator" + } +}