diff --git a/.changelog/42464cbb6d014dbba8711c0167e378e7.json b/.changelog/42464cbb6d014dbba8711c0167e378e7.json new file mode 100644 index 00000000000..c5244e6d950 --- /dev/null +++ b/.changelog/42464cbb6d014dbba8711c0167e378e7.json @@ -0,0 +1,8 @@ +{ + "id": "42464cbb-6d01-4dbb-a871-1c0167e378e7", + "type": "feature", + "description": "This release introduces multi-data-source feature in Migration Hub Strategy Recommendations. This feature now supports vCenter as a data source to fetch inventory in addition to ADS and Import from file workflow that is currently supported with MHSR collector.", + "modules": [ + "service/migrationhubstrategy" + ] +} \ No newline at end of file diff --git a/.changelog/55fcf43450fd42b18a99f01374706ca2.json b/.changelog/55fcf43450fd42b18a99f01374706ca2.json new file mode 100644 index 00000000000..393bdddac4d --- /dev/null +++ b/.changelog/55fcf43450fd42b18a99f01374706ca2.json @@ -0,0 +1,8 @@ +{ + "id": "55fcf434-50fd-42b1-8a99-f01374706ca2", + "type": "feature", + "description": "This release introduces DeleteHomeRegionControl API that customers can use to delete the Migration Hub Home Region configuration", + "modules": [ + "service/migrationhubconfig" + ] +} \ No newline at end of file diff --git a/.changelog/68c7cd8cb383459d98235c1f83840758.json b/.changelog/68c7cd8cb383459d98235c1f83840758.json new file mode 100644 index 00000000000..6b6cfe35d92 --- /dev/null +++ b/.changelog/68c7cd8cb383459d98235c1f83840758.json @@ -0,0 +1,8 @@ +{ + "id": "68c7cd8c-b383-459d-9823-5c1f83840758", + "type": "feature", + "description": "Add the partitional endpoint for IAM in iso-f.", + "modules": [ + "service/iam" + ] +} \ No newline at end of file diff --git a/.changelog/9b4eae28e3434e7095cc588c2461d3c7.json b/.changelog/9b4eae28e3434e7095cc588c2461d3c7.json new file mode 100644 index 00000000000..445e75078a0 --- /dev/null +++ b/.changelog/9b4eae28e3434e7095cc588c2461d3c7.json @@ -0,0 +1,8 @@ +{ + "id": "9b4eae28-e343-4e70-95cc-588c2461d3c7", + "type": "feature", + "description": "This release includes the following new APIs: CreateLifecyclePolicy, UpdateLifecyclePolicy, BatchGetLifecyclePolicy, DeleteLifecyclePolicy, ListLifecyclePolicies and BatchGetEffectiveLifecyclePolicy to support the data lifecycle management feature.", + "modules": [ + "service/opensearchserverless" + ] +} \ No newline at end of file diff --git a/.changelog/9dcc47200ba847e28c076dd45e9f031b.json b/.changelog/9dcc47200ba847e28c076dd45e9f031b.json new file mode 100644 index 00000000000..e47286c09ce --- /dev/null +++ b/.changelog/9dcc47200ba847e28c076dd45e9f031b.json @@ -0,0 +1,8 @@ +{ + "id": "9dcc4720-0ba8-47e2-8c07-6dd45e9f031b", + "type": "feature", + "description": "Added support for Cluster Subnet and Security Group mutability.", + "modules": [ + "service/eks" + ] +} \ No newline at end of file diff --git a/.changelog/df271a17901343f9a94397c1a82dab1a.json b/.changelog/df271a17901343f9a94397c1a82dab1a.json new file mode 100644 index 00000000000..61a26ad23ff --- /dev/null +++ b/.changelog/df271a17901343f9a94397c1a82dab1a.json @@ -0,0 +1,8 @@ +{ + "id": "df271a17-9013-43f9-a943-97c1a82dab1a", + "type": "feature", + "description": "This release updates the documentation for InstanceInterruptionBehavior and HibernationOptionsRequest to more accurately describe the behavior of these two parameters when using Spot hibernation.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/ed2000e90511494a8671e37a34158cef.json b/.changelog/ed2000e90511494a8671e37a34158cef.json new file mode 100644 index 00000000000..e44781ec2d9 --- /dev/null +++ b/.changelog/ed2000e90511494a8671e37a34158cef.json @@ -0,0 +1,8 @@ +{ + "id": "ed2000e9-0511-494a-8671-e37a34158cef", + "type": "feature", + "description": "Add ability to trigger pipelines from git tags, define variables at pipeline level and new pipeline type V2.", + "modules": [ + "service/codepipeline" + ] +} \ No newline at end of file diff --git a/internal/endpoints/config/LICENSE.txt b/internal/endpoints/config/LICENSE.txt new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/internal/endpoints/config/LICENSE.txt @@ -0,0 +1,202 @@ + + 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 [yyyy] [name of copyright owner] + + 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/internal/endpoints/config/go.mod b/internal/endpoints/config/go.mod index 14cdd9d2b54..82885800553 100644 --- a/internal/endpoints/config/go.mod +++ b/internal/endpoints/config/go.mod @@ -1,21 +1,27 @@ module github.com/aws/aws-sdk-go-v2/internal/endpoints/config -go 1.20 +go 1.15 require github.com/aws/aws-sdk-go-v2/config v1.19.0 -require ( - github.com/aws/aws-sdk-go-v2 v1.21.2 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.13.43 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 // indirect - github.com/aws/smithy-go v1.15.0 // indirect -) - -replace github.com/aws/aws-sdk-go-v2/config => ../../../config +replace github.com/aws/aws-sdk-go-v2 => ../../../ + +replace github.com/aws/aws-sdk-go-v2/config => ../../../config/ + +replace github.com/aws/aws-sdk-go-v2/credentials => ../../../credentials/ + +replace github.com/aws/aws-sdk-go-v2/feature/ec2/imds => ../../../feature/ec2/imds/ + +replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../../internal/configsources/ + +replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../../internal/endpoints/v2/ + +replace github.com/aws/aws-sdk-go-v2/internal/ini => ../../../internal/ini/ + +replace github.com/aws/aws-sdk-go-v2/service/internal/presigned-url => ../../../service/internal/presigned-url/ + +replace github.com/aws/aws-sdk-go-v2/service/sso => ../../../service/sso/ + +replace github.com/aws/aws-sdk-go-v2/service/ssooidc => ../../../service/ssooidc/ + +replace github.com/aws/aws-sdk-go-v2/service/sts => ../../../service/sts/ diff --git a/internal/endpoints/config/go.sum b/internal/endpoints/config/go.sum index 2c781c47817..a646f1d3099 100644 --- a/internal/endpoints/config/go.sum +++ b/internal/endpoints/config/go.sum @@ -1,25 +1,3 @@ -github.com/aws/aws-sdk-go-v2 v1.21.2 h1:+LXZ0sgo8quN9UOKXXzAWRT3FWd4NxeXWOZom9pE7GA= -github.com/aws/aws-sdk-go-v2 v1.21.2/go.mod h1:ErQhvNuEMhJjweavOYhxVkn2RUx7kQXVATHrjKtxIpM= -github.com/aws/aws-sdk-go-v2/config v1.19.0 h1:AdzDvwH6dWuVARCl3RTLGRc4Ogy+N7yLFxVxXe1ClQ0= -github.com/aws/aws-sdk-go-v2/config v1.19.0/go.mod h1:ZwDUgFnQgsazQTnWfeLWk5GjeqTQTL8lMkoE1UXzxdE= -github.com/aws/aws-sdk-go-v2/credentials v1.13.43 h1:LU8vo40zBlo3R7bAvBVy/ku4nxGEyZe9N8MqAeFTzF8= -github.com/aws/aws-sdk-go-v2/credentials v1.13.43/go.mod h1:zWJBz1Yf1ZtX5NGax9ZdNjhhI4rgjfgsyk6vTY1yfVg= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13 h1:PIktER+hwIG286DqXyvVENjgLTAwGgoeriLDD5C+YlQ= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.13/go.mod h1:f/Ib/qYjhV2/qdsf79H3QP/eRE4AkVyEf6sk7XfZ1tg= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43 h1:nFBQlGtkbPzp/NjZLuFxRqmT91rLJkgvsEQs68h962Y= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.43/go.mod h1:auo+PiyLl0n1l8A0e8RIeR8tOzYPfZZH/JNlrJ8igTQ= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37 h1:JRVhO25+r3ar2mKGP7E0LDl8K9/G36gjlqca5iQbaqc= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.37/go.mod h1:Qe+2KtKml+FEsQF/DHmDV+xjtche/hwoF75EG4UlHW8= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45 h1:hze8YsjSh8Wl1rYa1CJpRmXP21BvOBuc76YhW0HsuQ4= -github.com/aws/aws-sdk-go-v2/internal/ini v1.3.45/go.mod h1:lD5M20o09/LCuQ2mE62Mb/iSdSlCNuj6H5ci7tW7OsE= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37 h1:WWZA/I2K4ptBS1kg0kV1JbBtG/umed0vwHRrmcr9z7k= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.37/go.mod h1:vBmDnwWXWxNPFRMmG2m/3MKOe+xEcMDo1tanpaWCcck= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.2 h1:JuPGc7IkOP4AaqcZSIcyqLpFSqBWK32rM9+a1g6u73k= -github.com/aws/aws-sdk-go-v2/service/sso v1.15.2/go.mod h1:gsL4keucRCgW+xA85ALBpRFfdSLH4kHOVSnLMSuBECo= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3 h1:HFiiRkf1SdaAmV3/BHOFZ9DjFynPHj8G/UIO1lQS+fk= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.17.3/go.mod h1:a7bHA82fyUXOm+ZSWKU6PIoBxrjSprdLoM8xPYvzYVg= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.2 h1:0BkLfgeDjfZnZ+MhB3ONb01u9pwFYTCZVhlsSSBvlbU= -github.com/aws/aws-sdk-go-v2/service/sts v1.23.2/go.mod h1:Eows6e1uQEsc4ZaHANmsPRzAKcVDrcmjjWiih2+HUUQ= github.com/aws/smithy-go v1.15.0 h1:PS/durmlzvAFpQHDs4wi4sNNP9ExsqZh6IlfdHXgKK8= github.com/aws/smithy-go v1.15.0/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/internal/endpoints/config/go_module_metadata.go b/internal/endpoints/config/go_module_metadata.go new file mode 100644 index 00000000000..72f391bc1e5 --- /dev/null +++ b/internal/endpoints/config/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package config + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "tip" diff --git a/service/codepipeline/api_op_StartPipelineExecution.go b/service/codepipeline/api_op_StartPipelineExecution.go index ea3391ce612..d25f898806a 100644 --- a/service/codepipeline/api_op_StartPipelineExecution.go +++ b/service/codepipeline/api_op_StartPipelineExecution.go @@ -10,6 +10,7 @@ import ( awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" "github.com/aws/aws-sdk-go-v2/aws/signer/v4" internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/codepipeline/types" smithyendpoints "github.com/aws/smithy-go/endpoints" "github.com/aws/smithy-go/middleware" smithyhttp "github.com/aws/smithy-go/transport/http" @@ -43,6 +44,11 @@ type StartPipelineExecutionInput struct { // The system-generated unique ID used to identify a unique execution request. ClientRequestToken *string + // A list that overrides pipeline variables for a pipeline execution that's being + // started. Variable names must match [A-Za-z0-9@\-_]+ , and the values can be + // anything except an empty string. + Variables []types.PipelineVariable + noSmithyDocumentSerde } diff --git a/service/codepipeline/deserializers.go b/service/codepipeline/deserializers.go index b8133a416fd..6b337bf076a 100644 --- a/service/codepipeline/deserializers.go +++ b/service/codepipeline/deserializers.go @@ -8478,6 +8478,198 @@ func awsAwsjson11_deserializeDocumentExecutorConfiguration(v **types.ExecutorCon return nil } +func awsAwsjson11_deserializeDocumentGitConfiguration(v **types.GitConfiguration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.GitConfiguration + if *v == nil { + sv = &types.GitConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "push": + if err := awsAwsjson11_deserializeDocumentGitPushFilterList(&sv.Push, value); err != nil { + return err + } + + case "sourceActionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) + } + sv.SourceActionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentGitPushFilter(v **types.GitPushFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.GitPushFilter + if *v == nil { + sv = &types.GitPushFilter{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsAwsjson11_deserializeDocumentGitTagFilterCriteria(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentGitPushFilterList(v *[]types.GitPushFilter, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.GitPushFilter + if *v == nil { + cv = []types.GitPushFilter{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GitPushFilter + destAddr := &col + if err := awsAwsjson11_deserializeDocumentGitPushFilter(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentGitTagFilterCriteria(v **types.GitTagFilterCriteria, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.GitTagFilterCriteria + if *v == nil { + sv = &types.GitTagFilterCriteria{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "excludes": + if err := awsAwsjson11_deserializeDocumentGitTagPatternList(&sv.Excludes, value); err != nil { + return err + } + + case "includes": + if err := awsAwsjson11_deserializeDocumentGitTagPatternList(&sv.Includes, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentGitTagPatternList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GitTagNamePattern to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentInputArtifact(v **types.InputArtifact, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9891,6 +10083,15 @@ func awsAwsjson11_deserializeDocumentPipelineDeclaration(v **types.PipelineDecla sv.Name = ptr.String(jtv) } + case "pipelineType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineType to be of type string, got %T instead", value) + } + sv.PipelineType = types.PipelineType(jtv) + } + case "roleArn": if value != nil { jtv, ok := value.(string) @@ -9905,6 +10106,16 @@ func awsAwsjson11_deserializeDocumentPipelineDeclaration(v **types.PipelineDecla return err } + case "triggers": + if err := awsAwsjson11_deserializeDocumentPipelineTriggerDeclarationList(&sv.Triggers, value); err != nil { + return err + } + + case "variables": + if err := awsAwsjson11_deserializeDocumentPipelineVariableDeclarationList(&sv.Variables, value); err != nil { + return err + } + case "version": if value != nil { jtv, ok := value.(json.Number) @@ -10003,6 +10214,16 @@ func awsAwsjson11_deserializeDocumentPipelineExecution(v **types.PipelineExecuti sv.StatusSummary = ptr.String(jtv) } + case "trigger": + if err := awsAwsjson11_deserializeDocumentExecutionTrigger(&sv.Trigger, value); err != nil { + return err + } + + case "variables": + if err := awsAwsjson11_deserializeDocumentResolvedPipelineVariableList(&sv.Variables, value); err != nil { + return err + } + default: _, _ = key, value @@ -10505,6 +10726,15 @@ func awsAwsjson11_deserializeDocumentPipelineSummary(v **types.PipelineSummary, sv.Name = ptr.String(jtv) } + case "pipelineType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineType to be of type string, got %T instead", value) + } + sv.PipelineType = types.PipelineType(jtv) + } + case "updated": if value != nil { switch jtv := value.(type) { @@ -10543,6 +10773,177 @@ func awsAwsjson11_deserializeDocumentPipelineSummary(v **types.PipelineSummary, return nil } +func awsAwsjson11_deserializeDocumentPipelineTriggerDeclaration(v **types.PipelineTriggerDeclaration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PipelineTriggerDeclaration + if *v == nil { + sv = &types.PipelineTriggerDeclaration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "gitConfiguration": + if err := awsAwsjson11_deserializeDocumentGitConfiguration(&sv.GitConfiguration, value); err != nil { + return err + } + + case "providerType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineTriggerProviderType to be of type string, got %T instead", value) + } + sv.ProviderType = types.PipelineTriggerProviderType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPipelineTriggerDeclarationList(v *[]types.PipelineTriggerDeclaration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PipelineTriggerDeclaration + if *v == nil { + cv = []types.PipelineTriggerDeclaration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PipelineTriggerDeclaration + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPipelineTriggerDeclaration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentPipelineVariableDeclaration(v **types.PipelineVariableDeclaration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PipelineVariableDeclaration + if *v == nil { + sv = &types.PipelineVariableDeclaration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "defaultValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineVariableValue to be of type string, got %T instead", value) + } + sv.DefaultValue = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineVariableDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PipelineVariableName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentPipelineVariableDeclarationList(v *[]types.PipelineVariableDeclaration, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.PipelineVariableDeclaration + if *v == nil { + cv = []types.PipelineVariableDeclaration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.PipelineVariableDeclaration + destAddr := &col + if err := awsAwsjson11_deserializeDocumentPipelineVariableDeclaration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentPipelineVersionNotFoundException(v **types.PipelineVersionNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -10731,6 +11132,89 @@ func awsAwsjson11_deserializeDocumentResolvedActionConfigurationMap(v *map[strin return nil } +func awsAwsjson11_deserializeDocumentResolvedPipelineVariable(v **types.ResolvedPipelineVariable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ResolvedPipelineVariable + if *v == nil { + sv = &types.ResolvedPipelineVariable{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "resolvedValue": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResolvedValue = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResolvedPipelineVariableList(v *[]types.ResolvedPipelineVariable, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ResolvedPipelineVariable + if *v == nil { + cv = []types.ResolvedPipelineVariable{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResolvedPipelineVariable + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResolvedPipelineVariable(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentResourceNotFoundException(v **types.ResourceNotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/codepipeline/serializers.go b/service/codepipeline/serializers.go index 7f2fd4e45d5..61ae38392ac 100644 --- a/service/codepipeline/serializers.go +++ b/service/codepipeline/serializers.go @@ -2808,6 +2808,84 @@ func awsAwsjson11_serializeDocumentFailureDetails(v *types.FailureDetails, value return nil } +func awsAwsjson11_serializeDocumentGitConfiguration(v *types.GitConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Push != nil { + ok := object.Key("push") + if err := awsAwsjson11_serializeDocumentGitPushFilterList(v.Push, ok); err != nil { + return err + } + } + + if v.SourceActionName != nil { + ok := object.Key("sourceActionName") + ok.String(*v.SourceActionName) + } + + return nil +} + +func awsAwsjson11_serializeDocumentGitPushFilter(v *types.GitPushFilter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsAwsjson11_serializeDocumentGitTagFilterCriteria(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentGitPushFilterList(v []types.GitPushFilter, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentGitPushFilter(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentGitTagFilterCriteria(v *types.GitTagFilterCriteria, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Excludes != nil { + ok := object.Key("excludes") + if err := awsAwsjson11_serializeDocumentGitTagPatternList(v.Excludes, ok); err != nil { + return err + } + } + + if v.Includes != nil { + ok := object.Key("includes") + if err := awsAwsjson11_serializeDocumentGitTagPatternList(v.Includes, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentGitTagPatternList(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson11_serializeDocumentInputArtifact(v *types.InputArtifact, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2925,6 +3003,11 @@ func awsAwsjson11_serializeDocumentPipelineDeclaration(v *types.PipelineDeclarat ok.String(*v.Name) } + if len(v.PipelineType) > 0 { + ok := object.Key("pipelineType") + ok.String(string(v.PipelineType)) + } + if v.RoleArn != nil { ok := object.Key("roleArn") ok.String(*v.RoleArn) @@ -2937,6 +3020,20 @@ func awsAwsjson11_serializeDocumentPipelineDeclaration(v *types.PipelineDeclarat } } + if v.Triggers != nil { + ok := object.Key("triggers") + if err := awsAwsjson11_serializeDocumentPipelineTriggerDeclarationList(v.Triggers, ok); err != nil { + return err + } + } + + if v.Variables != nil { + ok := object.Key("variables") + if err := awsAwsjson11_serializeDocumentPipelineVariableDeclarationList(v.Variables, ok); err != nil { + return err + } + } + if v.Version != nil { ok := object.Key("version") ok.Integer(*v.Version) @@ -2958,6 +3055,103 @@ func awsAwsjson11_serializeDocumentPipelineStageDeclarationList(v []types.StageD return nil } +func awsAwsjson11_serializeDocumentPipelineTriggerDeclaration(v *types.PipelineTriggerDeclaration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GitConfiguration != nil { + ok := object.Key("gitConfiguration") + if err := awsAwsjson11_serializeDocumentGitConfiguration(v.GitConfiguration, ok); err != nil { + return err + } + } + + if len(v.ProviderType) > 0 { + ok := object.Key("providerType") + ok.String(string(v.ProviderType)) + } + + return nil +} + +func awsAwsjson11_serializeDocumentPipelineTriggerDeclarationList(v []types.PipelineTriggerDeclaration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentPipelineTriggerDeclaration(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentPipelineVariable(v *types.PipelineVariable, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsAwsjson11_serializeDocumentPipelineVariableDeclaration(v *types.PipelineVariableDeclaration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.DefaultValue != nil { + ok := object.Key("defaultValue") + ok.String(*v.DefaultValue) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsAwsjson11_serializeDocumentPipelineVariableDeclarationList(v []types.PipelineVariableDeclaration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentPipelineVariableDeclaration(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentPipelineVariableList(v []types.PipelineVariable, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentPipelineVariable(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsAwsjson11_serializeDocumentPollingAccountList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -3926,6 +4120,13 @@ func awsAwsjson11_serializeOpDocumentStartPipelineExecutionInput(v *StartPipelin ok.String(*v.Name) } + if v.Variables != nil { + ok := object.Key("variables") + if err := awsAwsjson11_serializeDocumentPipelineVariableList(v.Variables, ok); err != nil { + return err + } + } + return nil } diff --git a/service/codepipeline/types/enums.go b/service/codepipeline/types/enums.go index d52de838d64..93eb63ac235 100644 --- a/service/codepipeline/types/enums.go +++ b/service/codepipeline/types/enums.go @@ -273,6 +273,40 @@ func (PipelineExecutionStatus) Values() []PipelineExecutionStatus { } } +type PipelineTriggerProviderType string + +// Enum values for PipelineTriggerProviderType +const ( + PipelineTriggerProviderTypeCodeStarSourceConnection PipelineTriggerProviderType = "CodeStarSourceConnection" +) + +// Values returns all known values for PipelineTriggerProviderType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (PipelineTriggerProviderType) Values() []PipelineTriggerProviderType { + return []PipelineTriggerProviderType{ + "CodeStarSourceConnection", + } +} + +type PipelineType string + +// Enum values for PipelineType +const ( + PipelineTypeV1 PipelineType = "V1" + PipelineTypeV2 PipelineType = "V2" +) + +// Values returns all known values for PipelineType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (PipelineType) Values() []PipelineType { + return []PipelineType{ + "V1", + "V2", + } +} + type StageExecutionStatus string // Enum values for StageExecutionStatus @@ -345,6 +379,7 @@ const ( TriggerTypeWebhook TriggerType = "Webhook" TriggerTypeCloudWatchEvent TriggerType = "CloudWatchEvent" TriggerTypePutActionRevision TriggerType = "PutActionRevision" + TriggerTypeWebhookV2 TriggerType = "WebhookV2" ) // Values returns all known values for TriggerType. Note that this can be expanded @@ -358,6 +393,7 @@ func (TriggerType) Values() []TriggerType { "Webhook", "CloudWatchEvent", "PutActionRevision", + "WebhookV2", } } diff --git a/service/codepipeline/types/types.go b/service/codepipeline/types/types.go index 42d619474fb..e6adaaab7e6 100644 --- a/service/codepipeline/types/types.go +++ b/service/codepipeline/types/types.go @@ -929,6 +929,53 @@ type FailureDetails struct { noSmithyDocumentSerde } +// A type of trigger configuration for Git-based source actions. You can specify +// the Git configuration trigger type for all third-party Git-based source actions +// that are supported by the CodeStarSourceConnection action type. +type GitConfiguration struct { + + // The name of the pipeline source action where the trigger configuration, such as + // Git tags, is specified. The trigger configuration will start the pipeline upon + // the specified change only. You can only specify one trigger configuration per + // source action. + // + // This member is required. + SourceActionName *string + + // The field where the repository event that will start the pipeline, such as + // pushing Git tags, is specified with details. Git tags is the only supported + // event type. + Push []GitPushFilter + + noSmithyDocumentSerde +} + +// The event criteria that specify when a specified repository event will start +// the pipeline for the specified trigger configuration, such as the lists of Git +// tags to include and exclude. +type GitPushFilter struct { + + // The field that contains the details for the Git tags trigger configuration. + Tags *GitTagFilterCriteria + + noSmithyDocumentSerde +} + +// The Git tags specified as filter criteria for whether a Git tag repository +// event will start the pipeline. +type GitTagFilterCriteria struct { + + // The list of patterns of Git tags that, when pushed, are to be excluded from + // starting the pipeline. + Excludes []string + + // The list of patterns of Git tags that, when pushed, are to be included as + // criteria that starts the pipeline. + Includes []string + + noSmithyDocumentSerde +} + // Represents information about an artifact to be worked on, such as a test or // build artifact. type InputArtifact struct { @@ -1160,6 +1207,32 @@ type PipelineDeclaration struct { // cross-region action in your pipeline, you must use artifactStores . ArtifactStores map[string]ArtifactStore + // CodePipeline provides the following pipeline types, which differ in + // characteristics and price, so that you can tailor your pipeline features and + // cost to the needs of your applications. + // - V1 type pipelines have a JSON structure that contains standard pipeline, + // stage, and action-level parameters. + // - V2 type pipelines have the same structure as a V1 type, along with + // additional parameters for release safety and trigger configuration. + // Including V2 parameters, such as triggers on Git tags, in the pipeline JSON + // when creating or updating a pipeline will result in the pipeline having the V2 + // type of pipeline and the associated costs. For information about pricing for + // CodePipeline, see Pricing (https://aws.amazon.com/codepipeline/pricing/) . For + // information about which type of pipeline to choose, see What type of pipeline + // is right for me? (https://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-types-planning.html) + // . + PipelineType PipelineType + + // The trigger configuration specifying a type of event, such as Git tags, that + // starts the pipeline. When a trigger configuration is specified, default change + // detection for repository and branch commits is disabled. + Triggers []PipelineTriggerDeclaration + + // A list that defines the pipeline variables for a pipeline resource. Variable + // names can have alphanumeric and underscore characters, and the values must match + // [A-Za-z0-9@\-_]+ . + Variables []PipelineVariableDeclaration + // The version number of the pipeline. A new pipeline always has a version number // of 1. This number is incremented when a pipeline is updated. Version *int32 @@ -1204,6 +1277,12 @@ type PipelineExecution struct { // A summary that contains a description of the pipeline execution status. StatusSummary *string + // The interaction or event that started a pipeline execution. + Trigger *ExecutionTrigger + + // A list of pipeline variables used for the pipeline execution. + Variables []ResolvedPipelineVariable + noSmithyDocumentSerde } @@ -1283,6 +1362,22 @@ type PipelineSummary struct { // The name of the pipeline. Name *string + // CodePipeline provides the following pipeline types, which differ in + // characteristics and price, so that you can tailor your pipeline features and + // cost to the needs of your applications. + // - V1 type pipelines have a JSON structure that contains standard pipeline, + // stage, and action-level parameters. + // - V2 type pipelines have the same structure as a V1 type, along with + // additional parameters for release safety and trigger configuration. + // Including V2 parameters, such as triggers on Git tags, in the pipeline JSON + // when creating or updating a pipeline will result in the pipeline having the V2 + // type of pipeline and the associated costs. For information about pricing for + // CodePipeline, see Pricing (https://aws.amazon.com/codepipeline/pricing/) . For + // information about which type of pipeline to choose, see What type of pipeline + // is right for me? (https://docs.aws.amazon.com/codepipeline/latest/userguide/pipeline-types-planning.html) + // . + PipelineType PipelineType + // The date and time of the last update to the pipeline, in timestamp format. Updated *time.Time @@ -1292,6 +1387,74 @@ type PipelineSummary struct { noSmithyDocumentSerde } +// Represents information about the specified trigger configuration, such as the +// filter criteria and the source stage for the action that contains the trigger. +// This is only supported for the CodeStarSourceConnection action type. When a +// trigger configuration is specified, default change detection for repository and +// branch commits is disabled. +type PipelineTriggerDeclaration struct { + + // Provides the filter criteria and the source stage for the repository event that + // starts the pipeline, such as Git tags. + // + // This member is required. + GitConfiguration *GitConfiguration + + // The source provider for the event, such as connections configured for a + // repository with Git tags, for the specified trigger configuration. + // + // This member is required. + ProviderType PipelineTriggerProviderType + + noSmithyDocumentSerde +} + +// A pipeline-level variable used for a pipeline execution. +type PipelineVariable struct { + + // The name of a pipeline-level variable. + // + // This member is required. + Name *string + + // The value of a pipeline-level variable. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +// A variable declared at the pipeline level. +type PipelineVariableDeclaration struct { + + // The name of a pipeline-level variable. + // + // This member is required. + Name *string + + // The value of a pipeline-level variable. + DefaultValue *string + + // The description of a pipeline-level variable. It's used to add additional + // context about the variable, and not being used at time when pipeline executes. + Description *string + + noSmithyDocumentSerde +} + +// A pipeline-level variable used for a pipeline execution. +type ResolvedPipelineVariable struct { + + // The name of a pipeline-level variable. + Name *string + + // The resolved value of a pipeline-level variable. + ResolvedValue *string + + noSmithyDocumentSerde +} + // The location of the S3 bucket that contains a revision. type S3ArtifactLocation struct { diff --git a/service/codepipeline/validators.go b/service/codepipeline/validators.go index 65782871bee..96375248d93 100644 --- a/service/codepipeline/validators.go +++ b/service/codepipeline/validators.go @@ -1250,6 +1250,21 @@ func validateFailureDetails(v *types.FailureDetails) error { } } +func validateGitConfiguration(v *types.GitConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GitConfiguration"} + if v.SourceActionName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceActionName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInputArtifact(v *types.InputArtifact) error { if v == nil { return nil @@ -1357,6 +1372,16 @@ func validatePipelineDeclaration(v *types.PipelineDeclaration) error { invalidParams.AddNested("Stages", err.(smithy.InvalidParamsError)) } } + if v.Triggers != nil { + if err := validatePipelineTriggerDeclarationList(v.Triggers); err != nil { + invalidParams.AddNested("Triggers", err.(smithy.InvalidParamsError)) + } + } + if v.Variables != nil { + if err := validatePipelineVariableDeclarationList(v.Variables); err != nil { + invalidParams.AddNested("Variables", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1381,6 +1406,112 @@ func validatePipelineStageDeclarationList(v []types.StageDeclaration) error { } } +func validatePipelineTriggerDeclaration(v *types.PipelineTriggerDeclaration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PipelineTriggerDeclaration"} + if len(v.ProviderType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ProviderType")) + } + if v.GitConfiguration == nil { + invalidParams.Add(smithy.NewErrParamRequired("GitConfiguration")) + } else if v.GitConfiguration != nil { + if err := validateGitConfiguration(v.GitConfiguration); err != nil { + invalidParams.AddNested("GitConfiguration", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePipelineTriggerDeclarationList(v []types.PipelineTriggerDeclaration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PipelineTriggerDeclarationList"} + for i := range v { + if err := validatePipelineTriggerDeclaration(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePipelineVariable(v *types.PipelineVariable) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PipelineVariable"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePipelineVariableDeclaration(v *types.PipelineVariableDeclaration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PipelineVariableDeclaration"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePipelineVariableDeclarationList(v []types.PipelineVariableDeclaration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PipelineVariableDeclarationList"} + for i := range v { + if err := validatePipelineVariableDeclaration(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePipelineVariableList(v []types.PipelineVariable) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PipelineVariableList"} + for i := range v { + if err := validatePipelineVariable(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateStageActionDeclarationList(v []types.ActionDeclaration) error { if v == nil { return nil @@ -2140,6 +2271,11 @@ func validateOpStartPipelineExecutionInput(v *StartPipelineExecutionInput) error if v.Name == nil { invalidParams.Add(smithy.NewErrParamRequired("Name")) } + if v.Variables != nil { + if err := validatePipelineVariableList(v.Variables); err != nil { + invalidParams.AddNested("Variables", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/ec2/api_op_DescribeSpotPriceHistory.go b/service/ec2/api_op_DescribeSpotPriceHistory.go index 28353f98266..a67433cc7e2 100644 --- a/service/ec2/api_op_DescribeSpotPriceHistory.go +++ b/service/ec2/api_op_DescribeSpotPriceHistory.go @@ -65,8 +65,8 @@ type DescribeSpotPriceHistoryInput struct { // - spot-price - The Spot price. The value must match exactly (or use wildcards; // greater than or less than comparison is not supported). // - timestamp - The time stamp of the Spot price history, in UTC format (for - // example, YYYY-MM-DDTHH:MM:SSZ). You can use wildcards (* and ?). Greater than or - // less than comparison is not supported. + // example, ddd MMM dd HH:mm:ss UTC YYYY). You can use wildcards ( * and ? ). + // Greater than or less than comparison is not supported. Filters []types.Filter // Filters the results by the specified instance types. diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index 350eb850764..dfaf841d160 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -4651,7 +4651,14 @@ type HibernationOptions struct { // in the Amazon EC2 User Guide. type HibernationOptionsRequest struct { - // Set to true to enable your instance for hibernation. Default: false + // Set to true to enable your instance for hibernation. For Spot Instances, if you + // set Configured to true , either omit the InstanceInterruptionBehavior parameter + // (for SpotMarketOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_SpotMarketOptions.html) + // ), or set it to hibernate . When Configured is true: + // - If you omit InstanceInterruptionBehavior , it defaults to hibernate . + // - If you set InstanceInterruptionBehavior to a value other than hibernate , + // you'll get an error. + // Default: false Configured *bool noSmithyDocumentSerde @@ -14172,7 +14179,15 @@ type SpotMarketOptions struct { // Deprecated. BlockDurationMinutes *int32 - // The behavior when a Spot Instance is interrupted. The default is terminate . + // The behavior when a Spot Instance is interrupted. If Configured (for + // HibernationOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html) + // ) is set to true , the InstanceInterruptionBehavior parameter is automatically + // set to hibernate . If you set it to stop or terminate , you'll get an error. If + // Configured (for HibernationOptions (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_HibernationOptionsRequest.html) + // ) is set to false or null , the InstanceInterruptionBehavior parameter is + // automatically set to terminate . You can also set it to stop or hibernate . For + // more information, see Interruption behavior (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/interruption-behavior.html) + // in the Amazon EC2 User Guide. InstanceInterruptionBehavior InstanceInterruptionBehavior // The maximum hourly price that you're willing to pay for a Spot Instance. We do diff --git a/service/eks/endpoints.go b/service/eks/endpoints.go index 53e4239b82a..eb0cab6e104 100644 --- a/service/eks/endpoints.go +++ b/service/eks/endpoints.go @@ -410,8 +410,8 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { - if "aws" == _PartitionResult.Name { + if _PartitionResult.SupportsFIPS == true { + if _PartitionResult.Name == "aws" { uriString := func() string { var out strings.Builder out.WriteString("https://fips.eks.") @@ -430,7 +430,7 @@ func (r *resolver) ResolveEndpoint( Headers: http.Header{}, }, nil } - if "aws-us-gov" == _PartitionResult.Name { + if _PartitionResult.Name == "aws-us-gov" { uriString := func() string { var out strings.Builder out.WriteString("https://eks.") diff --git a/service/eks/types/enums.go b/service/eks/types/enums.go index de715461f7d..d482ba15b5e 100644 --- a/service/eks/types/enums.go +++ b/service/eks/types/enums.go @@ -122,12 +122,25 @@ type ClusterIssueCode string // Enum values for ClusterIssueCode const ( - ClusterIssueCodeAccessDenied ClusterIssueCode = "AccessDenied" - ClusterIssueCodeClusterUnreachable ClusterIssueCode = "ClusterUnreachable" - ClusterIssueCodeConfigurationConflict ClusterIssueCode = "ConfigurationConflict" - ClusterIssueCodeInternalFailure ClusterIssueCode = "InternalFailure" - ClusterIssueCodeResourceLimitExceeded ClusterIssueCode = "ResourceLimitExceeded" - ClusterIssueCodeResourceNotFound ClusterIssueCode = "ResourceNotFound" + ClusterIssueCodeAccessDenied ClusterIssueCode = "AccessDenied" + ClusterIssueCodeClusterUnreachable ClusterIssueCode = "ClusterUnreachable" + ClusterIssueCodeConfigurationConflict ClusterIssueCode = "ConfigurationConflict" + ClusterIssueCodeInternalFailure ClusterIssueCode = "InternalFailure" + ClusterIssueCodeResourceLimitExceeded ClusterIssueCode = "ResourceLimitExceeded" + ClusterIssueCodeResourceNotFound ClusterIssueCode = "ResourceNotFound" + ClusterIssueCodeIamRoleNotFound ClusterIssueCode = "IamRoleNotFound" + ClusterIssueCodeVpcNotFound ClusterIssueCode = "VpcNotFound" + ClusterIssueCodeInsufficientFreeAddresses ClusterIssueCode = "InsufficientFreeAddresses" + ClusterIssueCodeEc2ServiceNotSubscribed ClusterIssueCode = "Ec2ServiceNotSubscribed" + ClusterIssueCodeEc2SubnetNotFound ClusterIssueCode = "Ec2SubnetNotFound" + ClusterIssueCodeEc2SecurityGroupNotFound ClusterIssueCode = "Ec2SecurityGroupNotFound" + ClusterIssueCodeKmsGrantRevoked ClusterIssueCode = "KmsGrantRevoked" + ClusterIssueCodeKmsKeyNotFound ClusterIssueCode = "KmsKeyNotFound" + ClusterIssueCodeKmsKeyMarkedForDeletion ClusterIssueCode = "KmsKeyMarkedForDeletion" + ClusterIssueCodeKmsKeyDisabled ClusterIssueCode = "KmsKeyDisabled" + ClusterIssueCodeStsRegionalEndpointDisabled ClusterIssueCode = "StsRegionalEndpointDisabled" + ClusterIssueCodeUnsupportedVersion ClusterIssueCode = "UnsupportedVersion" + ClusterIssueCodeOther ClusterIssueCode = "Other" ) // Values returns all known values for ClusterIssueCode. Note that this can be @@ -141,6 +154,19 @@ func (ClusterIssueCode) Values() []ClusterIssueCode { "InternalFailure", "ResourceLimitExceeded", "ResourceNotFound", + "IamRoleNotFound", + "VpcNotFound", + "InsufficientFreeAddresses", + "Ec2ServiceNotSubscribed", + "Ec2SubnetNotFound", + "Ec2SecurityGroupNotFound", + "KmsGrantRevoked", + "KmsKeyNotFound", + "KmsKeyMarkedForDeletion", + "KmsKeyDisabled", + "StsRegionalEndpointDisabled", + "UnsupportedVersion", + "Other", } } @@ -511,6 +537,9 @@ const ( UpdateParamTypeResolveConflicts UpdateParamType = "ResolveConflicts" UpdateParamTypeMaxUnavailable UpdateParamType = "MaxUnavailable" UpdateParamTypeMaxUnavailablePercentage UpdateParamType = "MaxUnavailablePercentage" + UpdateParamTypeConfigurationValues UpdateParamType = "ConfigurationValues" + UpdateParamTypeSecurityGroups UpdateParamType = "SecurityGroups" + UpdateParamTypeSubnets UpdateParamType = "Subnets" ) // Values returns all known values for UpdateParamType. Note that this can be @@ -541,6 +570,9 @@ func (UpdateParamType) Values() []UpdateParamType { "ResolveConflicts", "MaxUnavailable", "MaxUnavailablePercentage", + "ConfigurationValues", + "SecurityGroups", + "Subnets", } } @@ -578,6 +610,7 @@ const ( UpdateTypeDisassociateIdentityProviderConfig UpdateType = "DisassociateIdentityProviderConfig" UpdateTypeAssociateEncryptionConfig UpdateType = "AssociateEncryptionConfig" UpdateTypeAddonUpdate UpdateType = "AddonUpdate" + UpdateTypeVpcConfigUpdate UpdateType = "VpcConfigUpdate" ) // Values returns all known values for UpdateType. Note that this can be expanded @@ -593,5 +626,6 @@ func (UpdateType) Values() []UpdateType { "DisassociateIdentityProviderConfig", "AssociateEncryptionConfig", "AddonUpdate", + "VpcConfigUpdate", } } diff --git a/service/glue/internal/endpoints/endpoints.go b/service/glue/internal/endpoints/endpoints.go index 7e672826ad2..b8ca6187bd9 100644 --- a/service/glue/internal/endpoints/endpoints.go +++ b/service/glue/internal/endpoints/endpoints.go @@ -479,6 +479,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "glue-fips.us-gov-east-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "glue-fips.us-gov-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "glue.us-gov-east-1.api.aws", + }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{}, @@ -488,6 +500,18 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "glue-fips.us-gov-west-1.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "glue-fips.us-gov-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "glue.us-gov-west-1.api.aws", + }, }, }, } diff --git a/service/iam/endpoints.go b/service/iam/endpoints.go index ff010df026d..d6b91bc2c02 100644 --- a/service/iam/endpoints.go +++ b/service/iam/endpoints.go @@ -579,6 +579,34 @@ func (r *resolver) ResolveEndpoint( } } } + if _PartitionResult.Name == "aws-iso-f" { + if _UseFIPS == false { + if _UseDualStack == false { + uriString := "https://iam.us-isof-south-1.csp.hci.ic.gov" + + uri, err := url.Parse(uriString) + if err != nil { + return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) + } + + return smithyendpoints.Endpoint{ + URI: *uri, + Headers: http.Header{}, + Properties: func() smithy.Properties { + var out smithy.Properties + out.Set("authSchemes", []interface{}{ + map[string]interface{}{ + "name": "sigv4", + "signingName": "iam", + "signingRegion": "us-isof-south-1", + }, + }) + return out + }(), + }, nil + } + } + } if _UseFIPS == true { if _UseDualStack == true { if true == _PartitionResult.SupportsFIPS { @@ -607,7 +635,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://iam-fips.") diff --git a/service/licensemanagerusersubscriptions/internal/endpoints/endpoints.go b/service/licensemanagerusersubscriptions/internal/endpoints/endpoints.go index 9f449df0bf7..b02afe5c036 100644 --- a/service/licensemanagerusersubscriptions/internal/endpoints/endpoints.go +++ b/service/licensemanagerusersubscriptions/internal/endpoints/endpoints.go @@ -235,6 +235,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "il-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, diff --git a/service/migrationhubconfig/api_op_DeleteHomeRegionControl.go b/service/migrationhubconfig/api_op_DeleteHomeRegionControl.go new file mode 100644 index 00000000000..9ac022ccfa3 --- /dev/null +++ b/service/migrationhubconfig/api_op_DeleteHomeRegionControl.go @@ -0,0 +1,259 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubconfig + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// This operation deletes the home region configuration for the calling account. +// The operation does not delete discovery or migration tracking data in the home +// region. +func (c *Client) DeleteHomeRegionControl(ctx context.Context, params *DeleteHomeRegionControlInput, optFns ...func(*Options)) (*DeleteHomeRegionControlOutput, error) { + if params == nil { + params = &DeleteHomeRegionControlInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteHomeRegionControl", params, optFns, c.addOperationDeleteHomeRegionControlMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteHomeRegionControlOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteHomeRegionControlInput struct { + + // A unique identifier that's generated for each home region control. It's always + // a string that begins with "hrc-" followed by 12 lowercase letters and numbers. + // + // This member is required. + ControlId *string + + noSmithyDocumentSerde +} + +type DeleteHomeRegionControlOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteHomeRegionControlMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteHomeRegionControl{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteHomeRegionControl{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addDeleteHomeRegionControlResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteHomeRegionControlValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteHomeRegionControl(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteHomeRegionControl(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgh", + OperationName: "DeleteHomeRegionControl", + } +} + +type opDeleteHomeRegionControlResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opDeleteHomeRegionControlResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opDeleteHomeRegionControlResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "mgh" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "mgh" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("mgh") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addDeleteHomeRegionControlResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opDeleteHomeRegionControlResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/migrationhubconfig/deserializers.go b/service/migrationhubconfig/deserializers.go index 02ad7ab3a1e..eb5de0db03c 100644 --- a/service/migrationhubconfig/deserializers.go +++ b/service/migrationhubconfig/deserializers.go @@ -145,6 +145,129 @@ func awsAwsjson11_deserializeOpErrorCreateHomeRegionControl(response *smithyhttp } } +type awsAwsjson11_deserializeOpDeleteHomeRegionControl struct { +} + +func (*awsAwsjson11_deserializeOpDeleteHomeRegionControl) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteHomeRegionControl) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson11_deserializeOpErrorDeleteHomeRegionControl(response, &metadata) + } + output := &DeleteHomeRegionControlOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson11_deserializeOpDocumentDeleteHomeRegionControlOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteHomeRegionControl(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsAwsjson11_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidInputException", errorCode): + return awsAwsjson11_deserializeErrorInvalidInputException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsAwsjson11_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDescribeHomeRegionControls struct { } @@ -1043,6 +1166,37 @@ func awsAwsjson11_deserializeOpDocumentCreateHomeRegionControlOutput(v **CreateH return nil } +func awsAwsjson11_deserializeOpDocumentDeleteHomeRegionControlOutput(v **DeleteHomeRegionControlOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteHomeRegionControlOutput + if *v == nil { + sv = &DeleteHomeRegionControlOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDescribeHomeRegionControlsOutput(v **DescribeHomeRegionControlsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/migrationhubconfig/endpoints.go b/service/migrationhubconfig/endpoints.go index a35c64af2b8..0904571e2fd 100644 --- a/service/migrationhubconfig/endpoints.go +++ b/service/migrationhubconfig/endpoints.go @@ -410,7 +410,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://migrationhub-config-fips.") diff --git a/service/migrationhubconfig/generated.json b/service/migrationhubconfig/generated.json index d417256c271..bae0751288d 100644 --- a/service/migrationhubconfig/generated.json +++ b/service/migrationhubconfig/generated.json @@ -10,6 +10,7 @@ "api_client.go", "api_client_test.go", "api_op_CreateHomeRegionControl.go", + "api_op_DeleteHomeRegionControl.go", "api_op_DescribeHomeRegionControls.go", "api_op_GetHomeRegion.go", "deserializers.go", diff --git a/service/migrationhubconfig/serializers.go b/service/migrationhubconfig/serializers.go index 8448e464655..e877e9fb74f 100644 --- a/service/migrationhubconfig/serializers.go +++ b/service/migrationhubconfig/serializers.go @@ -70,6 +70,61 @@ func (m *awsAwsjson11_serializeOpCreateHomeRegionControl) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteHomeRegionControl struct { +} + +func (*awsAwsjson11_serializeOpDeleteHomeRegionControl) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteHomeRegionControl) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteHomeRegionControlInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("AWSMigrationHubMultiAccountService.DeleteHomeRegionControl") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteHomeRegionControlInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDescribeHomeRegionControls struct { } @@ -220,6 +275,18 @@ func awsAwsjson11_serializeOpDocumentCreateHomeRegionControlInput(v *CreateHomeR return nil } +func awsAwsjson11_serializeOpDocumentDeleteHomeRegionControlInput(v *DeleteHomeRegionControlInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ControlId != nil { + ok := object.Key("ControlId") + ok.String(*v.ControlId) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDescribeHomeRegionControlsInput(v *DescribeHomeRegionControlsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/migrationhubconfig/validators.go b/service/migrationhubconfig/validators.go index b215c8e8126..3436ca392a6 100644 --- a/service/migrationhubconfig/validators.go +++ b/service/migrationhubconfig/validators.go @@ -30,6 +30,26 @@ func (m *validateOpCreateHomeRegionControl) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpDeleteHomeRegionControl struct { +} + +func (*validateOpDeleteHomeRegionControl) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteHomeRegionControl) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteHomeRegionControlInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteHomeRegionControlInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeHomeRegionControls struct { } @@ -54,6 +74,10 @@ func addOpCreateHomeRegionControlValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpCreateHomeRegionControl{}, middleware.After) } +func addOpDeleteHomeRegionControlValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteHomeRegionControl{}, middleware.After) +} + func addOpDescribeHomeRegionControlsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeHomeRegionControls{}, middleware.After) } @@ -95,6 +119,21 @@ func validateOpCreateHomeRegionControlInput(v *CreateHomeRegionControlInput) err } } +func validateOpDeleteHomeRegionControlInput(v *DeleteHomeRegionControlInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteHomeRegionControlInput"} + if v.ControlId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ControlId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeHomeRegionControlsInput(v *DescribeHomeRegionControlsInput) error { if v == nil { return nil diff --git a/service/migrationhubstrategy/api_op_ListAnalyzableServers.go b/service/migrationhubstrategy/api_op_ListAnalyzableServers.go new file mode 100644 index 00000000000..3c2665c3d78 --- /dev/null +++ b/service/migrationhubstrategy/api_op_ListAnalyzableServers.go @@ -0,0 +1,365 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package migrationhubstrategy + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/migrationhubstrategy/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves a list of all the servers fetched from customer vCenter using +// Strategy Recommendation Collector. +func (c *Client) ListAnalyzableServers(ctx context.Context, params *ListAnalyzableServersInput, optFns ...func(*Options)) (*ListAnalyzableServersOutput, error) { + if params == nil { + params = &ListAnalyzableServersInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListAnalyzableServers", params, optFns, c.addOperationListAnalyzableServersMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListAnalyzableServersOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Represents input for ListAnalyzableServers operation. +type ListAnalyzableServersInput struct { + + // The maximum number of items to include in the response. The maximum value is + // 100. + MaxResults *int32 + + // The token from a previous call that you use to retrieve the next set of + // results. For example, if a previous call to this action returned 100 items, but + // you set maxResults to 10. You'll receive a set of 10 results along with a token. + // You then use the returned token to retrieve the next set of 10. + NextToken *string + + // Specifies whether to sort by ascending (ASC) or descending (DESC) order. + Sort types.SortOrder + + noSmithyDocumentSerde +} + +// Represents output for ListAnalyzableServers operation. +type ListAnalyzableServersOutput struct { + + // The list of analyzable servers with summary information about each server. + AnalyzableServers []types.AnalyzableServerSummary + + // The token you use to retrieve the next set of results, or null if there are no + // more results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListAnalyzableServersMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListAnalyzableServers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAnalyzableServers{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListAnalyzableServersResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAnalyzableServers(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListAnalyzableServersAPIClient is a client that implements the +// ListAnalyzableServers operation. +type ListAnalyzableServersAPIClient interface { + ListAnalyzableServers(context.Context, *ListAnalyzableServersInput, ...func(*Options)) (*ListAnalyzableServersOutput, error) +} + +var _ ListAnalyzableServersAPIClient = (*Client)(nil) + +// ListAnalyzableServersPaginatorOptions is the paginator options for +// ListAnalyzableServers +type ListAnalyzableServersPaginatorOptions struct { + // The maximum number of items to include in the response. The maximum value is + // 100. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListAnalyzableServersPaginator is a paginator for ListAnalyzableServers +type ListAnalyzableServersPaginator struct { + options ListAnalyzableServersPaginatorOptions + client ListAnalyzableServersAPIClient + params *ListAnalyzableServersInput + nextToken *string + firstPage bool +} + +// NewListAnalyzableServersPaginator returns a new ListAnalyzableServersPaginator +func NewListAnalyzableServersPaginator(client ListAnalyzableServersAPIClient, params *ListAnalyzableServersInput, optFns ...func(*ListAnalyzableServersPaginatorOptions)) *ListAnalyzableServersPaginator { + if params == nil { + params = &ListAnalyzableServersInput{} + } + + options := ListAnalyzableServersPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListAnalyzableServersPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListAnalyzableServersPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListAnalyzableServers page. +func (p *ListAnalyzableServersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAnalyzableServersOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + result, err := p.client.ListAnalyzableServers(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListAnalyzableServers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "migrationhub-strategy", + OperationName: "ListAnalyzableServers", + } +} + +type opListAnalyzableServersResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListAnalyzableServersResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListAnalyzableServersResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "migrationhub-strategy" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "migrationhub-strategy" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("migrationhub-strategy") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListAnalyzableServersResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListAnalyzableServersResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/migrationhubstrategy/api_op_StartAssessment.go b/service/migrationhubstrategy/api_op_StartAssessment.go index 61e2e00ff43..55eb3e365e7 100644 --- a/service/migrationhubstrategy/api_op_StartAssessment.go +++ b/service/migrationhubstrategy/api_op_StartAssessment.go @@ -34,6 +34,9 @@ func (c *Client) StartAssessment(ctx context.Context, params *StartAssessmentInp type StartAssessmentInput struct { + // The data source type of an assessment to be started. + AssessmentDataSourceType types.AssessmentDataSourceType + // List of criteria for assessment. AssessmentTargets []types.AssessmentTarget diff --git a/service/migrationhubstrategy/deserializers.go b/service/migrationhubstrategy/deserializers.go index f0d24015f7e..23b8f83b25a 100644 --- a/service/migrationhubstrategy/deserializers.go +++ b/service/migrationhubstrategy/deserializers.go @@ -1777,6 +1777,171 @@ func awsRestjson1_deserializeOpDocumentGetServerStrategiesOutput(v **GetServerSt return nil } +type awsRestjson1_deserializeOpListAnalyzableServers struct { +} + +func (*awsRestjson1_deserializeOpListAnalyzableServers) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAnalyzableServers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListAnalyzableServers(response, &metadata) + } + output := &ListAnalyzableServersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListAnalyzableServersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListAnalyzableServers(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListAnalyzableServersOutput(v **ListAnalyzableServersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAnalyzableServersOutput + if *v == nil { + sv = &ListAnalyzableServersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "analyzableServers": + if err := awsRestjson1_deserializeDocumentAnalyzableServerSummaryList(&sv.AnalyzableServers, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListApplicationComponents struct { } @@ -3712,6 +3877,107 @@ loop: return nil } +func awsRestjson1_deserializeDocumentAnalyzableServerSummary(v **types.AnalyzableServerSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AnalyzableServerSummary + if *v == nil { + sv = &types.AnalyzableServerSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "hostname": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Hostname = ptr.String(jtv) + } + + case "ipAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.IpAddress = ptr.String(jtv) + } + + case "source": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Source = ptr.String(jtv) + } + + case "vmId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.VmId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAnalyzableServerSummaryList(v *[]types.AnalyzableServerSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AnalyzableServerSummary + if *v == nil { + cv = []types.AnalyzableServerSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AnalyzableServerSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAnalyzableServerSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentAnalyzerNameUnion(v *types.AnalyzerNameUnion, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/migrationhubstrategy/endpoints.go b/service/migrationhubstrategy/endpoints.go index e481bcfcdad..a62ef844f72 100644 --- a/service/migrationhubstrategy/endpoints.go +++ b/service/migrationhubstrategy/endpoints.go @@ -410,7 +410,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://migrationhub-strategy-fips.") diff --git a/service/migrationhubstrategy/generated.json b/service/migrationhubstrategy/generated.json index 5942d64581f..a0a0dfa6b69 100644 --- a/service/migrationhubstrategy/generated.json +++ b/service/migrationhubstrategy/generated.json @@ -19,6 +19,7 @@ "api_op_GetRecommendationReportDetails.go", "api_op_GetServerDetails.go", "api_op_GetServerStrategies.go", + "api_op_ListAnalyzableServers.go", "api_op_ListApplicationComponents.go", "api_op_ListCollectors.go", "api_op_ListImportFileTask.go", diff --git a/service/migrationhubstrategy/serializers.go b/service/migrationhubstrategy/serializers.go index 2016741a4c3..97cd4095f11 100644 --- a/service/migrationhubstrategy/serializers.go +++ b/service/migrationhubstrategy/serializers.go @@ -633,6 +633,91 @@ func awsRestjson1_serializeOpHttpBindingsGetServerStrategiesInput(v *GetServerSt return nil } +type awsRestjson1_serializeOpListAnalyzableServers struct { +} + +func (*awsRestjson1_serializeOpListAnalyzableServers) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListAnalyzableServers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListAnalyzableServersInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/list-analyzable-servers") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentListAnalyzableServersInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListAnalyzableServersInput(v *ListAnalyzableServersInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListAnalyzableServersInput(v *ListAnalyzableServersInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if len(v.Sort) > 0 { + ok := object.Key("sort") + ok.String(string(v.Sort)) + } + + return nil +} + type awsRestjson1_serializeOpListApplicationComponents struct { } @@ -1128,6 +1213,11 @@ func awsRestjson1_serializeOpDocumentStartAssessmentInput(v *StartAssessmentInpu object := value.Object() defer object.Close() + if len(v.AssessmentDataSourceType) > 0 { + ok := object.Key("assessmentDataSourceType") + ok.String(string(v.AssessmentDataSourceType)) + } + if v.AssessmentTargets != nil { ok := object.Key("assessmentTargets") if err := awsRestjson1_serializeDocumentAssessmentTargets(v.AssessmentTargets, ok); err != nil { diff --git a/service/migrationhubstrategy/types/enums.go b/service/migrationhubstrategy/types/enums.go index ad9318bddb1..f9920970cbe 100644 --- a/service/migrationhubstrategy/types/enums.go +++ b/service/migrationhubstrategy/types/enums.go @@ -177,6 +177,26 @@ func (AppUnitErrorCategory) Values() []AppUnitErrorCategory { } } +type AssessmentDataSourceType string + +// Enum values for AssessmentDataSourceType +const ( + AssessmentDataSourceTypeSrCollector AssessmentDataSourceType = "StrategyRecommendationsApplicationDataCollector" + AssessmentDataSourceTypeManualImport AssessmentDataSourceType = "ManualImport" + AssessmentDataSourceTypeAds AssessmentDataSourceType = "ApplicationDiscoveryService" +) + +// Values returns all known values for AssessmentDataSourceType. Note that this +// can be expanded in the future, and so it is only as up to date as the client. +// The ordering of this slice is not guaranteed to be stable across updates. +func (AssessmentDataSourceType) Values() []AssessmentDataSourceType { + return []AssessmentDataSourceType{ + "StrategyRecommendationsApplicationDataCollector", + "ManualImport", + "ApplicationDiscoveryService", + } +} + type AssessmentStatus string // Enum values for AssessmentStatus @@ -322,9 +342,10 @@ type DataSourceType string // Enum values for DataSourceType const ( - DataSourceTypeAds DataSourceType = "ApplicationDiscoveryService" - DataSourceTypeMpa DataSourceType = "MPA" - DataSourceTypeImport DataSourceType = "Import" + DataSourceTypeAds DataSourceType = "ApplicationDiscoveryService" + DataSourceTypeMpa DataSourceType = "MPA" + DataSourceTypeImport DataSourceType = "Import" + DataSourceTypeMhsrCollector DataSourceType = "StrategyRecommendationsApplicationDataCollector" ) // Values returns all known values for DataSourceType. Note that this can be @@ -335,6 +356,7 @@ func (DataSourceType) Values() []DataSourceType { "ApplicationDiscoveryService", "MPA", "Import", + "StrategyRecommendationsApplicationDataCollector", } } diff --git a/service/migrationhubstrategy/types/types.go b/service/migrationhubstrategy/types/types.go index 195cfa4f0c1..45b25bb805d 100644 --- a/service/migrationhubstrategy/types/types.go +++ b/service/migrationhubstrategy/types/types.go @@ -35,6 +35,24 @@ type AnalysisStatusUnionMemberSrcCodeOrDbAnalysisStatus struct { func (*AnalysisStatusUnionMemberSrcCodeOrDbAnalysisStatus) isAnalysisStatusUnion() {} +// Summary information about an analyzable server. +type AnalyzableServerSummary struct { + + // The host name of the analyzable server. + Hostname *string + + // The ip address of the analyzable server. + IpAddress *string + + // The data source of the analyzable server. + Source *string + + // The virtual machine id of the analyzable server. + VmId *string + + noSmithyDocumentSerde +} + // The combination of the existing analyzers. // // The following types satisfy this interface: diff --git a/service/opensearchserverless/api_op_BatchGetEffectiveLifecyclePolicy.go b/service/opensearchserverless/api_op_BatchGetEffectiveLifecyclePolicy.go new file mode 100644 index 00000000000..e0d7dff2796 --- /dev/null +++ b/service/opensearchserverless/api_op_BatchGetEffectiveLifecyclePolicy.go @@ -0,0 +1,266 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearchserverless + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/opensearchserverless/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of successful and failed retrievals for the OpenSearch +// Serverless indexes. For more information, see Viewing data lifecycle policies (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html#serverless-lifecycle-list) +// . +func (c *Client) BatchGetEffectiveLifecyclePolicy(ctx context.Context, params *BatchGetEffectiveLifecyclePolicyInput, optFns ...func(*Options)) (*BatchGetEffectiveLifecyclePolicyOutput, error) { + if params == nil { + params = &BatchGetEffectiveLifecyclePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetEffectiveLifecyclePolicy", params, optFns, c.addOperationBatchGetEffectiveLifecyclePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetEffectiveLifecyclePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetEffectiveLifecyclePolicyInput struct { + + // The unique identifiers of policy types and resource names. + // + // This member is required. + ResourceIdentifiers []types.LifecyclePolicyResourceIdentifier + + noSmithyDocumentSerde +} + +type BatchGetEffectiveLifecyclePolicyOutput struct { + + // A list of lifecycle policies applied to the OpenSearch Serverless indexes. + EffectiveLifecyclePolicyDetails []types.EffectiveLifecyclePolicyDetail + + // A list of resources for which retrieval failed. + EffectiveLifecyclePolicyErrorDetails []types.EffectiveLifecyclePolicyErrorDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetEffectiveLifecyclePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchGetEffectiveLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchGetEffectiveLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addBatchGetEffectiveLifecyclePolicyResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpBatchGetEffectiveLifecyclePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetEffectiveLifecyclePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetEffectiveLifecyclePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "aoss", + OperationName: "BatchGetEffectiveLifecyclePolicy", + } +} + +type opBatchGetEffectiveLifecyclePolicyResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opBatchGetEffectiveLifecyclePolicyResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opBatchGetEffectiveLifecyclePolicyResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "aoss" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "aoss" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("aoss") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addBatchGetEffectiveLifecyclePolicyResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opBatchGetEffectiveLifecyclePolicyResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/opensearchserverless/api_op_BatchGetLifecyclePolicy.go b/service/opensearchserverless/api_op_BatchGetLifecyclePolicy.go new file mode 100644 index 00000000000..8e15741e06d --- /dev/null +++ b/service/opensearchserverless/api_op_BatchGetLifecyclePolicy.go @@ -0,0 +1,266 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearchserverless + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/opensearchserverless/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns one or more configured OpenSearch Serverless lifecycle policies. For +// more information, see Viewing data lifecycle policies (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html#serverless-lifecycle-list) +// . +func (c *Client) BatchGetLifecyclePolicy(ctx context.Context, params *BatchGetLifecyclePolicyInput, optFns ...func(*Options)) (*BatchGetLifecyclePolicyOutput, error) { + if params == nil { + params = &BatchGetLifecyclePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "BatchGetLifecyclePolicy", params, optFns, c.addOperationBatchGetLifecyclePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*BatchGetLifecyclePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type BatchGetLifecyclePolicyInput struct { + + // The unique identifiers of policy types and policy names. + // + // This member is required. + Identifiers []types.LifecyclePolicyIdentifier + + noSmithyDocumentSerde +} + +type BatchGetLifecyclePolicyOutput struct { + + // A list of lifecycle policies matched to the input policy name and policy type. + LifecyclePolicyDetails []types.LifecyclePolicyDetail + + // A list of lifecycle policy names and policy types for which retrieval failed. + LifecyclePolicyErrorDetails []types.LifecyclePolicyErrorDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationBatchGetLifecyclePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpBatchGetLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpBatchGetLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addBatchGetLifecyclePolicyResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpBatchGetLifecyclePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchGetLifecyclePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opBatchGetLifecyclePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "aoss", + OperationName: "BatchGetLifecyclePolicy", + } +} + +type opBatchGetLifecyclePolicyResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opBatchGetLifecyclePolicyResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opBatchGetLifecyclePolicyResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "aoss" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "aoss" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("aoss") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addBatchGetLifecyclePolicyResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opBatchGetLifecyclePolicyResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/opensearchserverless/api_op_CreateLifecyclePolicy.go b/service/opensearchserverless/api_op_CreateLifecyclePolicy.go new file mode 100644 index 00000000000..15c40dd9095 --- /dev/null +++ b/service/opensearchserverless/api_op_CreateLifecyclePolicy.go @@ -0,0 +1,317 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearchserverless + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/opensearchserverless/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a lifecyle policy to be applied to OpenSearch Serverless indexes. +// Lifecycle policies define the number of days or hours to retain the data on an +// OpenSearch Serverless index. For more information, see Creating data lifecycle +// policies (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html#serverless-lifecycle-create) +// . +func (c *Client) CreateLifecyclePolicy(ctx context.Context, params *CreateLifecyclePolicyInput, optFns ...func(*Options)) (*CreateLifecyclePolicyOutput, error) { + if params == nil { + params = &CreateLifecyclePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateLifecyclePolicy", params, optFns, c.addOperationCreateLifecyclePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateLifecyclePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateLifecyclePolicyInput struct { + + // The name of the lifecycle policy. + // + // This member is required. + Name *string + + // The JSON policy document to use as the content for the lifecycle policy. + // + // This member is required. + Policy *string + + // The type of lifecycle policy. + // + // This member is required. + Type types.LifecyclePolicyType + + // A unique, case-sensitive identifier to ensure idempotency of the request. + ClientToken *string + + // A description of the lifecycle policy. + Description *string + + noSmithyDocumentSerde +} + +type CreateLifecyclePolicyOutput struct { + + // Details about the created lifecycle policy. + LifecyclePolicyDetail *types.LifecyclePolicyDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateLifecyclePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpCreateLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpCreateLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addCreateLifecyclePolicyResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateLifecyclePolicyMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateLifecyclePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateLifecyclePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateLifecyclePolicy struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateLifecyclePolicy) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateLifecyclePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*CreateLifecyclePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateLifecyclePolicyInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateLifecyclePolicyMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateLifecyclePolicy{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateLifecyclePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "aoss", + OperationName: "CreateLifecyclePolicy", + } +} + +type opCreateLifecyclePolicyResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opCreateLifecyclePolicyResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opCreateLifecyclePolicyResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "aoss" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "aoss" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("aoss") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addCreateLifecyclePolicyResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opCreateLifecyclePolicyResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/opensearchserverless/api_op_DeleteLifecyclePolicy.go b/service/opensearchserverless/api_op_DeleteLifecyclePolicy.go new file mode 100644 index 00000000000..f31d61d531c --- /dev/null +++ b/service/opensearchserverless/api_op_DeleteLifecyclePolicy.go @@ -0,0 +1,303 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearchserverless + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/opensearchserverless/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes an OpenSearch Serverless lifecycle policy. For more information, see +// Deleting data lifecycle policies (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html#serverless-lifecycle-delete) +// . +func (c *Client) DeleteLifecyclePolicy(ctx context.Context, params *DeleteLifecyclePolicyInput, optFns ...func(*Options)) (*DeleteLifecyclePolicyOutput, error) { + if params == nil { + params = &DeleteLifecyclePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteLifecyclePolicy", params, optFns, c.addOperationDeleteLifecyclePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteLifecyclePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteLifecyclePolicyInput struct { + + // The name of the policy to delete. + // + // This member is required. + Name *string + + // The type of lifecycle policy. + // + // This member is required. + Type types.LifecyclePolicyType + + // Unique, case-sensitive identifier to ensure idempotency of the request. + ClientToken *string + + noSmithyDocumentSerde +} + +type DeleteLifecyclePolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteLifecyclePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpDeleteLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpDeleteLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addDeleteLifecyclePolicyResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opDeleteLifecyclePolicyMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteLifecyclePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteLifecyclePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpDeleteLifecyclePolicy struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpDeleteLifecyclePolicy) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpDeleteLifecyclePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*DeleteLifecyclePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *DeleteLifecyclePolicyInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opDeleteLifecyclePolicyMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpDeleteLifecyclePolicy{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opDeleteLifecyclePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "aoss", + OperationName: "DeleteLifecyclePolicy", + } +} + +type opDeleteLifecyclePolicyResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opDeleteLifecyclePolicyResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opDeleteLifecyclePolicyResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "aoss" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "aoss" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("aoss") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addDeleteLifecyclePolicyResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opDeleteLifecyclePolicyResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/opensearchserverless/api_op_GetAccessPolicy.go b/service/opensearchserverless/api_op_GetAccessPolicy.go index 7406121776b..84cf7a219ea 100644 --- a/service/opensearchserverless/api_op_GetAccessPolicy.go +++ b/service/opensearchserverless/api_op_GetAccessPolicy.go @@ -41,7 +41,7 @@ type GetAccessPolicyInput struct { // This member is required. Name *string - // Tye type of policy. Currently the only supported value is data . + // Tye type of policy. Currently, the only supported value is data . // // This member is required. Type types.AccessPolicyType diff --git a/service/opensearchserverless/api_op_GetPoliciesStats.go b/service/opensearchserverless/api_op_GetPoliciesStats.go index 1ffdc296c45..ab8ae927233 100644 --- a/service/opensearchserverless/api_op_GetPoliciesStats.go +++ b/service/opensearchserverless/api_op_GetPoliciesStats.go @@ -42,6 +42,9 @@ type GetPoliciesStatsOutput struct { // Information about the data access policies in your account. AccessPolicyStats *types.AccessPolicyStats + // Information about the lifecycle policies in your account. + LifecyclePolicyStats *types.LifecyclePolicyStats + // Information about the security configurations in your account. SecurityConfigStats *types.SecurityConfigStats diff --git a/service/opensearchserverless/api_op_ListCollections.go b/service/opensearchserverless/api_op_ListCollections.go index f0452f146a2..d5f8fa04238 100644 --- a/service/opensearchserverless/api_op_ListCollections.go +++ b/service/opensearchserverless/api_op_ListCollections.go @@ -37,7 +37,7 @@ func (c *Client) ListCollections(ctx context.Context, params *ListCollectionsInp type ListCollectionsInput struct { - // List of filter names and values that you can use for requests. + // A list of filter names and values that you can use for requests. CollectionFilters *types.CollectionFilters // The maximum number of results to return. Default is 20. You can use nextToken diff --git a/service/opensearchserverless/api_op_ListLifecyclePolicies.go b/service/opensearchserverless/api_op_ListLifecyclePolicies.go new file mode 100644 index 00000000000..7b5e6dcfea2 --- /dev/null +++ b/service/opensearchserverless/api_op_ListLifecyclePolicies.go @@ -0,0 +1,360 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearchserverless + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/opensearchserverless/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of OpenSearch Serverless lifecycle policies. For more +// information, see Viewing data lifecycle policies (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html#serverless-lifecycle-list) +// . +func (c *Client) ListLifecyclePolicies(ctx context.Context, params *ListLifecyclePoliciesInput, optFns ...func(*Options)) (*ListLifecyclePoliciesOutput, error) { + if params == nil { + params = &ListLifecyclePoliciesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListLifecyclePolicies", params, optFns, c.addOperationListLifecyclePoliciesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListLifecyclePoliciesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListLifecyclePoliciesInput struct { + + // The type of lifecycle policy. + // + // This member is required. + Type types.LifecyclePolicyType + + // An optional parameter that specifies the maximum number of results to return. + // You can use use nextToken to get the next page of results. The default is 10. + MaxResults *int32 + + // If your initial ListLifecyclePolicies operation returns a nextToken , you can + // include the returned nextToken in subsequent ListLifecyclePolicies operations, + // which returns results in the next page. + NextToken *string + + // Resource filters that policies can apply to. Currently, the only supported + // resource type is index . + Resources []string + + noSmithyDocumentSerde +} + +type ListLifecyclePoliciesOutput struct { + + // Details about the requested lifecycle policies. + LifecyclePolicySummaries []types.LifecyclePolicySummary + + // When nextToken is returned, there are more results available. The value of + // nextToken is a unique pagination token for each page. Make the call again using + // the returned token to retrieve the next page. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListLifecyclePoliciesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpListLifecyclePolicies{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpListLifecyclePolicies{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addListLifecyclePoliciesResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addOpListLifecyclePoliciesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListLifecyclePolicies(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListLifecyclePoliciesAPIClient is a client that implements the +// ListLifecyclePolicies operation. +type ListLifecyclePoliciesAPIClient interface { + ListLifecyclePolicies(context.Context, *ListLifecyclePoliciesInput, ...func(*Options)) (*ListLifecyclePoliciesOutput, error) +} + +var _ ListLifecyclePoliciesAPIClient = (*Client)(nil) + +// ListLifecyclePoliciesPaginatorOptions is the paginator options for +// ListLifecyclePolicies +type ListLifecyclePoliciesPaginatorOptions struct { + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListLifecyclePoliciesPaginator is a paginator for ListLifecyclePolicies +type ListLifecyclePoliciesPaginator struct { + options ListLifecyclePoliciesPaginatorOptions + client ListLifecyclePoliciesAPIClient + params *ListLifecyclePoliciesInput + nextToken *string + firstPage bool +} + +// NewListLifecyclePoliciesPaginator returns a new ListLifecyclePoliciesPaginator +func NewListLifecyclePoliciesPaginator(client ListLifecyclePoliciesAPIClient, params *ListLifecyclePoliciesInput, optFns ...func(*ListLifecyclePoliciesPaginatorOptions)) *ListLifecyclePoliciesPaginator { + if params == nil { + params = &ListLifecyclePoliciesInput{} + } + + options := ListLifecyclePoliciesPaginatorOptions{} + + for _, fn := range optFns { + fn(&options) + } + + return &ListLifecyclePoliciesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListLifecyclePoliciesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListLifecyclePolicies page. +func (p *ListLifecyclePoliciesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListLifecyclePoliciesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + result, err := p.client.ListLifecyclePolicies(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListLifecyclePolicies(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "aoss", + OperationName: "ListLifecyclePolicies", + } +} + +type opListLifecyclePoliciesResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opListLifecyclePoliciesResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opListLifecyclePoliciesResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "aoss" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "aoss" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("aoss") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addListLifecyclePoliciesResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opListLifecyclePoliciesResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/opensearchserverless/api_op_UpdateLifecyclePolicy.go b/service/opensearchserverless/api_op_UpdateLifecyclePolicy.go new file mode 100644 index 00000000000..5053a58179a --- /dev/null +++ b/service/opensearchserverless/api_op_UpdateLifecyclePolicy.go @@ -0,0 +1,318 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package opensearchserverless + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + "github.com/aws/aws-sdk-go-v2/service/opensearchserverless/types" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an OpenSearch Serverless access policy. For more information, see +// Updating data lifecycle policies (https://docs.aws.amazon.com/opensearch-service/latest/developerguide/serverless-lifecycle.html#serverless-lifecycle-update) +// . +func (c *Client) UpdateLifecyclePolicy(ctx context.Context, params *UpdateLifecyclePolicyInput, optFns ...func(*Options)) (*UpdateLifecyclePolicyOutput, error) { + if params == nil { + params = &UpdateLifecyclePolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateLifecyclePolicy", params, optFns, c.addOperationUpdateLifecyclePolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateLifecyclePolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateLifecyclePolicyInput struct { + + // The name of the policy. + // + // This member is required. + Name *string + + // The version of the policy being updated. + // + // This member is required. + PolicyVersion *string + + // The type of lifecycle policy. + // + // This member is required. + Type types.LifecyclePolicyType + + // A unique, case-sensitive identifier to ensure idempotency of the request. + ClientToken *string + + // A description of the lifecycle policy. + Description *string + + // The JSON policy document to use as the content for the lifecycle policy. + Policy *string + + noSmithyDocumentSerde +} + +type UpdateLifecyclePolicyOutput struct { + + // Details about the updated lifecycle policy. + LifecyclePolicyDetail *types.LifecyclePolicyDetail + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateLifecyclePolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson10_serializeOpUpdateLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson10_deserializeOpUpdateLifecyclePolicy{}, middleware.After) + if err != nil { + return err + } + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addUpdateLifecyclePolicyResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opUpdateLifecyclePolicyMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateLifecyclePolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateLifecyclePolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.AddRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addendpointDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpUpdateLifecyclePolicy struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateLifecyclePolicy) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateLifecyclePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*UpdateLifecyclePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateLifecyclePolicyInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opUpdateLifecyclePolicyMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateLifecyclePolicy{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateLifecyclePolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "aoss", + OperationName: "UpdateLifecyclePolicy", + } +} + +type opUpdateLifecyclePolicyResolveEndpointMiddleware struct { + EndpointResolver EndpointResolverV2 + BuiltInResolver builtInParameterResolver +} + +func (*opUpdateLifecyclePolicyResolveEndpointMiddleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *opUpdateLifecyclePolicyResolveEndpointMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleSerialize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.EndpointResolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := EndpointParameters{} + + m.BuiltInResolver.ResolveBuiltIns(¶ms) + + var resolvedEndpoint smithyendpoints.Endpoint + resolvedEndpoint, err = m.EndpointResolver.ResolveEndpoint(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL = &resolvedEndpoint.URI + + for k := range resolvedEndpoint.Headers { + req.Header.Set( + k, + resolvedEndpoint.Headers.Get(k), + ) + } + + authSchemes, err := internalauth.GetAuthenticationSchemes(&resolvedEndpoint.Properties) + if err != nil { + var nfe *internalauth.NoAuthenticationSchemesFoundError + if errors.As(err, &nfe) { + // if no auth scheme is found, default to sigv4 + signingName := "aoss" + signingRegion := m.BuiltInResolver.(*builtInResolver).Region + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + + } + var ue *internalauth.UnSupportedAuthenticationSchemeSpecifiedError + if errors.As(err, &ue) { + return out, metadata, fmt.Errorf( + "This operation requests signer version(s) %v but the client only supports %v", + ue.UnsupportedSchemes, + internalauth.SupportedSchemes, + ) + } + } + + for _, authScheme := range authSchemes { + switch authScheme.(type) { + case *internalauth.AuthenticationSchemeV4: + v4Scheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4) + var signingName, signingRegion string + if v4Scheme.SigningName == nil { + signingName = "aoss" + } else { + signingName = *v4Scheme.SigningName + } + if v4Scheme.SigningRegion == nil { + signingRegion = m.BuiltInResolver.(*builtInResolver).Region + } else { + signingRegion = *v4Scheme.SigningRegion + } + if v4Scheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4Scheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + ctx = awsmiddleware.SetSigningRegion(ctx, signingRegion) + break + case *internalauth.AuthenticationSchemeV4A: + v4aScheme, _ := authScheme.(*internalauth.AuthenticationSchemeV4A) + if v4aScheme.SigningName == nil { + v4aScheme.SigningName = aws.String("aoss") + } + if v4aScheme.DisableDoubleEncoding != nil { + // The signer sets an equivalent value at client initialization time. + // Setting this context value will cause the signer to extract it + // and override the value set at client initialization time. + ctx = internalauth.SetDisableDoubleEncoding(ctx, *v4aScheme.DisableDoubleEncoding) + } + ctx = awsmiddleware.SetSigningName(ctx, *v4aScheme.SigningName) + ctx = awsmiddleware.SetSigningRegion(ctx, v4aScheme.SigningRegionSet[0]) + break + case *internalauth.AuthenticationSchemeNone: + break + } + } + + return next.HandleSerialize(ctx, in) +} + +func addUpdateLifecyclePolicyResolveEndpointMiddleware(stack *middleware.Stack, options Options) error { + return stack.Serialize.Insert(&opUpdateLifecyclePolicyResolveEndpointMiddleware{ + EndpointResolver: options.EndpointResolverV2, + BuiltInResolver: &builtInResolver{ + Region: options.Region, + UseDualStack: options.EndpointOptions.UseDualStackEndpoint, + UseFIPS: options.EndpointOptions.UseFIPSEndpoint, + Endpoint: options.BaseEndpoint, + }, + }, "ResolveEndpoint", middleware.After) +} diff --git a/service/opensearchserverless/deserializers.go b/service/opensearchserverless/deserializers.go index 2bfc91481e1..130eae5259f 100644 --- a/service/opensearchserverless/deserializers.go +++ b/service/opensearchserverless/deserializers.go @@ -134,14 +134,14 @@ func awsAwsjson10_deserializeOpErrorBatchGetCollection(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpBatchGetVpcEndpoint struct { +type awsAwsjson10_deserializeOpBatchGetEffectiveLifecyclePolicy struct { } -func (*awsAwsjson10_deserializeOpBatchGetVpcEndpoint) ID() string { +func (*awsAwsjson10_deserializeOpBatchGetEffectiveLifecyclePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpBatchGetVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpBatchGetEffectiveLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -155,9 +155,9 @@ func (m *awsAwsjson10_deserializeOpBatchGetVpcEndpoint) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorBatchGetVpcEndpoint(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorBatchGetEffectiveLifecyclePolicy(response, &metadata) } - output := &BatchGetVpcEndpointOutput{} + output := &BatchGetEffectiveLifecyclePolicyOutput{} out.Result = output var buff [1024]byte @@ -177,7 +177,7 @@ func (m *awsAwsjson10_deserializeOpBatchGetVpcEndpoint) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentBatchGetVpcEndpointOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentBatchGetEffectiveLifecyclePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -191,7 +191,7 @@ func (m *awsAwsjson10_deserializeOpBatchGetVpcEndpoint) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorBatchGetVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorBatchGetEffectiveLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -248,14 +248,14 @@ func awsAwsjson10_deserializeOpErrorBatchGetVpcEndpoint(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpCreateAccessPolicy struct { +type awsAwsjson10_deserializeOpBatchGetLifecyclePolicy struct { } -func (*awsAwsjson10_deserializeOpCreateAccessPolicy) ID() string { +func (*awsAwsjson10_deserializeOpBatchGetLifecyclePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpBatchGetLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -269,9 +269,9 @@ func (m *awsAwsjson10_deserializeOpCreateAccessPolicy) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateAccessPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorBatchGetLifecyclePolicy(response, &metadata) } - output := &CreateAccessPolicyOutput{} + output := &BatchGetLifecyclePolicyOutput{} out.Result = output var buff [1024]byte @@ -291,7 +291,7 @@ func (m *awsAwsjson10_deserializeOpCreateAccessPolicy) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateAccessPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentBatchGetLifecyclePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -305,7 +305,7 @@ func (m *awsAwsjson10_deserializeOpCreateAccessPolicy) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorBatchGetLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -346,15 +346,9 @@ func awsAwsjson10_deserializeOpErrorCreateAccessPolicy(response *smithyhttp.Resp } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -368,14 +362,14 @@ func awsAwsjson10_deserializeOpErrorCreateAccessPolicy(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpCreateCollection struct { +type awsAwsjson10_deserializeOpBatchGetVpcEndpoint struct { } -func (*awsAwsjson10_deserializeOpCreateCollection) ID() string { +func (*awsAwsjson10_deserializeOpBatchGetVpcEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpBatchGetVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -389,9 +383,9 @@ func (m *awsAwsjson10_deserializeOpCreateCollection) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateCollection(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorBatchGetVpcEndpoint(response, &metadata) } - output := &CreateCollectionOutput{} + output := &BatchGetVpcEndpointOutput{} out.Result = output var buff [1024]byte @@ -411,7 +405,7 @@ func (m *awsAwsjson10_deserializeOpCreateCollection) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateCollectionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentBatchGetVpcEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -425,7 +419,7 @@ func (m *awsAwsjson10_deserializeOpCreateCollection) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorBatchGetVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -466,18 +460,9 @@ func awsAwsjson10_deserializeOpErrorCreateCollection(response *smithyhttp.Respon } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("OcuLimitExceededException", errorCode): - return awsAwsjson10_deserializeErrorOcuLimitExceededException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -491,14 +476,14 @@ func awsAwsjson10_deserializeOpErrorCreateCollection(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpCreateSecurityConfig struct { +type awsAwsjson10_deserializeOpCreateAccessPolicy struct { } -func (*awsAwsjson10_deserializeOpCreateSecurityConfig) ID() string { +func (*awsAwsjson10_deserializeOpCreateAccessPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateSecurityConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -512,9 +497,9 @@ func (m *awsAwsjson10_deserializeOpCreateSecurityConfig) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateSecurityConfig(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateAccessPolicy(response, &metadata) } - output := &CreateSecurityConfigOutput{} + output := &CreateAccessPolicyOutput{} out.Result = output var buff [1024]byte @@ -534,7 +519,7 @@ func (m *awsAwsjson10_deserializeOpCreateSecurityConfig) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateSecurityConfigOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateAccessPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -548,7 +533,7 @@ func (m *awsAwsjson10_deserializeOpCreateSecurityConfig) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateSecurityConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -611,14 +596,14 @@ func awsAwsjson10_deserializeOpErrorCreateSecurityConfig(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpCreateSecurityPolicy struct { +type awsAwsjson10_deserializeOpCreateCollection struct { } -func (*awsAwsjson10_deserializeOpCreateSecurityPolicy) ID() string { +func (*awsAwsjson10_deserializeOpCreateCollection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateSecurityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -632,9 +617,9 @@ func (m *awsAwsjson10_deserializeOpCreateSecurityPolicy) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateSecurityPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateCollection(response, &metadata) } - output := &CreateSecurityPolicyOutput{} + output := &CreateCollectionOutput{} out.Result = output var buff [1024]byte @@ -654,7 +639,7 @@ func (m *awsAwsjson10_deserializeOpCreateSecurityPolicy) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateSecurityPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateCollectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -668,7 +653,7 @@ func (m *awsAwsjson10_deserializeOpCreateSecurityPolicy) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateSecurityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -715,6 +700,9 @@ func awsAwsjson10_deserializeOpErrorCreateSecurityPolicy(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("OcuLimitExceededException", errorCode): + return awsAwsjson10_deserializeErrorOcuLimitExceededException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) @@ -731,14 +719,14 @@ func awsAwsjson10_deserializeOpErrorCreateSecurityPolicy(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpCreateVpcEndpoint struct { +type awsAwsjson10_deserializeOpCreateLifecyclePolicy struct { } -func (*awsAwsjson10_deserializeOpCreateVpcEndpoint) ID() string { +func (*awsAwsjson10_deserializeOpCreateLifecyclePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpCreateVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -752,9 +740,9 @@ func (m *awsAwsjson10_deserializeOpCreateVpcEndpoint) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorCreateVpcEndpoint(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateLifecyclePolicy(response, &metadata) } - output := &CreateVpcEndpointOutput{} + output := &CreateLifecyclePolicyOutput{} out.Result = output var buff [1024]byte @@ -774,7 +762,7 @@ func (m *awsAwsjson10_deserializeOpCreateVpcEndpoint) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentCreateVpcEndpointOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateLifecyclePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -788,7 +776,7 @@ func (m *awsAwsjson10_deserializeOpCreateVpcEndpoint) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorCreateVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -851,14 +839,14 @@ func awsAwsjson10_deserializeOpErrorCreateVpcEndpoint(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpDeleteAccessPolicy struct { +type awsAwsjson10_deserializeOpCreateSecurityConfig struct { } -func (*awsAwsjson10_deserializeOpDeleteAccessPolicy) ID() string { +func (*awsAwsjson10_deserializeOpCreateSecurityConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateSecurityConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -872,9 +860,9 @@ func (m *awsAwsjson10_deserializeOpDeleteAccessPolicy) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteAccessPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateSecurityConfig(response, &metadata) } - output := &DeleteAccessPolicyOutput{} + output := &CreateSecurityConfigOutput{} out.Result = output var buff [1024]byte @@ -894,7 +882,7 @@ func (m *awsAwsjson10_deserializeOpDeleteAccessPolicy) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteAccessPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateSecurityConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -908,7 +896,7 @@ func (m *awsAwsjson10_deserializeOpDeleteAccessPolicy) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateSecurityConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -955,8 +943,8 @@ func awsAwsjson10_deserializeOpErrorDeleteAccessPolicy(response *smithyhttp.Resp case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -971,14 +959,14 @@ func awsAwsjson10_deserializeOpErrorDeleteAccessPolicy(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpDeleteCollection struct { +type awsAwsjson10_deserializeOpCreateSecurityPolicy struct { } -func (*awsAwsjson10_deserializeOpDeleteCollection) ID() string { +func (*awsAwsjson10_deserializeOpCreateSecurityPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateSecurityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -992,9 +980,9 @@ func (m *awsAwsjson10_deserializeOpDeleteCollection) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteCollection(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateSecurityPolicy(response, &metadata) } - output := &DeleteCollectionOutput{} + output := &CreateSecurityPolicyOutput{} out.Result = output var buff [1024]byte @@ -1014,7 +1002,7 @@ func (m *awsAwsjson10_deserializeOpDeleteCollection) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteCollectionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateSecurityPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1028,7 +1016,7 @@ func (m *awsAwsjson10_deserializeOpDeleteCollection) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateSecurityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1075,8 +1063,8 @@ func awsAwsjson10_deserializeOpErrorDeleteCollection(response *smithyhttp.Respon case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -1091,14 +1079,14 @@ func awsAwsjson10_deserializeOpErrorDeleteCollection(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpDeleteSecurityConfig struct { +type awsAwsjson10_deserializeOpCreateVpcEndpoint struct { } -func (*awsAwsjson10_deserializeOpDeleteSecurityConfig) ID() string { +func (*awsAwsjson10_deserializeOpCreateVpcEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteSecurityConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpCreateVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1112,9 +1100,9 @@ func (m *awsAwsjson10_deserializeOpDeleteSecurityConfig) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteSecurityConfig(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorCreateVpcEndpoint(response, &metadata) } - output := &DeleteSecurityConfigOutput{} + output := &CreateVpcEndpointOutput{} out.Result = output var buff [1024]byte @@ -1134,7 +1122,7 @@ func (m *awsAwsjson10_deserializeOpDeleteSecurityConfig) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteSecurityConfigOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentCreateVpcEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1148,7 +1136,7 @@ func (m *awsAwsjson10_deserializeOpDeleteSecurityConfig) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteSecurityConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorCreateVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1195,8 +1183,8 @@ func awsAwsjson10_deserializeOpErrorDeleteSecurityConfig(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -1211,14 +1199,14 @@ func awsAwsjson10_deserializeOpErrorDeleteSecurityConfig(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpDeleteSecurityPolicy struct { +type awsAwsjson10_deserializeOpDeleteAccessPolicy struct { } -func (*awsAwsjson10_deserializeOpDeleteSecurityPolicy) ID() string { +func (*awsAwsjson10_deserializeOpDeleteAccessPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteSecurityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1232,9 +1220,9 @@ func (m *awsAwsjson10_deserializeOpDeleteSecurityPolicy) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteSecurityPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteAccessPolicy(response, &metadata) } - output := &DeleteSecurityPolicyOutput{} + output := &DeleteAccessPolicyOutput{} out.Result = output var buff [1024]byte @@ -1254,7 +1242,7 @@ func (m *awsAwsjson10_deserializeOpDeleteSecurityPolicy) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteSecurityPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteAccessPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1268,7 +1256,7 @@ func (m *awsAwsjson10_deserializeOpDeleteSecurityPolicy) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteSecurityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1331,14 +1319,14 @@ func awsAwsjson10_deserializeOpErrorDeleteSecurityPolicy(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpDeleteVpcEndpoint struct { +type awsAwsjson10_deserializeOpDeleteCollection struct { } -func (*awsAwsjson10_deserializeOpDeleteVpcEndpoint) ID() string { +func (*awsAwsjson10_deserializeOpDeleteCollection) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpDeleteVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1352,9 +1340,9 @@ func (m *awsAwsjson10_deserializeOpDeleteVpcEndpoint) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorDeleteVpcEndpoint(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteCollection(response, &metadata) } - output := &DeleteVpcEndpointOutput{} + output := &DeleteCollectionOutput{} out.Result = output var buff [1024]byte @@ -1374,7 +1362,7 @@ func (m *awsAwsjson10_deserializeOpDeleteVpcEndpoint) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentDeleteVpcEndpointOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteCollectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1388,7 +1376,7 @@ func (m *awsAwsjson10_deserializeOpDeleteVpcEndpoint) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorDeleteVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1451,14 +1439,14 @@ func awsAwsjson10_deserializeOpErrorDeleteVpcEndpoint(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpGetAccessPolicy struct { +type awsAwsjson10_deserializeOpDeleteLifecyclePolicy struct { } -func (*awsAwsjson10_deserializeOpGetAccessPolicy) ID() string { +func (*awsAwsjson10_deserializeOpDeleteLifecyclePolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1472,9 +1460,9 @@ func (m *awsAwsjson10_deserializeOpGetAccessPolicy) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetAccessPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteLifecyclePolicy(response, &metadata) } - output := &GetAccessPolicyOutput{} + output := &DeleteLifecyclePolicyOutput{} out.Result = output var buff [1024]byte @@ -1494,7 +1482,7 @@ func (m *awsAwsjson10_deserializeOpGetAccessPolicy) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetAccessPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteLifecyclePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1508,7 +1496,7 @@ func (m *awsAwsjson10_deserializeOpGetAccessPolicy) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1549,6 +1537,9 @@ func awsAwsjson10_deserializeOpErrorGetAccessPolicy(response *smithyhttp.Respons } switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -1568,14 +1559,14 @@ func awsAwsjson10_deserializeOpErrorGetAccessPolicy(response *smithyhttp.Respons } } -type awsAwsjson10_deserializeOpGetAccountSettings struct { +type awsAwsjson10_deserializeOpDeleteSecurityConfig struct { } -func (*awsAwsjson10_deserializeOpGetAccountSettings) ID() string { +func (*awsAwsjson10_deserializeOpDeleteSecurityConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteSecurityConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1589,9 +1580,9 @@ func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetAccountSettings(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteSecurityConfig(response, &metadata) } - output := &GetAccountSettingsOutput{} + output := &DeleteSecurityConfigOutput{} out.Result = output var buff [1024]byte @@ -1611,7 +1602,7 @@ func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetAccountSettingsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteSecurityConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1625,7 +1616,7 @@ func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteSecurityConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1666,9 +1657,15 @@ func awsAwsjson10_deserializeOpErrorGetAccountSettings(response *smithyhttp.Resp } switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -1682,14 +1679,14 @@ func awsAwsjson10_deserializeOpErrorGetAccountSettings(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpGetPoliciesStats struct { +type awsAwsjson10_deserializeOpDeleteSecurityPolicy struct { } -func (*awsAwsjson10_deserializeOpGetPoliciesStats) ID() string { +func (*awsAwsjson10_deserializeOpDeleteSecurityPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetPoliciesStats) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteSecurityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1703,9 +1700,9 @@ func (m *awsAwsjson10_deserializeOpGetPoliciesStats) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetPoliciesStats(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteSecurityPolicy(response, &metadata) } - output := &GetPoliciesStatsOutput{} + output := &DeleteSecurityPolicyOutput{} out.Result = output var buff [1024]byte @@ -1725,7 +1722,7 @@ func (m *awsAwsjson10_deserializeOpGetPoliciesStats) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetPoliciesStatsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteSecurityPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1739,7 +1736,7 @@ func (m *awsAwsjson10_deserializeOpGetPoliciesStats) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetPoliciesStats(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteSecurityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1780,9 +1777,18 @@ func awsAwsjson10_deserializeOpErrorGetPoliciesStats(response *smithyhttp.Respon } switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -1793,14 +1799,14 @@ func awsAwsjson10_deserializeOpErrorGetPoliciesStats(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpGetSecurityConfig struct { +type awsAwsjson10_deserializeOpDeleteVpcEndpoint struct { } -func (*awsAwsjson10_deserializeOpGetSecurityConfig) ID() string { +func (*awsAwsjson10_deserializeOpDeleteVpcEndpoint) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetSecurityConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpDeleteVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1814,9 +1820,9 @@ func (m *awsAwsjson10_deserializeOpGetSecurityConfig) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetSecurityConfig(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorDeleteVpcEndpoint(response, &metadata) } - output := &GetSecurityConfigOutput{} + output := &DeleteVpcEndpointOutput{} out.Result = output var buff [1024]byte @@ -1836,7 +1842,7 @@ func (m *awsAwsjson10_deserializeOpGetSecurityConfig) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetSecurityConfigOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentDeleteVpcEndpointOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1850,7 +1856,7 @@ func (m *awsAwsjson10_deserializeOpGetSecurityConfig) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetSecurityConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorDeleteVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1891,6 +1897,9 @@ func awsAwsjson10_deserializeOpErrorGetSecurityConfig(response *smithyhttp.Respo } switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -1910,14 +1919,14 @@ func awsAwsjson10_deserializeOpErrorGetSecurityConfig(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpGetSecurityPolicy struct { +type awsAwsjson10_deserializeOpGetAccessPolicy struct { } -func (*awsAwsjson10_deserializeOpGetSecurityPolicy) ID() string { +func (*awsAwsjson10_deserializeOpGetAccessPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpGetSecurityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1931,9 +1940,9 @@ func (m *awsAwsjson10_deserializeOpGetSecurityPolicy) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorGetSecurityPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetAccessPolicy(response, &metadata) } - output := &GetSecurityPolicyOutput{} + output := &GetAccessPolicyOutput{} out.Result = output var buff [1024]byte @@ -1953,7 +1962,7 @@ func (m *awsAwsjson10_deserializeOpGetSecurityPolicy) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentGetSecurityPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetAccessPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1967,7 +1976,7 @@ func (m *awsAwsjson10_deserializeOpGetSecurityPolicy) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorGetSecurityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2027,14 +2036,14 @@ func awsAwsjson10_deserializeOpErrorGetSecurityPolicy(response *smithyhttp.Respo } } -type awsAwsjson10_deserializeOpListAccessPolicies struct { +type awsAwsjson10_deserializeOpGetAccountSettings struct { } -func (*awsAwsjson10_deserializeOpListAccessPolicies) ID() string { +func (*awsAwsjson10_deserializeOpGetAccountSettings) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListAccessPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2048,9 +2057,9 @@ func (m *awsAwsjson10_deserializeOpListAccessPolicies) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListAccessPolicies(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetAccountSettings(response, &metadata) } - output := &ListAccessPoliciesOutput{} + output := &GetAccountSettingsOutput{} out.Result = output var buff [1024]byte @@ -2070,7 +2079,7 @@ func (m *awsAwsjson10_deserializeOpListAccessPolicies) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListAccessPoliciesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetAccountSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2084,7 +2093,7 @@ func (m *awsAwsjson10_deserializeOpListAccessPolicies) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListAccessPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2141,14 +2150,14 @@ func awsAwsjson10_deserializeOpErrorListAccessPolicies(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpListCollections struct { +type awsAwsjson10_deserializeOpGetPoliciesStats struct { } -func (*awsAwsjson10_deserializeOpListCollections) ID() string { +func (*awsAwsjson10_deserializeOpGetPoliciesStats) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListCollections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetPoliciesStats) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2162,9 +2171,9 @@ func (m *awsAwsjson10_deserializeOpListCollections) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListCollections(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetPoliciesStats(response, &metadata) } - output := &ListCollectionsOutput{} + output := &GetPoliciesStatsOutput{} out.Result = output var buff [1024]byte @@ -2184,7 +2193,7 @@ func (m *awsAwsjson10_deserializeOpListCollections) HandleDeserialize(ctx contex return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListCollectionsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetPoliciesStatsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2198,7 +2207,7 @@ func (m *awsAwsjson10_deserializeOpListCollections) HandleDeserialize(ctx contex return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListCollections(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetPoliciesStats(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2242,9 +2251,6 @@ func awsAwsjson10_deserializeOpErrorListCollections(response *smithyhttp.Respons case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson10_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2255,14 +2261,14 @@ func awsAwsjson10_deserializeOpErrorListCollections(response *smithyhttp.Respons } } -type awsAwsjson10_deserializeOpListSecurityConfigs struct { +type awsAwsjson10_deserializeOpGetSecurityConfig struct { } -func (*awsAwsjson10_deserializeOpListSecurityConfigs) ID() string { +func (*awsAwsjson10_deserializeOpGetSecurityConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListSecurityConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetSecurityConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2276,9 +2282,9 @@ func (m *awsAwsjson10_deserializeOpListSecurityConfigs) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListSecurityConfigs(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetSecurityConfig(response, &metadata) } - output := &ListSecurityConfigsOutput{} + output := &GetSecurityConfigOutput{} out.Result = output var buff [1024]byte @@ -2298,7 +2304,7 @@ func (m *awsAwsjson10_deserializeOpListSecurityConfigs) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListSecurityConfigsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetSecurityConfigOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2312,7 +2318,7 @@ func (m *awsAwsjson10_deserializeOpListSecurityConfigs) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListSecurityConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetSecurityConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2356,6 +2362,9 @@ func awsAwsjson10_deserializeOpErrorListSecurityConfigs(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2369,14 +2378,14 @@ func awsAwsjson10_deserializeOpErrorListSecurityConfigs(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpListSecurityPolicies struct { +type awsAwsjson10_deserializeOpGetSecurityPolicy struct { } -func (*awsAwsjson10_deserializeOpListSecurityPolicies) ID() string { +func (*awsAwsjson10_deserializeOpGetSecurityPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListSecurityPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpGetSecurityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2390,9 +2399,9 @@ func (m *awsAwsjson10_deserializeOpListSecurityPolicies) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListSecurityPolicies(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorGetSecurityPolicy(response, &metadata) } - output := &ListSecurityPoliciesOutput{} + output := &GetSecurityPolicyOutput{} out.Result = output var buff [1024]byte @@ -2412,7 +2421,7 @@ func (m *awsAwsjson10_deserializeOpListSecurityPolicies) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListSecurityPoliciesOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentGetSecurityPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2426,7 +2435,7 @@ func (m *awsAwsjson10_deserializeOpListSecurityPolicies) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListSecurityPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorGetSecurityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2470,6 +2479,9 @@ func awsAwsjson10_deserializeOpErrorListSecurityPolicies(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2483,14 +2495,14 @@ func awsAwsjson10_deserializeOpErrorListSecurityPolicies(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpListTagsForResource struct { +type awsAwsjson10_deserializeOpListAccessPolicies struct { } -func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { +func (*awsAwsjson10_deserializeOpListAccessPolicies) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListAccessPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2504,9 +2516,9 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListAccessPolicies(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListAccessPoliciesOutput{} out.Result = output var buff [1024]byte @@ -2526,7 +2538,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListAccessPoliciesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2540,7 +2552,7 @@ func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListAccessPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2584,9 +2596,6 @@ func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2600,14 +2609,14 @@ func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -type awsAwsjson10_deserializeOpListVpcEndpoints struct { +type awsAwsjson10_deserializeOpListCollections struct { } -func (*awsAwsjson10_deserializeOpListVpcEndpoints) ID() string { +func (*awsAwsjson10_deserializeOpListCollections) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpListVpcEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListCollections) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2621,9 +2630,9 @@ func (m *awsAwsjson10_deserializeOpListVpcEndpoints) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorListVpcEndpoints(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListCollections(response, &metadata) } - output := &ListVpcEndpointsOutput{} + output := &ListCollectionsOutput{} out.Result = output var buff [1024]byte @@ -2643,7 +2652,7 @@ func (m *awsAwsjson10_deserializeOpListVpcEndpoints) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentListVpcEndpointsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListCollectionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2657,7 +2666,7 @@ func (m *awsAwsjson10_deserializeOpListVpcEndpoints) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorListVpcEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListCollections(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2714,14 +2723,14 @@ func awsAwsjson10_deserializeOpErrorListVpcEndpoints(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpTagResource struct { +type awsAwsjson10_deserializeOpListLifecyclePolicies struct { } -func (*awsAwsjson10_deserializeOpTagResource) ID() string { +func (*awsAwsjson10_deserializeOpListLifecyclePolicies) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListLifecyclePolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2735,9 +2744,9 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListLifecyclePolicies(response, &metadata) } - output := &TagResourceOutput{} + output := &ListLifecyclePoliciesOutput{} out.Result = output var buff [1024]byte @@ -2757,7 +2766,7 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListLifecyclePoliciesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2771,7 +2780,7 @@ func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Co return out, metadata, err } -func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListLifecyclePolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2812,18 +2821,9 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2837,14 +2837,14 @@ func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsAwsjson10_deserializeOpUntagResource struct { +type awsAwsjson10_deserializeOpListSecurityConfigs struct { } -func (*awsAwsjson10_deserializeOpUntagResource) ID() string { +func (*awsAwsjson10_deserializeOpListSecurityConfigs) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListSecurityConfigs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2858,9 +2858,9 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListSecurityConfigs(response, &metadata) } - output := &UntagResourceOutput{} + output := &ListSecurityConfigsOutput{} out.Result = output var buff [1024]byte @@ -2880,7 +2880,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListSecurityConfigsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2894,7 +2894,7 @@ func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context. return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListSecurityConfigs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2935,15 +2935,9 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -2957,14 +2951,14 @@ func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsAwsjson10_deserializeOpUpdateAccessPolicy struct { +type awsAwsjson10_deserializeOpListSecurityPolicies struct { } -func (*awsAwsjson10_deserializeOpUpdateAccessPolicy) ID() string { +func (*awsAwsjson10_deserializeOpListSecurityPolicies) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListSecurityPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2978,9 +2972,9 @@ func (m *awsAwsjson10_deserializeOpUpdateAccessPolicy) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateAccessPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListSecurityPolicies(response, &metadata) } - output := &UpdateAccessPolicyOutput{} + output := &ListSecurityPoliciesOutput{} out.Result = output var buff [1024]byte @@ -3000,7 +2994,7 @@ func (m *awsAwsjson10_deserializeOpUpdateAccessPolicy) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateAccessPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListSecurityPoliciesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3014,7 +3008,7 @@ func (m *awsAwsjson10_deserializeOpUpdateAccessPolicy) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListSecurityPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3055,15 +3049,9 @@ func awsAwsjson10_deserializeOpErrorUpdateAccessPolicy(response *smithyhttp.Resp } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3077,14 +3065,14 @@ func awsAwsjson10_deserializeOpErrorUpdateAccessPolicy(response *smithyhttp.Resp } } -type awsAwsjson10_deserializeOpUpdateAccountSettings struct { +type awsAwsjson10_deserializeOpListTagsForResource struct { } -func (*awsAwsjson10_deserializeOpUpdateAccountSettings) ID() string { +func (*awsAwsjson10_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3098,9 +3086,9 @@ func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &UpdateAccountSettingsOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -3120,7 +3108,7 @@ func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateAccountSettingsOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3134,7 +3122,7 @@ func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3178,6 +3166,9 @@ func awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.R case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3191,14 +3182,14 @@ func awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.R } } -type awsAwsjson10_deserializeOpUpdateCollection struct { +type awsAwsjson10_deserializeOpListVpcEndpoints struct { } -func (*awsAwsjson10_deserializeOpUpdateCollection) ID() string { +func (*awsAwsjson10_deserializeOpListVpcEndpoints) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpListVpcEndpoints) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3212,9 +3203,9 @@ func (m *awsAwsjson10_deserializeOpUpdateCollection) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateCollection(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorListVpcEndpoints(response, &metadata) } - output := &UpdateCollectionOutput{} + output := &ListVpcEndpointsOutput{} out.Result = output var buff [1024]byte @@ -3234,7 +3225,7 @@ func (m *awsAwsjson10_deserializeOpUpdateCollection) HandleDeserialize(ctx conte return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateCollectionOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentListVpcEndpointsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3248,7 +3239,7 @@ func (m *awsAwsjson10_deserializeOpUpdateCollection) HandleDeserialize(ctx conte return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorListVpcEndpoints(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3289,9 +3280,6 @@ func awsAwsjson10_deserializeOpErrorUpdateCollection(response *smithyhttp.Respon } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsAwsjson10_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) @@ -3308,14 +3296,14 @@ func awsAwsjson10_deserializeOpErrorUpdateCollection(response *smithyhttp.Respon } } -type awsAwsjson10_deserializeOpUpdateSecurityConfig struct { +type awsAwsjson10_deserializeOpTagResource struct { } -func (*awsAwsjson10_deserializeOpUpdateSecurityConfig) ID() string { +func (*awsAwsjson10_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateSecurityConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3329,9 +3317,9 @@ func (m *awsAwsjson10_deserializeOpUpdateSecurityConfig) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateSecurityConfig(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateSecurityConfigOutput{} + output := &TagResourceOutput{} out.Result = output var buff [1024]byte @@ -3351,7 +3339,7 @@ func (m *awsAwsjson10_deserializeOpUpdateSecurityConfig) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateSecurityConfigOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentTagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3365,7 +3353,7 @@ func (m *awsAwsjson10_deserializeOpUpdateSecurityConfig) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateSecurityConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3415,6 +3403,9 @@ func awsAwsjson10_deserializeOpErrorUpdateSecurityConfig(response *smithyhttp.Re case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3428,14 +3419,14 @@ func awsAwsjson10_deserializeOpErrorUpdateSecurityConfig(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpUpdateSecurityPolicy struct { +type awsAwsjson10_deserializeOpUntagResource struct { } -func (*awsAwsjson10_deserializeOpUpdateSecurityPolicy) ID() string { +func (*awsAwsjson10_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateSecurityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3449,9 +3440,9 @@ func (m *awsAwsjson10_deserializeOpUpdateSecurityPolicy) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateSecurityPolicy(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorUntagResource(response, &metadata) } - output := &UpdateSecurityPolicyOutput{} + output := &UntagResourceOutput{} out.Result = output var buff [1024]byte @@ -3471,7 +3462,7 @@ func (m *awsAwsjson10_deserializeOpUpdateSecurityPolicy) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateSecurityPolicyOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentUntagResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3485,7 +3476,7 @@ func (m *awsAwsjson10_deserializeOpUpdateSecurityPolicy) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateSecurityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3535,9 +3526,6 @@ func awsAwsjson10_deserializeOpErrorUpdateSecurityPolicy(response *smithyhttp.Re case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3551,14 +3539,14 @@ func awsAwsjson10_deserializeOpErrorUpdateSecurityPolicy(response *smithyhttp.Re } } -type awsAwsjson10_deserializeOpUpdateVpcEndpoint struct { +type awsAwsjson10_deserializeOpUpdateAccessPolicy struct { } -func (*awsAwsjson10_deserializeOpUpdateVpcEndpoint) ID() string { +func (*awsAwsjson10_deserializeOpUpdateAccessPolicy) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson10_deserializeOpUpdateVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson10_deserializeOpUpdateAccessPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3572,9 +3560,9 @@ func (m *awsAwsjson10_deserializeOpUpdateVpcEndpoint) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson10_deserializeOpErrorUpdateVpcEndpoint(response, &metadata) + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateAccessPolicy(response, &metadata) } - output := &UpdateVpcEndpointOutput{} + output := &UpdateAccessPolicyOutput{} out.Result = output var buff [1024]byte @@ -3594,7 +3582,7 @@ func (m *awsAwsjson10_deserializeOpUpdateVpcEndpoint) HandleDeserialize(ctx cont return out, metadata, err } - err = awsAwsjson10_deserializeOpDocumentUpdateVpcEndpointOutput(&output, shape) + err = awsAwsjson10_deserializeOpDocumentUpdateAccessPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3608,7 +3596,7 @@ func (m *awsAwsjson10_deserializeOpUpdateVpcEndpoint) HandleDeserialize(ctx cont return out, metadata, err } -func awsAwsjson10_deserializeOpErrorUpdateVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson10_deserializeOpErrorUpdateAccessPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3655,6 +3643,9 @@ func awsAwsjson10_deserializeOpErrorUpdateVpcEndpoint(response *smithyhttp.Respo case strings.EqualFold("InternalServerException", errorCode): return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): return awsAwsjson10_deserializeErrorValidationException(response, errorBody) @@ -3668,46 +3659,36 @@ func awsAwsjson10_deserializeOpErrorUpdateVpcEndpoint(response *smithyhttp.Respo } } -func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } +type awsAwsjson10_deserializeOpUpdateAccountSettings struct { +} - output := &types.ConflictException{} - err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) +func (*awsAwsjson10_deserializeOpUpdateAccountSettings) ID() string { + return "OperationDeserializer" +} +func (m *awsAwsjson10_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output -} + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response, &metadata) + } + output := &UpdateAccountSettingsOutput{} + out.Result = output -func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -3718,12 +3699,10 @@ func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.InternalServerException{} - err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentUpdateAccountSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3731,22 +3710,35 @@ func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.R Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorOcuLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -3756,28 +3748,61 @@ func awsAwsjson10_deserializeErrorOcuLimitExceededException(response *smithyhttp return err } - output := &types.OcuLimitExceededException{} - err := awsAwsjson10_deserializeDocumentOcuLimitExceededException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson10_deserializeOpUpdateCollection struct { } -func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson10_deserializeOpUpdateCollection) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateCollection) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateCollection(response, &metadata) + } + output := &UpdateCollectionOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -3788,12 +3813,10 @@ func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ResourceNotFoundException{} - err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentUpdateCollectionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3801,22 +3824,35 @@ func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func awsAwsjson10_deserializeOpErrorUpdateCollection(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -3826,28 +3862,64 @@ func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithy return err } - output := &types.ServiceQuotaExceededException{} - err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) - return output +type awsAwsjson10_deserializeOpUpdateLifecyclePolicy struct { } -func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { +func (*awsAwsjson10_deserializeOpUpdateLifecyclePolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateLifecyclePolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateLifecyclePolicy(response, &metadata) + } + output := &UpdateLifecyclePolicyOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -3858,12 +3930,10 @@ func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Respo Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - output := &types.ValidationException{} - err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) - + err = awsAwsjson10_deserializeOpDocumentUpdateLifecyclePolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3871,35 +3941,1050 @@ func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Respo Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) - return output + return out, metadata, err } -func awsAwsjson10_deserializeDocumentAccessPolicyDetail(v **types.AccessPolicyDetail, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil +func awsAwsjson10_deserializeOpErrorUpdateLifecyclePolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} } + errorBody := bytes.NewReader(errorBuffer.Bytes()) - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) } - var sv *types.AccessPolicyDetail - if *v == nil { - sv = &types.AccessPolicyDetail{} - } else { - sv = *v + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - for key, value := range shape { - switch key { + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateSecurityConfig struct { +} + +func (*awsAwsjson10_deserializeOpUpdateSecurityConfig) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateSecurityConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateSecurityConfig(response, &metadata) + } + output := &UpdateSecurityConfigOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateSecurityConfigOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateSecurityConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateSecurityPolicy struct { +} + +func (*awsAwsjson10_deserializeOpUpdateSecurityPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateSecurityPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateSecurityPolicy(response, &metadata) + } + output := &UpdateSecurityPolicyOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateSecurityPolicyOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateSecurityPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson10_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson10_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson10_deserializeOpUpdateVpcEndpoint struct { +} + +func (*awsAwsjson10_deserializeOpUpdateVpcEndpoint) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson10_deserializeOpUpdateVpcEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsAwsjson10_deserializeOpErrorUpdateVpcEndpoint(response, &metadata) + } + output := &UpdateVpcEndpointOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsAwsjson10_deserializeOpDocumentUpdateVpcEndpointOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson10_deserializeOpErrorUpdateVpcEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson10_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsAwsjson10_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson10_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsAwsjson10_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ConflictException{} + err := awsAwsjson10_deserializeDocumentConflictException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.InternalServerException{} + err := awsAwsjson10_deserializeDocumentInternalServerException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorOcuLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.OcuLimitExceededException{} + err := awsAwsjson10_deserializeDocumentOcuLimitExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ResourceNotFoundException{} + err := awsAwsjson10_deserializeDocumentResourceNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ServiceQuotaExceededException{} + err := awsAwsjson10_deserializeDocumentServiceQuotaExceededException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + output := &types.ValidationException{} + err := awsAwsjson10_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + return output +} + +func awsAwsjson10_deserializeDocumentAccessPolicyDetail(v **types.AccessPolicyDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessPolicyDetail + if *v == nil { + sv = &types.AccessPolicyDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdDate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Int64(i64) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "lastModifiedDate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Int64(i64) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "policy": + if err := awsAwsjson10_deserializeDocumentDocument(&sv.Policy, value); err != nil { + return err + } + + case "policyVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyVersion to be of type string, got %T instead", value) + } + sv.PolicyVersion = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessPolicyType to be of type string, got %T instead", value) + } + sv.Type = types.AccessPolicyType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccessPolicyStats(v **types.AccessPolicyStats, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessPolicyStats + if *v == nil { + sv = &types.AccessPolicyStats{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataPolicyCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.DataPolicyCount = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccessPolicySummaries(v *[]types.AccessPolicySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.AccessPolicySummary + if *v == nil { + cv = []types.AccessPolicySummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AccessPolicySummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentAccessPolicySummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentAccessPolicySummary(v **types.AccessPolicySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessPolicySummary + if *v == nil { + sv = &types.AccessPolicySummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdDate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Int64(i64) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "lastModifiedDate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Int64(i64) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "policyVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyVersion to be of type string, got %T instead", value) + } + sv.PolicyVersion = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessPolicyType to be of type string, got %T instead", value) + } + sv.Type = types.AccessPolicyType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentAccountSettingsDetail(v **types.AccountSettingsDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccountSettingsDetail + if *v == nil { + sv = &types.AccountSettingsDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "capacityLimits": + if err := awsAwsjson10_deserializeDocumentCapacityLimits(&sv.CapacityLimits, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCapacityLimits(v **types.CapacityLimits, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CapacityLimits + if *v == nil { + sv = &types.CapacityLimits{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "maxIndexingCapacityInOCU": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IndexingCapacityValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxIndexingCapacityInOCU = ptr.Int32(int32(i64)) + } + + case "maxSearchCapacityInOCU": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected SearchCapacityValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxSearchCapacityInOCU = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentCollectionDetail(v **types.CollectionDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.CollectionDetail + if *v == nil { + sv = &types.CollectionDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "collectionEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CollectionEndpoint = ptr.String(jtv) + } + case "createdDate": if value != nil { jtv, ok := value.(json.Number) @@ -3913,15 +4998,42 @@ func awsAwsjson10_deserializeDocumentAccessPolicyDetail(v **types.AccessPolicyDe sv.CreatedDate = ptr.Int64(i64) } + case "dashboardEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DashboardEndpoint = ptr.String(jtv) + } + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PolicyDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CollectionId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "kmsKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.KmsKeyArn = ptr.String(jtv) + } + case "lastModifiedDate": if value != nil { jtv, ok := value.(json.Number) @@ -3939,32 +5051,27 @@ func awsAwsjson10_deserializeDocumentAccessPolicyDetail(v **types.AccessPolicyDe if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) + return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "policy": - if err := awsAwsjson10_deserializeDocumentDocument(&sv.Policy, value); err != nil { - return err - } - - case "policyVersion": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PolicyVersion to be of type string, got %T instead", value) + return fmt.Errorf("expected CollectionStatus to be of type string, got %T instead", value) } - sv.PolicyVersion = ptr.String(jtv) + sv.Status = types.CollectionStatus(jtv) } case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AccessPolicyType to be of type string, got %T instead", value) + return fmt.Errorf("expected CollectionType to be of type string, got %T instead", value) } - sv.Type = types.AccessPolicyType(jtv) + sv.Type = types.CollectionType(jtv) } default: @@ -3976,7 +5083,41 @@ func awsAwsjson10_deserializeDocumentAccessPolicyDetail(v **types.AccessPolicyDe return nil } -func awsAwsjson10_deserializeDocumentAccessPolicyStats(v **types.AccessPolicyStats, value interface{}) error { +func awsAwsjson10_deserializeDocumentCollectionDetails(v *[]types.CollectionDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CollectionDetail + if *v == nil { + cv = []types.CollectionDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CollectionDetail + destAddr := &col + if err := awsAwsjson10_deserializeDocumentCollectionDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentCollectionErrorDetail(v **types.CollectionErrorDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3989,26 +5130,49 @@ func awsAwsjson10_deserializeDocumentAccessPolicyStats(v **types.AccessPolicySta return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessPolicyStats + var sv *types.CollectionErrorDetail if *v == nil { - sv = &types.AccessPolicyStats{} + sv = &types.CollectionErrorDetail{} } else { sv = *v } for key, value := range shape { switch key { - case "DataPolicyCount": + case "errorCode": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.ErrorCode = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.DataPolicyCount = ptr.Int64(i64) + sv.ErrorMessage = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CollectionId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) } default: @@ -4020,7 +5184,7 @@ func awsAwsjson10_deserializeDocumentAccessPolicyStats(v **types.AccessPolicySta return nil } -func awsAwsjson10_deserializeDocumentAccessPolicySummaries(v *[]types.AccessPolicySummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentCollectionErrorDetails(v *[]types.CollectionErrorDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4033,17 +5197,17 @@ func awsAwsjson10_deserializeDocumentAccessPolicySummaries(v *[]types.AccessPoli return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AccessPolicySummary + var cv []types.CollectionErrorDetail if *v == nil { - cv = []types.AccessPolicySummary{} + cv = []types.CollectionErrorDetail{} } else { cv = *v } for _, value := range shape { - var col types.AccessPolicySummary + var col types.CollectionErrorDetail destAddr := &col - if err := awsAwsjson10_deserializeDocumentAccessPolicySummary(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentCollectionErrorDetail(&destAddr, value); err != nil { return err } col = *destAddr @@ -4054,7 +5218,41 @@ func awsAwsjson10_deserializeDocumentAccessPolicySummaries(v *[]types.AccessPoli return nil } -func awsAwsjson10_deserializeDocumentAccessPolicySummary(v **types.AccessPolicySummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentCollectionSummaries(v *[]types.CollectionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.CollectionSummary + if *v == nil { + cv = []types.CollectionSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CollectionSummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentCollectionSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentCollectionSummary(v **types.CollectionSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4067,111 +5265,49 @@ func awsAwsjson10_deserializeDocumentAccessPolicySummary(v **types.AccessPolicyS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AccessPolicySummary + var sv *types.CollectionSummary if *v == nil { - sv = &types.AccessPolicySummary{} + sv = &types.CollectionSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "createdDate": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.CreatedDate = ptr.Int64(i64) - } - - case "description": + case "arn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PolicyDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.Arn = ptr.String(jtv) } - case "lastModifiedDate": + case "id": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Long to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected CollectionId to be of type string, got %T instead", value) } - sv.LastModifiedDate = ptr.Int64(i64) + sv.Id = ptr.String(jtv) } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) + return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "policyVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PolicyVersion to be of type string, got %T instead", value) - } - sv.PolicyVersion = ptr.String(jtv) - } - - case "type": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AccessPolicyType to be of type string, got %T instead", value) + return fmt.Errorf("expected CollectionStatus to be of type string, got %T instead", value) } - sv.Type = types.AccessPolicyType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson10_deserializeDocumentAccountSettingsDetail(v **types.AccountSettingsDetail, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AccountSettingsDetail - if *v == nil { - sv = &types.AccountSettingsDetail{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "capacityLimits": - if err := awsAwsjson10_deserializeDocumentCapacityLimits(&sv.CapacityLimits, value); err != nil { - return err + sv.Status = types.CollectionStatus(jtv) } default: @@ -4183,7 +5319,7 @@ func awsAwsjson10_deserializeDocumentAccountSettingsDetail(v **types.AccountSett return nil } -func awsAwsjson10_deserializeDocumentCapacityLimits(v **types.CapacityLimits, value interface{}) error { +func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4196,39 +5332,22 @@ func awsAwsjson10_deserializeDocumentCapacityLimits(v **types.CapacityLimits, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CapacityLimits + var sv *types.ConflictException if *v == nil { - sv = &types.CapacityLimits{} + sv = &types.ConflictException{} } else { sv = *v } for key, value := range shape { switch key { - case "maxIndexingCapacityInOCU": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected IndexingCapacityValue to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.MaxIndexingCapacityInOCU = ptr.Int32(int32(i64)) - } - - case "maxSearchCapacityInOCU": + case "message": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SearchCapacityValue to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.MaxSearchCapacityInOCU = ptr.Int32(int32(i64)) + sv.Message = ptr.String(jtv) } default: @@ -4240,7 +5359,7 @@ func awsAwsjson10_deserializeDocumentCapacityLimits(v **types.CapacityLimits, va return nil } -func awsAwsjson10_deserializeDocumentCollectionDetail(v **types.CollectionDetail, value interface{}) error { +func awsAwsjson10_deserializeDocumentCreateCollectionDetail(v **types.CreateCollectionDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4253,9 +5372,9 @@ func awsAwsjson10_deserializeDocumentCollectionDetail(v **types.CollectionDetail return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CollectionDetail + var sv *types.CreateCollectionDetail if *v == nil { - sv = &types.CollectionDetail{} + sv = &types.CreateCollectionDetail{} } else { sv = *v } @@ -4271,15 +5390,6 @@ func awsAwsjson10_deserializeDocumentCollectionDetail(v **types.CollectionDetail sv.Arn = ptr.String(jtv) } - case "collectionEndpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CollectionEndpoint = ptr.String(jtv) - } - case "createdDate": if value != nil { jtv, ok := value.(json.Number) @@ -4293,15 +5403,6 @@ func awsAwsjson10_deserializeDocumentCollectionDetail(v **types.CollectionDetail sv.CreatedDate = ptr.Int64(i64) } - case "dashboardEndpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.DashboardEndpoint = ptr.String(jtv) - } - case "description": if value != nil { jtv, ok := value.(string) @@ -4378,7 +5479,7 @@ func awsAwsjson10_deserializeDocumentCollectionDetail(v **types.CollectionDetail return nil } -func awsAwsjson10_deserializeDocumentCollectionDetails(v *[]types.CollectionDetail, value interface{}) error { +func awsAwsjson10_deserializeDocumentCreateVpcEndpointDetail(v **types.CreateVpcEndpointDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4386,33 +5487,57 @@ func awsAwsjson10_deserializeDocumentCollectionDetails(v *[]types.CollectionDeta return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.CollectionDetail + var sv *types.CreateVpcEndpointDetail if *v == nil { - cv = []types.CollectionDetail{} + sv = &types.CreateVpcEndpointDetail{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.CollectionDetail - destAddr := &col - if err := awsAwsjson10_deserializeDocumentCollectionDetail(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcEndpointId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcEndpointName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcEndpointStatus to be of type string, got %T instead", value) + } + sv.Status = types.VpcEndpointStatus(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentCollectionErrorDetail(v **types.CollectionErrorDetail, value interface{}) error { +func awsAwsjson10_deserializeDocumentDeleteCollectionDetail(v **types.DeleteCollectionDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4425,38 +5550,78 @@ func awsAwsjson10_deserializeDocumentCollectionErrorDetail(v **types.CollectionE return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CollectionErrorDetail + var sv *types.DeleteCollectionDetail if *v == nil { - sv = &types.CollectionErrorDetail{} + sv = &types.DeleteCollectionDetail{} } else { sv = *v } for key, value := range shape { switch key { - case "errorCode": + case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected CollectionId to be of type string, got %T instead", value) } - sv.ErrorCode = ptr.String(jtv) + sv.Id = ptr.String(jtv) } - case "errorMessage": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value) } - sv.ErrorMessage = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CollectionStatus to be of type string, got %T instead", value) + } + sv.Status = types.CollectionStatus(jtv) } + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeDocumentDeleteVpcEndpointDetail(v **types.DeleteVpcEndpointDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.DeleteVpcEndpointDetail + if *v == nil { + sv = &types.DeleteVpcEndpointDetail{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { case "id": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CollectionId to be of type string, got %T instead", value) + return fmt.Errorf("expected VpcEndpointId to be of type string, got %T instead", value) } sv.Id = ptr.String(jtv) } @@ -4465,11 +5630,20 @@ func awsAwsjson10_deserializeDocumentCollectionErrorDetail(v **types.CollectionE if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value) + return fmt.Errorf("expected VpcEndpointName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcEndpointStatus to be of type string, got %T instead", value) + } + sv.Status = types.VpcEndpointStatus(jtv) + } + default: _, _ = key, value @@ -4479,7 +5653,7 @@ func awsAwsjson10_deserializeDocumentCollectionErrorDetail(v **types.CollectionE return nil } -func awsAwsjson10_deserializeDocumentCollectionErrorDetails(v *[]types.CollectionErrorDetail, value interface{}) error { +func awsAwsjson10_deserializeDocumentEffectiveLifecyclePolicyDetail(v **types.EffectiveLifecyclePolicyDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4487,33 +5661,84 @@ func awsAwsjson10_deserializeDocumentCollectionErrorDetails(v *[]types.Collectio return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.CollectionErrorDetail + var sv *types.EffectiveLifecyclePolicyDetail if *v == nil { - cv = []types.CollectionErrorDetail{} + sv = &types.EffectiveLifecyclePolicyDetail{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.CollectionErrorDetail - destAddr := &col - if err := awsAwsjson10_deserializeDocumentCollectionErrorDetail(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "noMinRetentionPeriod": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.NoMinRetentionPeriod = ptr.Bool(jtv) + } + + case "policyName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) + } + sv.PolicyName = ptr.String(jtv) + } + + case "resource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Resource to be of type string, got %T instead", value) + } + sv.Resource = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = types.ResourceType(jtv) + } + + case "retentionPeriod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.RetentionPeriod = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LifecyclePolicyType to be of type string, got %T instead", value) + } + sv.Type = types.LifecyclePolicyType(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsAwsjson10_deserializeDocumentCollectionSummaries(v *[]types.CollectionSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentEffectiveLifecyclePolicyDetails(v *[]types.EffectiveLifecyclePolicyDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4526,17 +5751,17 @@ func awsAwsjson10_deserializeDocumentCollectionSummaries(v *[]types.CollectionSu return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.CollectionSummary + var cv []types.EffectiveLifecyclePolicyDetail if *v == nil { - cv = []types.CollectionSummary{} + cv = []types.EffectiveLifecyclePolicyDetail{} } else { cv = *v } for _, value := range shape { - var col types.CollectionSummary + var col types.EffectiveLifecyclePolicyDetail destAddr := &col - if err := awsAwsjson10_deserializeDocumentCollectionSummary(&destAddr, value); err != nil { + if err := awsAwsjson10_deserializeDocumentEffectiveLifecyclePolicyDetail(&destAddr, value); err != nil { return err } col = *destAddr @@ -4547,7 +5772,7 @@ func awsAwsjson10_deserializeDocumentCollectionSummaries(v *[]types.CollectionSu return nil } -func awsAwsjson10_deserializeDocumentCollectionSummary(v **types.CollectionSummary, value interface{}) error { +func awsAwsjson10_deserializeDocumentEffectiveLifecyclePolicyErrorDetail(v **types.EffectiveLifecyclePolicyErrorDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4560,49 +5785,49 @@ func awsAwsjson10_deserializeDocumentCollectionSummary(v **types.CollectionSumma return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CollectionSummary + var sv *types.EffectiveLifecyclePolicyErrorDetail if *v == nil { - sv = &types.CollectionSummary{} + sv = &types.EffectiveLifecyclePolicyErrorDetail{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": + case "errorCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.ErrorCode = ptr.String(jtv) } - case "id": + case "errorMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CollectionId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.ErrorMessage = ptr.String(jtv) } - case "name": + case "resource": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value) + return fmt.Errorf("expected Resource to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.Resource = ptr.String(jtv) } - case "status": + case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CollectionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected LifecyclePolicyType to be of type string, got %T instead", value) } - sv.Status = types.CollectionStatus(jtv) + sv.Type = types.LifecyclePolicyType(jtv) } default: @@ -4614,7 +5839,41 @@ func awsAwsjson10_deserializeDocumentCollectionSummary(v **types.CollectionSumma return nil } -func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsAwsjson10_deserializeDocumentEffectiveLifecyclePolicyErrorDetails(v *[]types.EffectiveLifecyclePolicyErrorDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.EffectiveLifecyclePolicyErrorDetail + if *v == nil { + cv = []types.EffectiveLifecyclePolicyErrorDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.EffectiveLifecyclePolicyErrorDetail + destAddr := &col + if err := awsAwsjson10_deserializeDocumentEffectiveLifecyclePolicyErrorDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4627,9 +5886,9 @@ func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.InternalServerException if *v == nil { - sv = &types.ConflictException{} + sv = &types.InternalServerException{} } else { sv = *v } @@ -4654,7 +5913,7 @@ func awsAwsjson10_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsAwsjson10_deserializeDocumentCreateCollectionDetail(v **types.CreateCollectionDetail, value interface{}) error { +func awsAwsjson10_deserializeDocumentLifecyclePolicyDetail(v **types.LifecyclePolicyDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4667,24 +5926,15 @@ func awsAwsjson10_deserializeDocumentCreateCollectionDetail(v **types.CreateColl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CreateCollectionDetail + var sv *types.LifecyclePolicyDetail if *v == nil { - sv = &types.CreateCollectionDetail{} + sv = &types.LifecyclePolicyDetail{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - case "createdDate": if value != nil { jtv, ok := value.(json.Number) @@ -4702,29 +5952,11 @@ func awsAwsjson10_deserializeDocumentCreateCollectionDetail(v **types.CreateColl if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PolicyDescription to be of type string, got %T instead", value) } sv.Description = ptr.String(jtv) } - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CollectionId to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "kmsKeyArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.KmsKeyArn = ptr.String(jtv) - } - case "lastModifiedDate": if value != nil { jtv, ok := value.(json.Number) @@ -4742,27 +5974,32 @@ func awsAwsjson10_deserializeDocumentCreateCollectionDetail(v **types.CreateColl if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value) + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "status": + case "policy": + if err := awsAwsjson10_deserializeDocumentDocument(&sv.Policy, value); err != nil { + return err + } + + case "policyVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CollectionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected PolicyVersion to be of type string, got %T instead", value) } - sv.Status = types.CollectionStatus(jtv) + sv.PolicyVersion = ptr.String(jtv) } case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CollectionType to be of type string, got %T instead", value) + return fmt.Errorf("expected LifecyclePolicyType to be of type string, got %T instead", value) } - sv.Type = types.CollectionType(jtv) + sv.Type = types.LifecyclePolicyType(jtv) } default: @@ -4774,7 +6011,41 @@ func awsAwsjson10_deserializeDocumentCreateCollectionDetail(v **types.CreateColl return nil } -func awsAwsjson10_deserializeDocumentCreateVpcEndpointDetail(v **types.CreateVpcEndpointDetail, value interface{}) error { +func awsAwsjson10_deserializeDocumentLifecyclePolicyDetails(v *[]types.LifecyclePolicyDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LifecyclePolicyDetail + if *v == nil { + cv = []types.LifecyclePolicyDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LifecyclePolicyDetail + destAddr := &col + if err := awsAwsjson10_deserializeDocumentLifecyclePolicyDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentLifecyclePolicyErrorDetail(v **types.LifecyclePolicyErrorDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4787,40 +6058,49 @@ func awsAwsjson10_deserializeDocumentCreateVpcEndpointDetail(v **types.CreateVpc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CreateVpcEndpointDetail + var sv *types.LifecyclePolicyErrorDetail if *v == nil { - sv = &types.CreateVpcEndpointDetail{} + sv = &types.LifecyclePolicyErrorDetail{} } else { sv = *v } for key, value := range shape { switch key { - case "id": + case "errorCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VpcEndpointId to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.ErrorCode = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VpcEndpointName to be of type string, got %T instead", value) + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "status": + case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VpcEndpointStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected LifecyclePolicyType to be of type string, got %T instead", value) } - sv.Status = types.VpcEndpointStatus(jtv) + sv.Type = types.LifecyclePolicyType(jtv) } default: @@ -4832,7 +6112,41 @@ func awsAwsjson10_deserializeDocumentCreateVpcEndpointDetail(v **types.CreateVpc return nil } -func awsAwsjson10_deserializeDocumentDeleteCollectionDetail(v **types.DeleteCollectionDetail, value interface{}) error { +func awsAwsjson10_deserializeDocumentLifecyclePolicyErrorDetails(v *[]types.LifecyclePolicyErrorDetail, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LifecyclePolicyErrorDetail + if *v == nil { + cv = []types.LifecyclePolicyErrorDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LifecyclePolicyErrorDetail + destAddr := &col + if err := awsAwsjson10_deserializeDocumentLifecyclePolicyErrorDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentLifecyclePolicyStats(v **types.LifecyclePolicyStats, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4845,40 +6159,26 @@ func awsAwsjson10_deserializeDocumentDeleteCollectionDetail(v **types.DeleteColl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DeleteCollectionDetail + var sv *types.LifecyclePolicyStats if *v == nil { - sv = &types.DeleteCollectionDetail{} + sv = &types.LifecyclePolicyStats{} } else { sv = *v } for key, value := range shape { switch key { - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CollectionId to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "name": + case "RetentionPolicyCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected CollectionName to be of type string, got %T instead", value) + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) } - sv.Name = ptr.String(jtv) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CollectionStatus to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.Status = types.CollectionStatus(jtv) + sv.RetentionPolicyCount = ptr.Int64(i64) } default: @@ -4890,7 +6190,41 @@ func awsAwsjson10_deserializeDocumentDeleteCollectionDetail(v **types.DeleteColl return nil } -func awsAwsjson10_deserializeDocumentDeleteVpcEndpointDetail(v **types.DeleteVpcEndpointDetail, value interface{}) error { +func awsAwsjson10_deserializeDocumentLifecyclePolicySummaries(v *[]types.LifecyclePolicySummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.LifecyclePolicySummary + if *v == nil { + cv = []types.LifecyclePolicySummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LifecyclePolicySummary + destAddr := &col + if err := awsAwsjson10_deserializeDocumentLifecyclePolicySummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson10_deserializeDocumentLifecyclePolicySummary(v **types.LifecyclePolicySummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4903,80 +6237,75 @@ func awsAwsjson10_deserializeDocumentDeleteVpcEndpointDetail(v **types.DeleteVpc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DeleteVpcEndpointDetail + var sv *types.LifecyclePolicySummary if *v == nil { - sv = &types.DeleteVpcEndpointDetail{} + sv = &types.LifecyclePolicySummary{} } else { sv = *v } for key, value := range shape { switch key { - case "id": + case "createdDate": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreatedDate = ptr.Int64(i64) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PolicyDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "lastModifiedDate": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected VpcEndpointId to be of type string, got %T instead", value) + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) } - sv.Id = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.LastModifiedDate = ptr.Int64(i64) } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VpcEndpointName to be of type string, got %T instead", value) + return fmt.Errorf("expected PolicyName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "status": + case "policyVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VpcEndpointStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected PolicyVersion to be of type string, got %T instead", value) } - sv.Status = types.VpcEndpointStatus(jtv) + sv.PolicyVersion = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson10_deserializeDocumentInternalServerException(v **types.InternalServerException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.InternalServerException - if *v == nil { - sv = &types.InternalServerException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "message": + case "type": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected LifecyclePolicyType to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.Type = types.LifecyclePolicyType(jtv) } default: @@ -6510,6 +7839,88 @@ func awsAwsjson10_deserializeOpDocumentBatchGetCollectionOutput(v **BatchGetColl return nil } +func awsAwsjson10_deserializeOpDocumentBatchGetEffectiveLifecyclePolicyOutput(v **BatchGetEffectiveLifecyclePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetEffectiveLifecyclePolicyOutput + if *v == nil { + sv = &BatchGetEffectiveLifecyclePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "effectiveLifecyclePolicyDetails": + if err := awsAwsjson10_deserializeDocumentEffectiveLifecyclePolicyDetails(&sv.EffectiveLifecyclePolicyDetails, value); err != nil { + return err + } + + case "effectiveLifecyclePolicyErrorDetails": + if err := awsAwsjson10_deserializeDocumentEffectiveLifecyclePolicyErrorDetails(&sv.EffectiveLifecyclePolicyErrorDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson10_deserializeOpDocumentBatchGetLifecyclePolicyOutput(v **BatchGetLifecyclePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchGetLifecyclePolicyOutput + if *v == nil { + sv = &BatchGetLifecyclePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lifecyclePolicyDetails": + if err := awsAwsjson10_deserializeDocumentLifecyclePolicyDetails(&sv.LifecyclePolicyDetails, value); err != nil { + return err + } + + case "lifecyclePolicyErrorDetails": + if err := awsAwsjson10_deserializeDocumentLifecyclePolicyErrorDetails(&sv.LifecyclePolicyErrorDetails, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentBatchGetVpcEndpointOutput(v **BatchGetVpcEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6623,6 +8034,42 @@ func awsAwsjson10_deserializeOpDocumentCreateCollectionOutput(v **CreateCollecti return nil } +func awsAwsjson10_deserializeOpDocumentCreateLifecyclePolicyOutput(v **CreateLifecyclePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateLifecyclePolicyOutput + if *v == nil { + sv = &CreateLifecyclePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lifecyclePolicyDetail": + if err := awsAwsjson10_deserializeDocumentLifecyclePolicyDetail(&sv.LifecyclePolicyDetail, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentCreateSecurityConfigOutput(v **CreateSecurityConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6798,6 +8245,37 @@ func awsAwsjson10_deserializeOpDocumentDeleteCollectionOutput(v **DeleteCollecti return nil } +func awsAwsjson10_deserializeOpDocumentDeleteLifecyclePolicyOutput(v **DeleteLifecyclePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteLifecyclePolicyOutput + if *v == nil { + sv = &DeleteLifecyclePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentDeleteSecurityConfigOutput(v **DeleteSecurityConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6995,6 +8473,11 @@ func awsAwsjson10_deserializeOpDocumentGetPoliciesStatsOutput(v **GetPoliciesSta return err } + case "LifecyclePolicyStats": + if err := awsAwsjson10_deserializeDocumentLifecyclePolicyStats(&sv.LifecyclePolicyStats, value); err != nil { + return err + } + case "SecurityConfigStats": if err := awsAwsjson10_deserializeDocumentSecurityConfigStats(&sv.SecurityConfigStats, value); err != nil { return err @@ -7189,6 +8672,51 @@ func awsAwsjson10_deserializeOpDocumentListCollectionsOutput(v **ListCollections return nil } +func awsAwsjson10_deserializeOpDocumentListLifecyclePoliciesOutput(v **ListLifecyclePoliciesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListLifecyclePoliciesOutput + if *v == nil { + sv = &ListLifecyclePoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lifecyclePolicySummaries": + if err := awsAwsjson10_deserializeDocumentLifecyclePolicySummaries(&sv.LifecyclePolicySummaries, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentListSecurityConfigsOutput(v **ListSecurityConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7530,6 +9058,42 @@ func awsAwsjson10_deserializeOpDocumentUpdateCollectionOutput(v **UpdateCollecti return nil } +func awsAwsjson10_deserializeOpDocumentUpdateLifecyclePolicyOutput(v **UpdateLifecyclePolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateLifecyclePolicyOutput + if *v == nil { + sv = &UpdateLifecyclePolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "lifecyclePolicyDetail": + if err := awsAwsjson10_deserializeDocumentLifecyclePolicyDetail(&sv.LifecyclePolicyDetail, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson10_deserializeOpDocumentUpdateSecurityConfigOutput(v **UpdateSecurityConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/opensearchserverless/endpoints.go b/service/opensearchserverless/endpoints.go index eaeff244fd8..0adc5094f35 100644 --- a/service/opensearchserverless/endpoints.go +++ b/service/opensearchserverless/endpoints.go @@ -410,7 +410,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://aoss-fips.") diff --git a/service/opensearchserverless/generated.json b/service/opensearchserverless/generated.json index 2b4bbb22f09..b62fb2a149c 100644 --- a/service/opensearchserverless/generated.json +++ b/service/opensearchserverless/generated.json @@ -10,14 +10,18 @@ "api_client.go", "api_client_test.go", "api_op_BatchGetCollection.go", + "api_op_BatchGetEffectiveLifecyclePolicy.go", + "api_op_BatchGetLifecyclePolicy.go", "api_op_BatchGetVpcEndpoint.go", "api_op_CreateAccessPolicy.go", "api_op_CreateCollection.go", + "api_op_CreateLifecyclePolicy.go", "api_op_CreateSecurityConfig.go", "api_op_CreateSecurityPolicy.go", "api_op_CreateVpcEndpoint.go", "api_op_DeleteAccessPolicy.go", "api_op_DeleteCollection.go", + "api_op_DeleteLifecyclePolicy.go", "api_op_DeleteSecurityConfig.go", "api_op_DeleteSecurityPolicy.go", "api_op_DeleteVpcEndpoint.go", @@ -28,6 +32,7 @@ "api_op_GetSecurityPolicy.go", "api_op_ListAccessPolicies.go", "api_op_ListCollections.go", + "api_op_ListLifecyclePolicies.go", "api_op_ListSecurityConfigs.go", "api_op_ListSecurityPolicies.go", "api_op_ListTagsForResource.go", @@ -37,6 +42,7 @@ "api_op_UpdateAccessPolicy.go", "api_op_UpdateAccountSettings.go", "api_op_UpdateCollection.go", + "api_op_UpdateLifecyclePolicy.go", "api_op_UpdateSecurityConfig.go", "api_op_UpdateSecurityPolicy.go", "api_op_UpdateVpcEndpoint.go", diff --git a/service/opensearchserverless/serializers.go b/service/opensearchserverless/serializers.go index 75bacf00cbb..abbc6f34add 100644 --- a/service/opensearchserverless/serializers.go +++ b/service/opensearchserverless/serializers.go @@ -70,6 +70,116 @@ func (m *awsAwsjson10_serializeOpBatchGetCollection) HandleSerialize(ctx context return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpBatchGetEffectiveLifecyclePolicy struct { +} + +func (*awsAwsjson10_serializeOpBatchGetEffectiveLifecyclePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchGetEffectiveLifecyclePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetEffectiveLifecyclePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("OpenSearchServerless.BatchGetEffectiveLifecyclePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchGetEffectiveLifecyclePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + +type awsAwsjson10_serializeOpBatchGetLifecyclePolicy struct { +} + +func (*awsAwsjson10_serializeOpBatchGetLifecyclePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpBatchGetLifecyclePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*BatchGetLifecyclePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("OpenSearchServerless.BatchGetLifecyclePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentBatchGetLifecyclePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpBatchGetVpcEndpoint struct { } @@ -235,6 +345,61 @@ func (m *awsAwsjson10_serializeOpCreateCollection) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpCreateLifecyclePolicy struct { +} + +func (*awsAwsjson10_serializeOpCreateLifecyclePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpCreateLifecyclePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateLifecyclePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("OpenSearchServerless.CreateLifecyclePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentCreateLifecyclePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpCreateSecurityConfig struct { } @@ -510,6 +675,61 @@ func (m *awsAwsjson10_serializeOpDeleteCollection) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpDeleteLifecyclePolicy struct { +} + +func (*awsAwsjson10_serializeOpDeleteLifecyclePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpDeleteLifecyclePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteLifecyclePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("OpenSearchServerless.DeleteLifecyclePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentDeleteLifecyclePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpDeleteSecurityConfig struct { } @@ -1060,6 +1280,61 @@ func (m *awsAwsjson10_serializeOpListCollections) HandleSerialize(ctx context.Co return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpListLifecyclePolicies struct { +} + +func (*awsAwsjson10_serializeOpListLifecyclePolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpListLifecyclePolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListLifecyclePoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("OpenSearchServerless.ListLifecyclePolicies") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentListLifecyclePoliciesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpListSecurityConfigs struct { } @@ -1555,6 +1830,61 @@ func (m *awsAwsjson10_serializeOpUpdateCollection) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } +type awsAwsjson10_serializeOpUpdateLifecyclePolicy struct { +} + +func (*awsAwsjson10_serializeOpUpdateLifecyclePolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson10_serializeOpUpdateLifecyclePolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateLifecyclePolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.0") + httpBindingEncoder.SetHeader("X-Amz-Target").String("OpenSearchServerless.UpdateLifecyclePolicy") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson10_serializeOpDocumentUpdateLifecyclePolicyInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson10_serializeOpUpdateSecurityConfig struct { } @@ -1775,6 +2105,77 @@ func awsAwsjson10_serializeDocumentCollectionNames(v []string, value smithyjson. return nil } +func awsAwsjson10_serializeDocumentLifecyclePolicyIdentifier(v *types.LifecyclePolicyIdentifier, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentLifecyclePolicyIdentifiers(v []types.LifecyclePolicyIdentifier, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentLifecyclePolicyIdentifier(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentLifecyclePolicyResourceIdentifier(v *types.LifecyclePolicyResourceIdentifier, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Resource != nil { + ok := object.Key("resource") + ok.String(*v.Resource) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + +func awsAwsjson10_serializeDocumentLifecyclePolicyResourceIdentifiers(v []types.LifecyclePolicyResourceIdentifier, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson10_serializeDocumentLifecyclePolicyResourceIdentifier(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson10_serializeDocumentLifecycleResourceFilter(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsAwsjson10_serializeDocumentResourceFilter(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -1920,6 +2321,34 @@ func awsAwsjson10_serializeOpDocumentBatchGetCollectionInput(v *BatchGetCollecti return nil } +func awsAwsjson10_serializeOpDocumentBatchGetEffectiveLifecyclePolicyInput(v *BatchGetEffectiveLifecyclePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ResourceIdentifiers != nil { + ok := object.Key("resourceIdentifiers") + if err := awsAwsjson10_serializeDocumentLifecyclePolicyResourceIdentifiers(v.ResourceIdentifiers, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson10_serializeOpDocumentBatchGetLifecyclePolicyInput(v *BatchGetLifecyclePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Identifiers != nil { + ok := object.Key("identifiers") + if err := awsAwsjson10_serializeDocumentLifecyclePolicyIdentifiers(v.Identifiers, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson10_serializeOpDocumentBatchGetVpcEndpointInput(v *BatchGetVpcEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2000,6 +2429,38 @@ func awsAwsjson10_serializeOpDocumentCreateCollectionInput(v *CreateCollectionIn return nil } +func awsAwsjson10_serializeOpDocumentCreateLifecyclePolicyInput(v *CreateLifecyclePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Policy != nil { + ok := object.Key("policy") + ok.String(*v.Policy) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentCreateSecurityConfigInput(v *CreateSecurityConfigInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2141,6 +2602,28 @@ func awsAwsjson10_serializeOpDocumentDeleteCollectionInput(v *DeleteCollectionIn return nil } +func awsAwsjson10_serializeOpDocumentDeleteLifecyclePolicyInput(v *DeleteLifecyclePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentDeleteSecurityConfigInput(v *DeleteSecurityConfigInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2310,6 +2793,35 @@ func awsAwsjson10_serializeOpDocumentListCollectionsInput(v *ListCollectionsInpu return nil } +func awsAwsjson10_serializeOpDocumentListLifecyclePoliciesInput(v *ListLifecyclePoliciesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + if v.Resources != nil { + ok := object.Key("resources") + if err := awsAwsjson10_serializeDocumentLifecycleResourceFilter(v.Resources, ok); err != nil { + return err + } + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentListSecurityConfigsInput(v *ListSecurityConfigsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2508,6 +3020,43 @@ func awsAwsjson10_serializeOpDocumentUpdateCollectionInput(v *UpdateCollectionIn return nil } +func awsAwsjson10_serializeOpDocumentUpdateLifecyclePolicyInput(v *UpdateLifecyclePolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Policy != nil { + ok := object.Key("policy") + ok.String(*v.Policy) + } + + if v.PolicyVersion != nil { + ok := object.Key("policyVersion") + ok.String(*v.PolicyVersion) + } + + if len(v.Type) > 0 { + ok := object.Key("type") + ok.String(string(v.Type)) + } + + return nil +} + func awsAwsjson10_serializeOpDocumentUpdateSecurityConfigInput(v *UpdateSecurityConfigInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/opensearchserverless/types/enums.go b/service/opensearchserverless/types/enums.go index 10ccf232cca..54fea324db2 100644 --- a/service/opensearchserverless/types/enums.go +++ b/service/opensearchserverless/types/enums.go @@ -68,6 +68,40 @@ func (CollectionType) Values() []CollectionType { } } +type LifecyclePolicyType string + +// Enum values for LifecyclePolicyType +const ( + // retention policy type + LifecyclePolicyTypeRetention LifecyclePolicyType = "retention" +) + +// Values returns all known values for LifecyclePolicyType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (LifecyclePolicyType) Values() []LifecyclePolicyType { + return []LifecyclePolicyType{ + "retention", + } +} + +type ResourceType string + +// Enum values for ResourceType +const ( + // index resource type + ResourceTypeIndex ResourceType = "index" +) + +// Values returns all known values for ResourceType. Note that this can be +// expanded in the future, and so it is only as up to date as the client. The +// ordering of this slice is not guaranteed to be stable across updates. +func (ResourceType) Values() []ResourceType { + return []ResourceType{ + "index", + } +} + type SecurityConfigType string // Enum values for SecurityConfigType diff --git a/service/opensearchserverless/types/types.go b/service/opensearchserverless/types/types.go index 3bd2a8a55c1..ce67dd63402 100644 --- a/service/opensearchserverless/types/types.go +++ b/service/opensearchserverless/types/types.go @@ -61,7 +61,7 @@ type AccessPolicySummary struct { // The version of the policy. PolicyVersion *string - // The type of access policy. Currently the only available type is data . + // The type of access policy. Currently, the only available type is data . Type AccessPolicyType noSmithyDocumentSerde @@ -157,7 +157,7 @@ type CollectionErrorDetail struct { noSmithyDocumentSerde } -// List of filter keys that you can use for LIST, UPDATE, and DELETE requests to +// A list of filter keys that you can use for LIST, UPDATE, and DELETE requests to // OpenSearch Serverless collections. type CollectionFilters struct { @@ -270,6 +270,164 @@ type DeleteVpcEndpointDetail struct { noSmithyDocumentSerde } +// Error information for an OpenSearch Serverless request. +type EffectiveLifecyclePolicyDetail struct { + + // The minimum number of index retention days set. That is an optional param that + // will return as true if the minimum number of days or hours is not set to a + // index resource. + NoMinRetentionPeriod *bool + + // The name of the lifecycle policy. + PolicyName *string + + // The name of the OpenSearch Serverless index resource. + Resource *string + + // The type of OpenSearch Serverless resource. Currently, the only supported + // resource is index . + ResourceType ResourceType + + // The minimum number of index retention in days or hours. This is an optional + // parameter that will return only if it’s set. + RetentionPeriod *string + + // The type of lifecycle policy. + Type LifecyclePolicyType + + noSmithyDocumentSerde +} + +// Error information for an OpenSearch Serverless request. +type EffectiveLifecyclePolicyErrorDetail struct { + + // The error code for the request. + ErrorCode *string + + // A description of the error. For example, The specified Index resource is not + // found . + ErrorMessage *string + + // The name of OpenSearch Serverless index resource. + Resource *string + + // The type of lifecycle policy. + Type LifecyclePolicyType + + noSmithyDocumentSerde +} + +// Details about an OpenSearch Serverless lifecycle policy. +type LifecyclePolicyDetail struct { + + // The date the lifecycle policy was created. + CreatedDate *int64 + + // The description of the lifecycle policy. + Description *string + + // The timestamp of when the lifecycle policy was last modified. + LastModifiedDate *int64 + + // The name of the lifecycle policy. + Name *string + + // The JSON policy document without any whitespaces. + Policy document.Interface + + // The version of the lifecycle policy. + PolicyVersion *string + + // The type of lifecycle policy. + Type LifecyclePolicyType + + noSmithyDocumentSerde +} + +// Error information for an OpenSearch Serverless request. +type LifecyclePolicyErrorDetail struct { + + // The error code for the request. For example, NOT_FOUND . + ErrorCode *string + + // A description of the error. For example, The specified Lifecycle Policy is not + // found . + ErrorMessage *string + + // The name of the lifecycle policy. + Name *string + + // The type of lifecycle policy. + Type LifecyclePolicyType + + noSmithyDocumentSerde +} + +// The unique identifiers of policy types and policy names. +type LifecyclePolicyIdentifier struct { + + // The name of the lifecycle policy. + // + // This member is required. + Name *string + + // The type of lifecycle policy. + // + // This member is required. + Type LifecyclePolicyType + + noSmithyDocumentSerde +} + +// The unique identifiers of policy types and resource names. +type LifecyclePolicyResourceIdentifier struct { + + // The name of the OpenSearch Serverless ilndex resource. + // + // This member is required. + Resource *string + + // The type of lifecycle policy. + // + // This member is required. + Type LifecyclePolicyType + + noSmithyDocumentSerde +} + +// Statistics for an OpenSearch Serverless lifecycle policy. +type LifecyclePolicyStats struct { + + // The number of retention lifecycle policies in the current account. + RetentionPolicyCount *int64 + + noSmithyDocumentSerde +} + +// A summary of the lifecycle policy. +type LifecyclePolicySummary struct { + + // The Epoch time when the lifecycle policy was created. + CreatedDate *int64 + + // The description of the lifecycle policy. + Description *string + + // The date and time when the lifecycle policy was last modified. + LastModifiedDate *int64 + + // The name of the lifecycle policy. + Name *string + + // The version of the lifecycle policy. + PolicyVersion *string + + // The type of lifecycle policy. + Type LifecyclePolicyType + + noSmithyDocumentSerde +} + // Describes SAML options for an OpenSearch Serverless security configuration in // the form of a key-value map. type SamlConfigOptions struct { diff --git a/service/opensearchserverless/validators.go b/service/opensearchserverless/validators.go index e64e9c4db08..616286d00a8 100644 --- a/service/opensearchserverless/validators.go +++ b/service/opensearchserverless/validators.go @@ -10,6 +10,46 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpBatchGetEffectiveLifecyclePolicy struct { +} + +func (*validateOpBatchGetEffectiveLifecyclePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetEffectiveLifecyclePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetEffectiveLifecyclePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetEffectiveLifecyclePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpBatchGetLifecyclePolicy struct { +} + +func (*validateOpBatchGetLifecyclePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpBatchGetLifecyclePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*BatchGetLifecyclePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpBatchGetLifecyclePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpBatchGetVpcEndpoint struct { } @@ -70,6 +110,26 @@ func (m *validateOpCreateCollection) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpCreateLifecyclePolicy struct { +} + +func (*validateOpCreateLifecyclePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateLifecyclePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateLifecyclePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateLifecyclePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateSecurityConfig struct { } @@ -170,6 +230,26 @@ func (m *validateOpDeleteCollection) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpDeleteLifecyclePolicy struct { +} + +func (*validateOpDeleteLifecyclePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteLifecyclePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteLifecyclePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteLifecyclePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteSecurityConfig struct { } @@ -310,6 +390,26 @@ func (m *validateOpListAccessPolicies) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpListLifecyclePolicies struct { +} + +func (*validateOpListLifecyclePolicies) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListLifecyclePolicies) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListLifecyclePoliciesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListLifecyclePoliciesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListSecurityConfigs struct { } @@ -450,6 +550,26 @@ func (m *validateOpUpdateCollection) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpUpdateLifecyclePolicy struct { +} + +func (*validateOpUpdateLifecyclePolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateLifecyclePolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateLifecyclePolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateLifecyclePolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateSecurityConfig struct { } @@ -510,6 +630,14 @@ func (m *validateOpUpdateVpcEndpoint) HandleInitialize(ctx context.Context, in m return next.HandleInitialize(ctx, in) } +func addOpBatchGetEffectiveLifecyclePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetEffectiveLifecyclePolicy{}, middleware.After) +} + +func addOpBatchGetLifecyclePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchGetLifecyclePolicy{}, middleware.After) +} + func addOpBatchGetVpcEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpBatchGetVpcEndpoint{}, middleware.After) } @@ -522,6 +650,10 @@ func addOpCreateCollectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateCollection{}, middleware.After) } +func addOpCreateLifecyclePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateLifecyclePolicy{}, middleware.After) +} + func addOpCreateSecurityConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateSecurityConfig{}, middleware.After) } @@ -542,6 +674,10 @@ func addOpDeleteCollectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteCollection{}, middleware.After) } +func addOpDeleteLifecyclePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteLifecyclePolicy{}, middleware.After) +} + func addOpDeleteSecurityConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteSecurityConfig{}, middleware.After) } @@ -570,6 +706,10 @@ func addOpListAccessPoliciesValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpListAccessPolicies{}, middleware.After) } +func addOpListLifecyclePoliciesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListLifecyclePolicies{}, middleware.After) +} + func addOpListSecurityConfigsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListSecurityConfigs{}, middleware.After) } @@ -598,6 +738,10 @@ func addOpUpdateCollectionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateCollection{}, middleware.After) } +func addOpUpdateLifecyclePolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateLifecyclePolicy{}, middleware.After) +} + func addOpUpdateSecurityConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateSecurityConfig{}, middleware.After) } @@ -610,6 +754,76 @@ func addOpUpdateVpcEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateVpcEndpoint{}, middleware.After) } +func validateLifecyclePolicyIdentifier(v *types.LifecyclePolicyIdentifier) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LifecyclePolicyIdentifier"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLifecyclePolicyIdentifiers(v []types.LifecyclePolicyIdentifier) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LifecyclePolicyIdentifiers"} + for i := range v { + if err := validateLifecyclePolicyIdentifier(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLifecyclePolicyResourceIdentifier(v *types.LifecyclePolicyResourceIdentifier) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LifecyclePolicyResourceIdentifier"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Resource == nil { + invalidParams.Add(smithy.NewErrParamRequired("Resource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateLifecyclePolicyResourceIdentifiers(v []types.LifecyclePolicyResourceIdentifier) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "LifecyclePolicyResourceIdentifiers"} + for i := range v { + if err := validateLifecyclePolicyResourceIdentifier(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSamlConfigOptions(v *types.SamlConfigOptions) error { if v == nil { return nil @@ -660,6 +874,44 @@ func validateTags(v []types.Tag) error { } } +func validateOpBatchGetEffectiveLifecyclePolicyInput(v *BatchGetEffectiveLifecyclePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetEffectiveLifecyclePolicyInput"} + if v.ResourceIdentifiers == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIdentifiers")) + } else if v.ResourceIdentifiers != nil { + if err := validateLifecyclePolicyResourceIdentifiers(v.ResourceIdentifiers); err != nil { + invalidParams.AddNested("ResourceIdentifiers", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpBatchGetLifecyclePolicyInput(v *BatchGetLifecyclePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BatchGetLifecyclePolicyInput"} + if v.Identifiers == nil { + invalidParams.Add(smithy.NewErrParamRequired("Identifiers")) + } else if v.Identifiers != nil { + if err := validateLifecyclePolicyIdentifiers(v.Identifiers); err != nil { + invalidParams.AddNested("Identifiers", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpBatchGetVpcEndpointInput(v *BatchGetVpcEndpointInput) error { if v == nil { return nil @@ -716,6 +968,27 @@ func validateOpCreateCollectionInput(v *CreateCollectionInput) error { } } +func validateOpCreateLifecyclePolicyInput(v *CreateLifecyclePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateLifecyclePolicyInput"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateSecurityConfigInput(v *CreateSecurityConfigInput) error { if v == nil { return nil @@ -814,6 +1087,24 @@ func validateOpDeleteCollectionInput(v *DeleteCollectionInput) error { } } +func validateOpDeleteLifecyclePolicyInput(v *DeleteLifecyclePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteLifecyclePolicyInput"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteSecurityConfigInput(v *DeleteSecurityConfigInput) error { if v == nil { return nil @@ -928,6 +1219,21 @@ func validateOpListAccessPoliciesInput(v *ListAccessPoliciesInput) error { } } +func validateOpListLifecyclePoliciesInput(v *ListLifecyclePoliciesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListLifecyclePoliciesInput"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListSecurityConfigsInput(v *ListSecurityConfigsInput) error { if v == nil { return nil @@ -1049,6 +1355,27 @@ func validateOpUpdateCollectionInput(v *UpdateCollectionInput) error { } } +func validateOpUpdateLifecyclePolicyInput(v *UpdateLifecyclePolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateLifecyclePolicyInput"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.PolicyVersion == nil { + invalidParams.Add(smithy.NewErrParamRequired("PolicyVersion")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateSecurityConfigInput(v *UpdateSecurityConfigInput) error { if v == nil { return nil diff --git a/service/sfn/internal/endpoints/endpoints.go b/service/sfn/internal/endpoints/endpoints.go index 24463596c49..ecd7e469ad0 100644 --- a/service/sfn/internal/endpoints/endpoints.go +++ b/service/sfn/internal/endpoints/endpoints.go @@ -323,9 +323,21 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "cn-north-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-north-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "states.cn-north-1.api.amazonwebservices.com.cn", + }, endpoints.EndpointKey{ Region: "cn-northwest-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "states.cn-northwest-1.api.amazonwebservices.com.cn", + }, }, }, {