diff --git a/go.mod b/go.mod index b137888ce9..107f6be3ff 100644 --- a/go.mod +++ b/go.mod @@ -40,7 +40,9 @@ require ( github.com/aws/aws-sdk-go v1.55.5 github.com/aws/aws-sdk-go-v2 v1.36.5 github.com/aws/aws-sdk-go-v2/config v1.29.14 + github.com/aws/aws-sdk-go-v2/credentials v1.17.67 github.com/aws/aws-sdk-go-v2/service/ec2 v1.159.0 + github.com/aws/aws-sdk-go-v2/service/efs v1.36.2 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.29.6 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.43.11 github.com/aws/aws-sdk-go-v2/service/iam v1.42.0 @@ -174,7 +176,6 @@ require ( github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect github.com/asaskevich/govalidator/v11 v11.0.2-0.20250122183457-e11347878e23 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.67 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.36 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.36 // indirect diff --git a/go.sum b/go.sum index 872ec46db7..78381c2925 100644 --- a/go.sum +++ b/go.sum @@ -179,6 +179,8 @@ github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 h1:ZNTqv4nIdE/DiBfUUfXcLZ/Spcu github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34/go.mod h1:zf7Vcd1ViW7cPqYWEHLHJkS50X0JS2IKz9Cgaj6ugrs= github.com/aws/aws-sdk-go-v2/service/ec2 v1.159.0 h1:DmmVmiLPlcntOcjWMRwDPMNx/wi2kAVrf2ZmSN5gkAg= github.com/aws/aws-sdk-go-v2/service/ec2 v1.159.0/go.mod h1:xejKuuRDjz6z5OqyeLsz01MlOqqW7CqpAB4PabNvpu8= +github.com/aws/aws-sdk-go-v2/service/efs v1.36.2 h1:u559lskjn8+5WRnLU+Aq0VCZLjgw+JXYHiwSfOpweBw= +github.com/aws/aws-sdk-go-v2/service/efs v1.36.2/go.mod h1:e6UrCp+V52p83QPNWC05I2N3vkg15XTfbQ0n4IvYDYQ= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.29.6 h1:9grU/+HRwLXJV8XUjEPThJj/H+0oHkeNBFpSSfZekeg= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.29.6/go.mod h1:N4fs285CsnBHlAkzBpQapefR/noggTyF09fWs72EzB4= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.43.11 h1:lhPF/4q7oWvPaP5KxRJ3vfVQlwVFtzcbxhzOWkEdtf4= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/CHANGELOG.md new file mode 100644 index 0000000000..882f619c65 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/CHANGELOG.md @@ -0,0 +1,656 @@ +# v1.36.2 (2025-06-17) + +* **Dependency Update**: Update to smithy-go v1.22.4. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.1 (2025-06-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.0 (2025-06-09) + +* **Feature**: Added support for Internet Protocol Version 6 (IPv6) on EFS Service APIs and mount targets. + +# v1.35.4 (2025-06-06) + +* No change notes available for this release. + +# v1.35.3 (2025-04-10) + +* No change notes available for this release. + +# v1.35.2 (2025-04-03) + +* No change notes available for this release. + +# v1.35.1 (2025-03-04.2) + +* **Bug Fix**: Add assurance test for operation order. + +# v1.35.0 (2025-02-27) + +* **Feature**: Track credential providers via User-Agent Feature ids +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.12 (2025-02-18) + +* **Bug Fix**: Bump go version to 1.22 +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.11 (2025-02-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.10 (2025-02-04) + +* No change notes available for this release. + +# v1.34.9 (2025-01-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.8 (2025-01-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.7 (2025-01-24) + +* **Dependency Update**: Updated to the latest SDK module versions +* **Dependency Update**: Upgrade to smithy-go v1.22.2. + +# v1.34.6 (2025-01-21) + +* No change notes available for this release. + +# v1.34.5 (2025-01-17) + +* **Bug Fix**: Fix bug where credentials weren't refreshed during retry loop. + +# v1.34.4 (2025-01-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.3 (2025-01-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.2 (2024-12-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.1 (2024-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.34.0 (2024-11-19) + +* **Feature**: Add support for the new parameters in EFS replication APIs + +# v1.33.6 (2024-11-18) + +* **Dependency Update**: Update to smithy-go v1.22.1. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.5 (2024-11-07) + +* **Bug Fix**: Adds case-insensitive handling of error message fields in service responses + +# v1.33.4 (2024-11-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.3 (2024-10-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.2 (2024-10-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.1 (2024-10-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.33.0 (2024-10-04) + +* **Feature**: Add support for HTTP client metrics. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.32.4 (2024-10-03) + +* No change notes available for this release. + +# v1.32.3 (2024-09-27) + +* No change notes available for this release. + +# v1.32.2 (2024-09-25) + +* No change notes available for this release. + +# v1.32.1 (2024-09-23) + +* No change notes available for this release. + +# v1.32.0 (2024-09-20) + +* **Feature**: Add tracing and metrics support to service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.8 (2024-09-17) + +* **Bug Fix**: **BREAKFIX**: Only generate AccountIDEndpointMode config for services that use it. This is a compiler break, but removes no actual functionality, as no services currently use the account ID in endpoint resolution. + +# v1.31.7 (2024-09-16) + +* No change notes available for this release. + +# v1.31.6 (2024-09-04) + +* No change notes available for this release. + +# v1.31.5 (2024-09-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.4 (2024-08-15) + +* **Dependency Update**: Bump minimum Go version to 1.21. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.3 (2024-07-10.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.2 (2024-07-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.1 (2024-06-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.31.0 (2024-06-26) + +* **Feature**: Support list-of-string endpoint parameter. + +# v1.30.1 (2024-06-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.30.0 (2024-06-18) + +* **Feature**: Track usage of various AWS SDK features in user-agent string. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.29.0 (2024-06-17) + +* **Feature**: Add v2 smoke tests and smithy smokeTests trait for SDK testing. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.10 (2024-06-07) + +* **Bug Fix**: Add clock skew correction on all service clients +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.9 (2024-06-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.8 (2024-05-23) + +* No change notes available for this release. + +# v1.28.7 (2024-05-16) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.6 (2024-05-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.5 (2024-05-08) + +* **Bug Fix**: GoDoc improvement + +# v1.28.4 (2024-03-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.3 (2024-03-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.2 (2024-03-07) + +* **Bug Fix**: Remove dependency on go-cmp. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.1 (2024-02-23) + +* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.28.0 (2024-02-22) + +* **Feature**: Add middleware stack snapshot tests. + +# v1.27.3 (2024-02-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.27.2 (2024-02-20) + +* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. + +# v1.27.1 (2024-02-16) + +* No change notes available for this release. + +# v1.27.0 (2024-02-13) + +* **Feature**: Bump minimum Go version to 1.20 per our language support policy. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.6 (2024-01-04) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.5 (2023-12-08) + +* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. + +# v1.26.4 (2023-12-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.3 (2023-12-06) + +* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. + +# v1.26.2 (2023-12-01) + +* **Bug Fix**: Correct wrapping of errors in authentication workflow. +* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.1 (2023-11-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.26.0 (2023-11-29) + +* **Feature**: Expose Options() accessor on service clients. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.2 (2023-11-28.2) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.25.1 (2023-11-28) + +* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. + +# v1.25.0 (2023-11-27.2) + +* **Feature**: Adding support for EFS Replication to existing file system. + +# v1.24.0 (2023-11-27) + +* **Feature**: Adding support for EFS Archive lifecycle configuration. + +# v1.23.3 (2023-11-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.2 (2023-11-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.1 (2023-11-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.23.0 (2023-11-01) + +* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.22.0 (2023-10-31) + +* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.9 (2023-10-12) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.8 (2023-10-06) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.7 (2023-09-22) + +* **Documentation**: Documentation updates for Elastic File System + +# v1.21.6 (2023-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.5 (2023-08-18) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.4 (2023-08-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.3 (2023-08-08) + +* No change notes available for this release. + +# v1.21.2 (2023-08-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.21.1 (2023-08-01) + +* No change notes available for this release. + +# v1.21.0 (2023-07-31) + +* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.5 (2023-07-28) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.4 (2023-07-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.3 (2023-06-15) + +* **Documentation**: Documentation updates for EFS. + +# v1.20.2 (2023-06-13) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.20.1 (2023-05-04) + +* No change notes available for this release. + +# v1.20.0 (2023-04-28) + +* **Feature**: This release adds PAUSED and PAUSING state as a returned value for DescribeReplicationConfigurations response. + +# v1.19.13 (2023-04-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.12 (2023-04-13) + +* No change notes available for this release. + +# v1.19.11 (2023-04-10) + +* No change notes available for this release. + +# v1.19.10 (2023-04-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.9 (2023-03-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.8 (2023-03-10) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.7 (2023-02-22) + +* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. + +# v1.19.6 (2023-02-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.5 (2023-02-17) + +* No change notes available for this release. + +# v1.19.4 (2023-02-15) + +* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. +* **Bug Fix**: Correct error type parsing for restJson services. +* **Documentation**: Documentation update for EFS to support IAM best practices. + +# v1.19.3 (2023-02-03) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.19.2 (2023-01-20) + +* No change notes available for this release. + +# v1.19.1 (2023-01-18) + +* **Documentation**: Documentation updates for EFS access points limit increase + +# v1.19.0 (2023-01-05) + +* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). + +# v1.18.3 (2022-12-16) + +* **Documentation**: General documentation updates for EFS. + +# v1.18.2 (2022-12-15) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.1 (2022-12-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.18.0 (2022-11-28) + +* **Feature**: This release adds elastic as a new ThroughputMode value for EFS file systems and adds AFTER_1_DAY as a value for TransitionToIARules. + +# v1.17.19 (2022-11-10) + +* No change notes available for this release. + +# v1.17.18 (2022-10-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.17 (2022-10-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.16 (2022-10-19) + +* No change notes available for this release. + +# v1.17.15 (2022-09-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.14 (2022-09-14) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.13 (2022-09-02) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.12 (2022-08-31) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.11 (2022-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.10 (2022-08-11) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.9 (2022-08-09) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.8 (2022-08-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.7 (2022-08-01) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.6 (2022-07-05) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.5 (2022-06-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.4 (2022-06-07) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.3 (2022-05-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.2 (2022-05-05) + +* No change notes available for this release. + +# v1.17.1 (2022-04-25) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.17.0 (2022-04-12) + +* **Feature**: Amazon EFS adds support for a ThrottlingException when using the CreateAccessPoint API if the account is nearing the AccessPoint limit(120). + +# v1.16.3 (2022-03-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.2 (2022-03-24) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.1 (2022-03-23) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.16.0 (2022-03-08) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.15.0 (2022-02-24) + +* **Feature**: API client updated +* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.14.0 (2022-01-28) + +* **Feature**: Updated to latest API model. + +# v1.13.0 (2022-01-14) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.12.0 (2022-01-07) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.11.0 (2021-12-21) + +* **Feature**: API Paginators now support specifying the initial starting token, and support stopping on empty string tokens. + +# v1.10.2 (2021-12-02) + +* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.1 (2021-11-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.10.0 (2021-11-06) + +* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.9.0 (2021-10-21) + +* **Feature**: API client updated +* **Feature**: Updated to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.8.0 (2021-10-11) + +* **Feature**: API client updated +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.1 (2021-09-17) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.7.0 (2021-09-02) + +* **Feature**: API client updated + +# v1.6.0 (2021-08-27) + +* **Feature**: Updated API model to latest revision. +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.5.3 (2021-08-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.5.2 (2021-08-04) + +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.5.1 (2021-07-15) + +* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.5.0 (2021-06-25) + +* **Feature**: Updated `github.com/aws/smithy-go` to latest version +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.0 (2021-05-25) + +* **Feature**: API client updated + +# v1.3.1 (2021-05-20) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.3.0 (2021-05-14) + +* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. +* **Dependency Update**: Updated to the latest SDK module versions + diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/LICENSE.txt b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/LICENSE.txt new file mode 100644 index 0000000000..d645695673 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/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/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_client.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_client.go new file mode 100644 index 0000000000..7997c2c138 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_client.go @@ -0,0 +1,960 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + cryptorand "crypto/rand" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + "github.com/aws/aws-sdk-go-v2/aws/defaults" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/retry" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" + internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + smithydocument "github.com/aws/smithy-go/document" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net" + "net/http" + "sync/atomic" + "time" +) + +const ServiceID = "EFS" +const ServiceAPIVersion = "2015-02-01" + +type operationMetrics struct { + Duration metrics.Float64Histogram + SerializeDuration metrics.Float64Histogram + ResolveIdentityDuration metrics.Float64Histogram + ResolveEndpointDuration metrics.Float64Histogram + SignRequestDuration metrics.Float64Histogram + DeserializeDuration metrics.Float64Histogram +} + +func (m *operationMetrics) histogramFor(name string) metrics.Float64Histogram { + switch name { + case "client.call.duration": + return m.Duration + case "client.call.serialization_duration": + return m.SerializeDuration + case "client.call.resolve_identity_duration": + return m.ResolveIdentityDuration + case "client.call.resolve_endpoint_duration": + return m.ResolveEndpointDuration + case "client.call.signing_duration": + return m.SignRequestDuration + case "client.call.deserialization_duration": + return m.DeserializeDuration + default: + panic("unrecognized operation metric") + } +} + +func timeOperationMetric[T any]( + ctx context.Context, metric string, fn func() (T, error), + opts ...metrics.RecordMetricOption, +) (T, error) { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + start := time.Now() + v, err := fn() + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + return v, err +} + +func startMetricTimer(ctx context.Context, metric string, opts ...metrics.RecordMetricOption) func() { + instr := getOperationMetrics(ctx).histogramFor(metric) + opts = append([]metrics.RecordMetricOption{withOperationMetadata(ctx)}, opts...) + + var ended bool + start := time.Now() + return func() { + if ended { + return + } + ended = true + + end := time.Now() + + elapsed := end.Sub(start) + instr.Record(ctx, float64(elapsed)/1e9, opts...) + } +} + +func withOperationMetadata(ctx context.Context) metrics.RecordMetricOption { + return func(o *metrics.RecordMetricOptions) { + o.Properties.Set("rpc.service", middleware.GetServiceID(ctx)) + o.Properties.Set("rpc.method", middleware.GetOperationName(ctx)) + } +} + +type operationMetricsKey struct{} + +func withOperationMetrics(parent context.Context, mp metrics.MeterProvider) (context.Context, error) { + meter := mp.Meter("github.com/aws/aws-sdk-go-v2/service/efs") + om := &operationMetrics{} + + var err error + + om.Duration, err = operationMetricTimer(meter, "client.call.duration", + "Overall call duration (including retries and time to send or receive request and response body)") + if err != nil { + return nil, err + } + om.SerializeDuration, err = operationMetricTimer(meter, "client.call.serialization_duration", + "The time it takes to serialize a message body") + if err != nil { + return nil, err + } + om.ResolveIdentityDuration, err = operationMetricTimer(meter, "client.call.auth.resolve_identity_duration", + "The time taken to acquire an identity (AWS credentials, bearer token, etc) from an Identity Provider") + if err != nil { + return nil, err + } + om.ResolveEndpointDuration, err = operationMetricTimer(meter, "client.call.resolve_endpoint_duration", + "The time it takes to resolve an endpoint (endpoint resolver, not DNS) for the request") + if err != nil { + return nil, err + } + om.SignRequestDuration, err = operationMetricTimer(meter, "client.call.auth.signing_duration", + "The time it takes to sign a request") + if err != nil { + return nil, err + } + om.DeserializeDuration, err = operationMetricTimer(meter, "client.call.deserialization_duration", + "The time it takes to deserialize a message body") + if err != nil { + return nil, err + } + + return context.WithValue(parent, operationMetricsKey{}, om), nil +} + +func operationMetricTimer(m metrics.Meter, name, desc string) (metrics.Float64Histogram, error) { + return m.Float64Histogram(name, func(o *metrics.InstrumentOptions) { + o.UnitLabel = "s" + o.Description = desc + }) +} + +func getOperationMetrics(ctx context.Context) *operationMetrics { + return ctx.Value(operationMetricsKey{}).(*operationMetrics) +} + +func operationTracer(p tracing.TracerProvider) tracing.Tracer { + return p.Tracer("github.com/aws/aws-sdk-go-v2/service/efs") +} + +// Client provides the API client to make operations call for Amazon Elastic File +// System. +type Client struct { + options Options + + // Difference between the time reported by the server and the client + timeOffset *atomic.Int64 +} + +// New returns an initialized Client based on the functional options. Provide +// additional functional options to further configure the behavior of the client, +// such as changing the client's endpoint or adding custom middleware behavior. +func New(options Options, optFns ...func(*Options)) *Client { + options = options.Copy() + + resolveDefaultLogger(&options) + + setResolvedDefaultsMode(&options) + + resolveRetryer(&options) + + resolveHTTPClient(&options) + + resolveHTTPSignerV4(&options) + + resolveIdempotencyTokenProvider(&options) + + resolveEndpointResolverV2(&options) + + resolveTracerProvider(&options) + + resolveMeterProvider(&options) + + resolveAuthSchemeResolver(&options) + + for _, fn := range optFns { + fn(&options) + } + + finalizeRetryMaxAttempts(&options) + + ignoreAnonymousAuth(&options) + + wrapWithAnonymousAuth(&options) + + resolveAuthSchemes(&options) + + client := &Client{ + options: options, + } + + initializeTimeOffsetResolver(client) + + return client +} + +// Options returns a copy of the client configuration. +// +// Callers SHOULD NOT perform mutations on any inner structures within client +// config. Config overrides should instead be made on a per-operation basis through +// functional options. +func (c *Client) Options() Options { + return c.options.Copy() +} + +func (c *Client) invokeOperation( + ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error, +) ( + result interface{}, metadata middleware.Metadata, err error, +) { + ctx = middleware.ClearStackValues(ctx) + ctx = middleware.WithServiceID(ctx, ServiceID) + ctx = middleware.WithOperationName(ctx, opID) + + stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) + options := c.options.Copy() + + for _, fn := range optFns { + fn(&options) + } + + finalizeOperationRetryMaxAttempts(&options, *c) + + finalizeClientEndpointResolverOptions(&options) + + for _, fn := range stackFns { + if err := fn(stack, options); err != nil { + return nil, metadata, err + } + } + + for _, fn := range options.APIOptions { + if err := fn(stack); err != nil { + return nil, metadata, err + } + } + + ctx, err = withOperationMetrics(ctx, options.MeterProvider) + if err != nil { + return nil, metadata, err + } + + tracer := operationTracer(options.TracerProvider) + spanName := fmt.Sprintf("%s.%s", ServiceID, opID) + + ctx = tracing.WithOperationTracer(ctx, tracer) + + ctx, span := tracer.StartSpan(ctx, spanName, func(o *tracing.SpanOptions) { + o.Kind = tracing.SpanKindClient + o.Properties.Set("rpc.system", "aws-api") + o.Properties.Set("rpc.method", opID) + o.Properties.Set("rpc.service", ServiceID) + }) + endTimer := startMetricTimer(ctx, "client.call.duration") + defer endTimer() + defer span.End() + + handler := smithyhttp.NewClientHandlerWithOptions(options.HTTPClient, func(o *smithyhttp.ClientHandler) { + o.Meter = options.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/efs") + }) + decorated := middleware.DecorateHandler(handler, stack) + result, metadata, err = decorated.Handle(ctx, params) + if err != nil { + span.SetProperty("exception.type", fmt.Sprintf("%T", err)) + span.SetProperty("exception.message", err.Error()) + + var aerr smithy.APIError + if errors.As(err, &aerr) { + span.SetProperty("api.error_code", aerr.ErrorCode()) + span.SetProperty("api.error_message", aerr.ErrorMessage()) + span.SetProperty("api.error_fault", aerr.ErrorFault().String()) + } + + err = &smithy.OperationError{ + ServiceID: ServiceID, + OperationName: opID, + Err: err, + } + } + + span.SetProperty("error", err != nil) + if err == nil { + span.SetStatus(tracing.SpanStatusOK) + } else { + span.SetStatus(tracing.SpanStatusError) + } + + return result, metadata, err +} + +type operationInputKey struct{} + +func setOperationInput(ctx context.Context, input interface{}) context.Context { + return middleware.WithStackValue(ctx, operationInputKey{}, input) +} + +func getOperationInput(ctx context.Context) interface{} { + return middleware.GetStackValue(ctx, operationInputKey{}) +} + +type setOperationInputMiddleware struct { +} + +func (*setOperationInputMiddleware) ID() string { + return "setOperationInput" +} + +func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + ctx = setOperationInput(ctx, in.Parameters) + return next.HandleSerialize(ctx, in) +} + +func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { + if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { + return fmt.Errorf("add ResolveAuthScheme: %w", err) + } + if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { + return fmt.Errorf("add GetIdentity: %v", err) + } + if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { + return fmt.Errorf("add ResolveEndpointV2: %v", err) + } + if err := stack.Finalize.Insert(&signRequestMiddleware{options: options}, "ResolveEndpointV2", middleware.After); err != nil { + return fmt.Errorf("add Signing: %w", err) + } + return nil +} +func resolveAuthSchemeResolver(options *Options) { + if options.AuthSchemeResolver == nil { + options.AuthSchemeResolver = &defaultAuthSchemeResolver{} + } +} + +func resolveAuthSchemes(options *Options) { + if options.AuthSchemes == nil { + options.AuthSchemes = []smithyhttp.AuthScheme{ + internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ + Signer: options.HTTPSignerV4, + Logger: options.Logger, + LogSigning: options.ClientLogMode.IsSigning(), + }), + } + } +} + +type noSmithyDocumentSerde = smithydocument.NoSerde + +type legacyEndpointContextSetter struct { + LegacyResolver EndpointResolver +} + +func (*legacyEndpointContextSetter) ID() string { + return "legacyEndpointContextSetter" +} + +func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.LegacyResolver != nil { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) + } + + return next.HandleInitialize(ctx, in) + +} +func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { + return stack.Initialize.Add(&legacyEndpointContextSetter{ + LegacyResolver: o.EndpointResolver, + }, middleware.Before) +} + +func resolveDefaultLogger(o *Options) { + if o.Logger != nil { + return + } + o.Logger = logging.Nop{} +} + +func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { + return middleware.AddSetLoggerMiddleware(stack, o.Logger) +} + +func setResolvedDefaultsMode(o *Options) { + if len(o.resolvedDefaultsMode) > 0 { + return + } + + var mode aws.DefaultsMode + mode.SetFromString(string(o.DefaultsMode)) + + if mode == aws.DefaultsModeAuto { + mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) + } + + o.resolvedDefaultsMode = mode +} + +// NewFromConfig returns a new client from the provided config. +func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { + opts := Options{ + Region: cfg.Region, + DefaultsMode: cfg.DefaultsMode, + RuntimeEnvironment: cfg.RuntimeEnvironment, + HTTPClient: cfg.HTTPClient, + Credentials: cfg.Credentials, + APIOptions: cfg.APIOptions, + Logger: cfg.Logger, + ClientLogMode: cfg.ClientLogMode, + AppID: cfg.AppID, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, optFns...) +} + +func resolveHTTPClient(o *Options) { + var buildable *awshttp.BuildableClient + + if o.HTTPClient != nil { + var ok bool + buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) + if !ok { + return + } + } else { + buildable = awshttp.NewBuildableClient() + } + + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { + if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { + dialer.Timeout = dialerTimeout + } + }) + + buildable = buildable.WithTransportOptions(func(transport *http.Transport) { + if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { + transport.TLSHandshakeTimeout = tlsHandshakeTimeout + } + }) + } + + o.HTTPClient = buildable +} + +func resolveRetryer(o *Options) { + if o.Retryer != nil { + return + } + + if len(o.RetryMode) == 0 { + modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) + if err == nil { + o.RetryMode = modeConfig.RetryMode + } + } + if len(o.RetryMode) == 0 { + o.RetryMode = aws.RetryModeStandard + } + + var standardOptions []func(*retry.StandardOptions) + if v := o.RetryMaxAttempts; v != 0 { + standardOptions = append(standardOptions, func(so *retry.StandardOptions) { + so.MaxAttempts = v + }) + } + + switch o.RetryMode { + case aws.RetryModeAdaptive: + var adaptiveOptions []func(*retry.AdaptiveModeOptions) + if len(standardOptions) != 0 { + adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { + ao.StandardOptions = append(ao.StandardOptions, standardOptions...) + }) + } + o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) + + default: + o.Retryer = retry.NewStandard(standardOptions...) + } +} + +func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { + if cfg.Retryer == nil { + return + } + o.Retryer = cfg.Retryer() +} + +func resolveAWSRetryMode(cfg aws.Config, o *Options) { + if len(cfg.RetryMode) == 0 { + return + } + o.RetryMode = cfg.RetryMode +} +func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { + if cfg.RetryMaxAttempts == 0 { + return + } + o.RetryMaxAttempts = cfg.RetryMaxAttempts +} + +func finalizeRetryMaxAttempts(o *Options) { + if o.RetryMaxAttempts == 0 { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func finalizeOperationRetryMaxAttempts(o *Options, client Client) { + if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + return + } + + o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) +} + +func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { + if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { + return + } + o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) +} + +func addClientUserAgent(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "efs", goModuleVersion) + if len(options.AppID) > 0 { + ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) + } + + return nil +} + +func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { + id := (*awsmiddleware.RequestUserAgent)(nil).ID() + mw, ok := stack.Build.Get(id) + if !ok { + mw = awsmiddleware.NewRequestUserAgent() + if err := stack.Build.Add(mw, middleware.After); err != nil { + return nil, err + } + } + + ua, ok := mw.(*awsmiddleware.RequestUserAgent) + if !ok { + return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) + } + + return ua, nil +} + +type HTTPSignerV4 interface { + SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error +} + +func resolveHTTPSignerV4(o *Options) { + if o.HTTPSignerV4 != nil { + return + } + o.HTTPSignerV4 = newDefaultV4Signer(*o) +} + +func newDefaultV4Signer(o Options) *v4.Signer { + return v4.NewSigner(func(so *v4.SignerOptions) { + so.Logger = o.Logger + so.LogSigning = o.ClientLogMode.IsSigning() + }) +} + +func addClientRequestID(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) +} + +func addComputeContentLength(stack *middleware.Stack) error { + return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) +} + +func addRawResponseToMetadata(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) +} + +func addRecordResponseTiming(stack *middleware.Stack) error { + return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) +} + +func addSpanRetryLoop(stack *middleware.Stack, options Options) error { + return stack.Finalize.Insert(&spanRetryLoop{options: options}, "Retry", middleware.Before) +} + +type spanRetryLoop struct { + options Options +} + +func (*spanRetryLoop) ID() string { + return "spanRetryLoop" +} + +func (m *spanRetryLoop) HandleFinalize( + ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler, +) ( + middleware.FinalizeOutput, middleware.Metadata, error, +) { + tracer := operationTracer(m.options.TracerProvider) + ctx, span := tracer.StartSpan(ctx, "RetryLoop") + defer span.End() + + return next.HandleFinalize(ctx, in) +} +func addStreamingEventsPayload(stack *middleware.Stack) error { + return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) +} + +func addUnsignedPayload(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) +} + +func addComputePayloadSHA256(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) +} + +func addContentSHA256Header(stack *middleware.Stack) error { + return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) +} + +func addIsWaiterUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) + return nil + }) +} + +func addIsPaginatorUserAgent(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) + return nil + }) +} + +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + +func addRetry(stack *middleware.Stack, o Options) error { + attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { + m.LogAttempts = o.ClientLogMode.IsRetries() + m.OperationMeter = o.MeterProvider.Meter("github.com/aws/aws-sdk-go-v2/service/efs") + }) + if err := stack.Finalize.Insert(attempt, "ResolveAuthScheme", middleware.Before); err != nil { + return err + } + if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { + return err + } + return nil +} + +// resolves dual-stack endpoint configuration +func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseDualStackEndpoint = value + } + return nil +} + +// resolves FIPS endpoint configuration +func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { + if len(cfg.ConfigSources) == 0 { + return nil + } + value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) + if err != nil { + return err + } + if found { + o.EndpointOptions.UseFIPSEndpoint = value + } + return nil +} + +func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { + if mode == aws.AccountIDEndpointModeDisabled { + return nil + } + + if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { + return aws.String(ca.Credentials.AccountID) + } + + return nil +} + +func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { + mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} + if err := stack.Build.Add(&mw, middleware.After); err != nil { + return err + } + return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) +} +func initializeTimeOffsetResolver(c *Client) { + c.timeOffset = new(atomic.Int64) +} + +func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + switch options.Retryer.(type) { + case *retry.Standard: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) + case *retry.AdaptiveMode: + ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) + } + return nil +} + +type setCredentialSourceMiddleware struct { + ua *awsmiddleware.RequestUserAgent + options Options +} + +func (m setCredentialSourceMiddleware) ID() string { return "SetCredentialSourceMiddleware" } + +func (m setCredentialSourceMiddleware) HandleBuild(ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler) ( + out middleware.BuildOutput, metadata middleware.Metadata, err error, +) { + asProviderSource, ok := m.options.Credentials.(aws.CredentialProviderSource) + if !ok { + return next.HandleBuild(ctx, in) + } + providerSources := asProviderSource.ProviderSources() + for _, source := range providerSources { + m.ua.AddCredentialsSource(source) + } + return next.HandleBuild(ctx, in) +} + +func addCredentialSource(stack *middleware.Stack, options Options) error { + ua, err := getOrAddRequestUserAgent(stack) + if err != nil { + return err + } + + mw := setCredentialSourceMiddleware{ua: ua, options: options} + return stack.Build.Insert(&mw, "UserAgent", middleware.Before) +} + +func resolveTracerProvider(options *Options) { + if options.TracerProvider == nil { + options.TracerProvider = &tracing.NopTracerProvider{} + } +} + +func resolveMeterProvider(options *Options) { + if options.MeterProvider == nil { + options.MeterProvider = metrics.NopMeterProvider{} + } +} + +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + +func addRecursionDetection(stack *middleware.Stack) error { + return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) +} + +func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) + +} + +func addResponseErrorMiddleware(stack *middleware.Stack) error { + return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) + +} + +func addRequestResponseLogging(stack *middleware.Stack, o Options) error { + return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ + LogRequest: o.ClientLogMode.IsRequest(), + LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), + LogResponse: o.ClientLogMode.IsResponse(), + LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), + }, middleware.After) +} + +type disableHTTPSMiddleware struct { + DisableHTTPS bool +} + +func (*disableHTTPSMiddleware) ID() string { + return "disableHTTPS" +} + +func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { + req.URL.Scheme = "http" + } + + return next.HandleFinalize(ctx, in) +} + +func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { + return stack.Finalize.Insert(&disableHTTPSMiddleware{ + DisableHTTPS: o.EndpointOptions.DisableHTTPS, + }, "ResolveEndpointV2", middleware.After) +} + +type spanInitializeStart struct { +} + +func (*spanInitializeStart) ID() string { + return "spanInitializeStart" +} + +func (m *spanInitializeStart) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "Initialize") + + return next.HandleInitialize(ctx, in) +} + +type spanInitializeEnd struct { +} + +func (*spanInitializeEnd) ID() string { + return "spanInitializeEnd" +} + +func (m *spanInitializeEnd) HandleInitialize( + ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler, +) ( + middleware.InitializeOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleInitialize(ctx, in) +} + +type spanBuildRequestStart struct { +} + +func (*spanBuildRequestStart) ID() string { + return "spanBuildRequestStart" +} + +func (m *spanBuildRequestStart) HandleSerialize( + ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler, +) ( + middleware.SerializeOutput, middleware.Metadata, error, +) { + ctx, _ = tracing.StartSpan(ctx, "BuildRequest") + + return next.HandleSerialize(ctx, in) +} + +type spanBuildRequestEnd struct { +} + +func (*spanBuildRequestEnd) ID() string { + return "spanBuildRequestEnd" +} + +func (m *spanBuildRequestEnd) HandleBuild( + ctx context.Context, in middleware.BuildInput, next middleware.BuildHandler, +) ( + middleware.BuildOutput, middleware.Metadata, error, +) { + ctx, span := tracing.PopSpan(ctx) + span.End() + + return next.HandleBuild(ctx, in) +} + +func addSpanInitializeStart(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeStart{}, middleware.Before) +} + +func addSpanInitializeEnd(stack *middleware.Stack) error { + return stack.Initialize.Add(&spanInitializeEnd{}, middleware.After) +} + +func addSpanBuildRequestStart(stack *middleware.Stack) error { + return stack.Serialize.Add(&spanBuildRequestStart{}, middleware.Before) +} + +func addSpanBuildRequestEnd(stack *middleware.Stack) error { + return stack.Build.Add(&spanBuildRequestEnd{}, middleware.After) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateAccessPoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateAccessPoint.go new file mode 100644 index 0000000000..3f7209cccb --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateAccessPoint.go @@ -0,0 +1,283 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an EFS access point. An access point is an application-specific view +// into an EFS file system that applies an operating system user and group, and a +// file system path, to any file system request made through the access point. The +// operating system user and group override any identity information provided by +// the NFS client. The file system path is exposed as the access point's root +// directory. Applications using the access point can only access data in the +// application's own directory and any subdirectories. A file system can have a +// maximum of 10,000 access points unless you request an increase. To learn more, +// see [Mounting a file system using EFS access points]. +// +// If multiple requests to create access points on the same file system are sent +// in quick succession, and the file system is near the limit of access points, you +// may experience a throttling response for these requests. This is to ensure that +// the file system does not exceed the stated access point limit. +// +// This operation requires permissions for the elasticfilesystem:CreateAccessPoint +// action. +// +// Access points can be tagged on creation. If tags are specified in the creation +// action, IAM performs additional authorization on the +// elasticfilesystem:TagResource action to verify if users have permissions to +// create tags. Therefore, you must grant explicit permissions to use the +// elasticfilesystem:TagResource action. For more information, see [Granting permissions to tag resources during creation]. +// +// [Mounting a file system using EFS access points]: https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html +// [Granting permissions to tag resources during creation]: https://docs.aws.amazon.com/efs/latest/ug/using-tags-efs.html#supported-iam-actions-tagging.html +func (c *Client) CreateAccessPoint(ctx context.Context, params *CreateAccessPointInput, optFns ...func(*Options)) (*CreateAccessPointOutput, error) { + if params == nil { + params = &CreateAccessPointInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateAccessPoint", params, optFns, c.addOperationCreateAccessPointMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateAccessPointOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateAccessPointInput struct { + + // A string of up to 64 ASCII characters that Amazon EFS uses to ensure idempotent + // creation. + // + // This member is required. + ClientToken *string + + // The ID of the EFS file system that the access point provides access to. + // + // This member is required. + FileSystemId *string + + // The operating system user and group applied to all file system requests made + // using the access point. + PosixUser *types.PosixUser + + // Specifies the directory on the EFS file system that the access point exposes as + // the root directory of your file system to NFS clients using the access point. + // The clients using the access point can only access the root directory and below. + // If the RootDirectory > Path specified does not exist, Amazon EFS creates it and + // applies the CreationInfo settings when a client connects to an access point. + // When specifying a RootDirectory , you must provide the Path , and the + // CreationInfo . + // + // Amazon EFS creates a root directory only if you have provided the CreationInfo: + // OwnUid, OwnGID, and permissions for the directory. If you do not provide this + // information, Amazon EFS does not create the root directory. If the root + // directory does not exist, attempts to mount using the access point will fail. + RootDirectory *types.RootDirectory + + // Creates tags associated with the access point. Each tag is a key-value pair, + // each key must be unique. For more information, see [Tagging Amazon Web Services resources]in the Amazon Web Services + // General Reference Guide. + // + // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags []types.Tag + + noSmithyDocumentSerde +} + +// Provides a description of an EFS file system access point. +type CreateAccessPointOutput struct { + + // The unique Amazon Resource Name (ARN) associated with the access point. + AccessPointArn *string + + // The ID of the access point, assigned by Amazon EFS. + AccessPointId *string + + // The opaque string specified in the request to ensure idempotent creation. + ClientToken *string + + // The ID of the EFS file system that the access point applies to. + FileSystemId *string + + // Identifies the lifecycle phase of the access point. + LifeCycleState types.LifeCycleState + + // The name of the access point. This is the value of the Name tag. + Name *string + + // Identifies the Amazon Web Services account that owns the access point resource. + OwnerId *string + + // The full POSIX identity, including the user ID, group ID, and secondary group + // IDs on the access point that is used for all file operations by NFS clients + // using the access point. + PosixUser *types.PosixUser + + // The directory on the EFS file system that the access point exposes as the root + // directory to NFS clients using the access point. + RootDirectory *types.RootDirectory + + // The tags associated with the access point, presented as an array of Tag objects. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateAccessPointMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAccessPoint{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAccessPoint{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAccessPoint"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateAccessPointMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateAccessPointValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAccessPoint(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateAccessPoint struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateAccessPoint) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateAccessPoint) 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.(*CreateAccessPointInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAccessPointInput ") + } + + 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_opCreateAccessPointMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAccessPoint{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateAccessPoint(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateAccessPoint", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateFileSystem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateFileSystem.go new file mode 100644 index 0000000000..507f0f17b2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateFileSystem.go @@ -0,0 +1,453 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a new, empty file system. The operation requires a creation token in +// the request that Amazon EFS uses to ensure idempotent creation (calling the +// operation with same creation token has no effect). If a file system does not +// currently exist that is owned by the caller's Amazon Web Services account with +// the specified creation token, this operation does the following: +// +// - Creates a new, empty file system. The file system will have an Amazon EFS +// assigned ID, and an initial lifecycle state creating . +// +// - Returns with the description of the created file system. +// +// Otherwise, this operation returns a FileSystemAlreadyExists error with the ID +// of the existing file system. +// +// For basic use cases, you can use a randomly generated UUID for the creation +// token. +// +// The idempotent operation allows you to retry a CreateFileSystem call without +// risk of creating an extra file system. This can happen when an initial call +// fails in a way that leaves it uncertain whether or not a file system was +// actually created. An example might be that a transport level timeout occurred or +// your connection was reset. As long as you use the same creation token, if the +// initial call had succeeded in creating a file system, the client can learn of +// its existence from the FileSystemAlreadyExists error. +// +// For more information, see [Creating a file system] in the Amazon EFS User Guide. +// +// The CreateFileSystem call returns while the file system's lifecycle state is +// still creating . You can check the file system creation status by calling the DescribeFileSystems +// operation, which among other things returns the file system state. +// +// This operation accepts an optional PerformanceMode parameter that you choose +// for your file system. We recommend generalPurpose PerformanceMode for all file +// systems. The maxIO mode is a previous generation performance type that is +// designed for highly parallelized workloads that can tolerate higher latencies +// than the generalPurpose mode. MaxIO mode is not supported for One Zone file +// systems or file systems that use Elastic throughput. +// +// The PerformanceMode can't be changed after the file system has been created. +// For more information, see [Amazon EFS performance modes]. +// +// You can set the throughput mode for the file system using the ThroughputMode +// parameter. +// +// After the file system is fully created, Amazon EFS sets its lifecycle state to +// available , at which point you can create one or more mount targets for the file +// system in your VPC. For more information, see CreateMountTarget. You mount your Amazon EFS file +// system on an EC2 instances in your VPC by using the mount target. For more +// information, see [Amazon EFS: How it Works]. +// +// This operation requires permissions for the elasticfilesystem:CreateFileSystem +// action. +// +// File systems can be tagged on creation. If tags are specified in the creation +// action, IAM performs additional authorization on the +// elasticfilesystem:TagResource action to verify if users have permissions to +// create tags. Therefore, you must grant explicit permissions to use the +// elasticfilesystem:TagResource action. For more information, see [Granting permissions to tag resources during creation]. +// +// [Creating a file system]: https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html#creating-using-create-fs-part1 +// [Amazon EFS: How it Works]: https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html +// [Amazon EFS performance modes]: https://docs.aws.amazon.com/efs/latest/ug/performance.html#performancemodes.html +// [Granting permissions to tag resources during creation]: https://docs.aws.amazon.com/efs/latest/ug/using-tags-efs.html#supported-iam-actions-tagging.html +func (c *Client) CreateFileSystem(ctx context.Context, params *CreateFileSystemInput, optFns ...func(*Options)) (*CreateFileSystemOutput, error) { + if params == nil { + params = &CreateFileSystemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateFileSystem", params, optFns, c.addOperationCreateFileSystemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateFileSystemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateFileSystemInput struct { + + // A string of up to 64 ASCII characters. Amazon EFS uses this to ensure + // idempotent creation. + // + // This member is required. + CreationToken *string + + // For One Zone file systems, specify the Amazon Web Services Availability Zone in + // which to create the file system. Use the format us-east-1a to specify the + // Availability Zone. For more information about One Zone file systems, see [EFS file system types]in the + // Amazon EFS User Guide. + // + // One Zone file systems are not available in all Availability Zones in Amazon Web + // Services Regions where Amazon EFS is available. + // + // [EFS file system types]: https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html#file-system-type + AvailabilityZoneName *string + + // Specifies whether automatic backups are enabled on the file system that you are + // creating. Set the value to true to enable automatic backups. If you are + // creating a One Zone file system, automatic backups are enabled by default. For + // more information, see [Automatic backups]in the Amazon EFS User Guide. + // + // Default is false . However, if you specify an AvailabilityZoneName , the default + // is true . + // + // Backup is not available in all Amazon Web Services Regions where Amazon EFS is + // available. + // + // [Automatic backups]: https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups + Backup *bool + + // A Boolean value that, if true, creates an encrypted file system. When creating + // an encrypted file system, you have the option of specifying an existing Key + // Management Service key (KMS key). If you don't specify a KMS key, then the + // default KMS key for Amazon EFS, /aws/elasticfilesystem , is used to protect the + // encrypted file system. + Encrypted *bool + + // The ID of the KMS key that you want to use to protect the encrypted file + // system. This parameter is required only if you want to use a non-default KMS + // key. If this parameter is not specified, the default KMS key for Amazon EFS is + // used. You can specify a KMS key ID using the following formats: + // + // - Key ID - A unique identifier of the key, for example + // 1234abcd-12ab-34cd-56ef-1234567890ab . + // + // - ARN - An Amazon Resource Name (ARN) for the key, for example + // arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab . + // + // - Key alias - A previously created display name for a key, for example + // alias/projectKey1 . + // + // - Key alias ARN - An ARN for a key alias, for example + // arn:aws:kms:us-west-2:444455556666:alias/projectKey1 . + // + // If you use KmsKeyId , you must set the CreateFileSystemRequest$Encrypted parameter to true. + // + // EFS accepts only symmetric KMS keys. You cannot use asymmetric KMS keys with + // Amazon EFS file systems. + KmsKeyId *string + + // The performance mode of the file system. We recommend generalPurpose + // performance mode for all file systems. File systems using the maxIO performance + // mode can scale to higher levels of aggregate throughput and operations per + // second with a tradeoff of slightly higher latencies for most file operations. + // The performance mode can't be changed after the file system has been created. + // The maxIO mode is not supported on One Zone file systems. + // + // Due to the higher per-operation latencies with Max I/O, we recommend using + // General Purpose performance mode for all file systems. + // + // Default is generalPurpose . + PerformanceMode types.PerformanceMode + + // The throughput, measured in mebibytes per second (MiBps), that you want to + // provision for a file system that you're creating. Required if ThroughputMode is + // set to provisioned . Valid values are 1-3414 MiBps, with the upper limit + // depending on Region. To increase this limit, contact Amazon Web ServicesSupport. + // For more information, see [Amazon EFS quotas that you can increase]in the Amazon EFS User Guide. + // + // [Amazon EFS quotas that you can increase]: https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits + ProvisionedThroughputInMibps *float64 + + // Use to create one or more tags associated with the file system. Each tag is a + // user-defined key-value pair. Name your file system on creation by including a + // "Key":"Name","Value":"{value}" key-value pair. Each key must be unique. For more + // information, see [Tagging Amazon Web Services resources]in the Amazon Web Services General Reference Guide. + // + // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html + Tags []types.Tag + + // Specifies the throughput mode for the file system. The mode can be bursting , + // provisioned , or elastic . If you set ThroughputMode to provisioned , you must + // also set a value for ProvisionedThroughputInMibps . After you create the file + // system, you can decrease your file system's Provisioned throughput or change + // between the throughput modes, with certain time restrictions. For more + // information, see [Specifying throughput with provisioned mode]in the Amazon EFS User Guide. + // + // Default is bursting . + // + // [Specifying throughput with provisioned mode]: https://docs.aws.amazon.com/efs/latest/ug/performance.html#provisioned-throughput + ThroughputMode types.ThroughputMode + + noSmithyDocumentSerde +} + +// A description of the file system. +type CreateFileSystemOutput struct { + + // The time that the file system was created, in seconds (since + // 1970-01-01T00:00:00Z). + // + // This member is required. + CreationTime *time.Time + + // The opaque string specified in the request. + // + // This member is required. + CreationToken *string + + // The ID of the file system, assigned by Amazon EFS. + // + // This member is required. + FileSystemId *string + + // The lifecycle phase of the file system. + // + // This member is required. + LifeCycleState types.LifeCycleState + + // The current number of mount targets that the file system has. For more + // information, see CreateMountTarget. + // + // This member is required. + NumberOfMountTargets int32 + + // The Amazon Web Services account that created the file system. + // + // This member is required. + OwnerId *string + + // The performance mode of the file system. + // + // This member is required. + PerformanceMode types.PerformanceMode + + // The latest known metered size (in bytes) of data stored in the file system, in + // its Value field, and the time at which that size was determined in its Timestamp + // field. The Timestamp value is the integer number of seconds since + // 1970-01-01T00:00:00Z. The SizeInBytes value doesn't represent the size of a + // consistent snapshot of the file system, but it is eventually consistent when + // there are no writes to the file system. That is, SizeInBytes represents actual + // size only if the file system is not modified for a period longer than a couple + // of hours. Otherwise, the value is not the exact size that the file system was at + // any point in time. + // + // This member is required. + SizeInBytes *types.FileSystemSize + + // The tags associated with the file system, presented as an array of Tag objects. + // + // This member is required. + Tags []types.Tag + + // The unique and consistent identifier of the Availability Zone in which the file + // system is located, and is valid only for One Zone file systems. For example, + // use1-az1 is an Availability Zone ID for the us-east-1 Amazon Web Services + // Region, and it has the same location in every Amazon Web Services account. + AvailabilityZoneId *string + + // Describes the Amazon Web Services Availability Zone in which the file system is + // located, and is valid only for One Zone file systems. For more information, see [Using EFS storage classes] + // in the Amazon EFS User Guide. + // + // [Using EFS storage classes]: https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html + AvailabilityZoneName *string + + // A Boolean value that, if true, indicates that the file system is encrypted. + Encrypted *bool + + // The Amazon Resource Name (ARN) for the EFS file system, in the format + // arn:aws:elasticfilesystem:region:account-id:file-system/file-system-id . + // Example with sample data: + // arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567 + FileSystemArn *string + + // Describes the protection on the file system. + FileSystemProtection *types.FileSystemProtectionDescription + + // The ID of an KMS key used to protect the encrypted file system. + KmsKeyId *string + + // You can add tags to a file system, including a Name tag. For more information, + // see CreateFileSystem. If the file system has a Name tag, Amazon EFS returns the value in this + // field. + Name *string + + // The amount of provisioned throughput, measured in MiBps, for the file system. + // Valid for file systems using ThroughputMode set to provisioned . + ProvisionedThroughputInMibps *float64 + + // Displays the file system's throughput mode. For more information, see [Throughput modes] in the + // Amazon EFS User Guide. + // + // [Throughput modes]: https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes + ThroughputMode types.ThroughputMode + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateFileSystemMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateFileSystem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateFileSystem{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateFileSystem"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opCreateFileSystemMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateFileSystemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateFileSystem(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpCreateFileSystem struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpCreateFileSystem) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpCreateFileSystem) 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.(*CreateFileSystemInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateFileSystemInput ") + } + + if input.CreationToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.CreationToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opCreateFileSystemMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpCreateFileSystem{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opCreateFileSystem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateFileSystem", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateMountTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateMountTarget.go new file mode 100644 index 0000000000..f9d9f0acfe --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateMountTarget.go @@ -0,0 +1,347 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a mount target for a file system. You can then mount the file system on +// EC2 instances by using the mount target. +// +// You can create one mount target in each Availability Zone in your VPC. All EC2 +// instances in a VPC within a given Availability Zone share a single mount target +// for a given file system. If you have multiple subnets in an Availability Zone, +// you create a mount target in one of the subnets. EC2 instances do not need to be +// in the same subnet as the mount target in order to access their file system. +// +// You can create only one mount target for a One Zone file system. You must +// create that mount target in the same Availability Zone in which the file system +// is located. Use the AvailabilityZoneName and AvailabiltyZoneId properties in +// the DescribeFileSystemsresponse object to get this information. Use the subnetId associated with +// the file system's Availability Zone when creating the mount target. +// +// For more information, see [Amazon EFS: How it Works]. +// +// To create a mount target for a file system, the file system's lifecycle state +// must be available . For more information, see DescribeFileSystems. +// +// In the request, provide the following: +// +// - The file system ID for which you are creating the mount target. +// +// - A subnet ID, which determines the following: +// +// - The VPC in which Amazon EFS creates the mount target +// +// - The Availability Zone in which Amazon EFS creates the mount target +// +// - The IP address range from which Amazon EFS selects the IP address of the +// mount target (if you don't specify an IP address in the request) +// +// After creating the mount target, Amazon EFS returns a response that includes, a +// MountTargetId and an IpAddress . You use this IP address when mounting the file +// system in an EC2 instance. You can also use the mount target's DNS name when +// mounting the file system. The EC2 instance on which you mount the file system by +// using the mount target can resolve the mount target's DNS name to its IP +// address. For more information, see [How it Works: Implementation Overview]. +// +// Note that you can create mount targets for a file system in only one VPC, and +// there can be only one mount target per Availability Zone. That is, if the file +// system already has one or more mount targets created for it, the subnet +// specified in the request to add another mount target must meet the following +// requirements: +// +// - Must belong to the same VPC as the subnets of the existing mount targets +// +// - Must not be in the same Availability Zone as any of the subnets of the +// existing mount targets +// +// If the request satisfies the requirements, Amazon EFS does the following: +// +// - Creates a new mount target in the specified subnet. +// +// - Also creates a new network interface in the subnet as follows: +// +// - If the request provides an IpAddress , Amazon EFS assigns that IP address to +// the network interface. Otherwise, Amazon EFS assigns a free address in the +// subnet (in the same way that the Amazon EC2 CreateNetworkInterface call does +// when a request does not specify a primary private IP address). +// +// - If the request provides SecurityGroups , this network interface is +// associated with those security groups. Otherwise, it belongs to the default +// security group for the subnet's VPC. +// +// - Assigns the description Mount target fsmt-id for file system fs-id where +// fsmt-id is the mount target ID, and fs-id is the FileSystemId . +// +// - Sets the requesterManaged property of the network interface to true , and +// the requesterId value to EFS . +// +// Each Amazon EFS mount target has one corresponding requester-managed EC2 +// +// network interface. After the network interface is created, Amazon EFS sets the +// NetworkInterfaceId field in the mount target's description to the network +// interface ID, and the IpAddress field to its address. If network interface +// creation fails, the entire CreateMountTarget operation fails. +// +// The CreateMountTarget call returns only after creating the network interface, +// but while the mount target state is still creating , you can check the mount +// target creation status by calling the DescribeMountTargetsoperation, which among other things +// returns the mount target state. +// +// We recommend that you create a mount target in each of the Availability Zones. +// There are cost considerations for using a file system in an Availability Zone +// through a mount target created in another Availability Zone. For more +// information, see [Amazon EFS pricing]. In addition, by always using a mount target local to the +// instance's Availability Zone, you eliminate a partial failure scenario. If the +// Availability Zone in which your mount target is created goes down, then you +// can't access your file system through that mount target. +// +// This operation requires permissions for the following action on the file system: +// +// - elasticfilesystem:CreateMountTarget +// +// This operation also requires permissions for the following Amazon EC2 actions: +// +// - ec2:DescribeSubnets +// +// - ec2:DescribeNetworkInterfaces +// +// - ec2:CreateNetworkInterface +// +// [Amazon EFS: How it Works]: https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html +// [Amazon EFS pricing]: http://aws.amazon.com/efs/pricing/ +// [How it Works: Implementation Overview]: https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation +func (c *Client) CreateMountTarget(ctx context.Context, params *CreateMountTargetInput, optFns ...func(*Options)) (*CreateMountTargetOutput, error) { + if params == nil { + params = &CreateMountTargetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateMountTarget", params, optFns, c.addOperationCreateMountTargetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateMountTargetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateMountTargetInput struct { + + // The ID of the file system for which to create the mount target. + // + // This member is required. + FileSystemId *string + + // The ID of the subnet to add the mount target in. For One Zone file systems, use + // the subnet that is associated with the file system's Availability Zone. + // + // This member is required. + SubnetId *string + + // If the IP address type for the mount target is IPv4, then specify the IPv4 + // address within the address range of the specified subnet. + IpAddress *string + + // Specify the type of IP address of the mount target you are creating. Options + // are IPv4, dual stack, or IPv6. If you don’t specify an IpAddressType, then IPv4 + // is used. + // + // - IPV4_ONLY – Create mount target with IPv4 only subnet or dual-stack subnet. + // + // - DUAL_STACK – Create mount target with dual-stack subnet. + // + // - IPV6_ONLY – Create mount target with IPv6 only subnet. + // + // Creating IPv6 mount target only ENI in dual-stack subnet is not supported. + IpAddressType types.IpAddressType + + // If the IP address type for the mount target is IPv6, then specify the IPv6 + // address within the address range of the specified subnet. + Ipv6Address *string + + // VPC security group IDs, of the form sg-xxxxxxxx . These must be for the same VPC + // as the subnet specified. The maximum number of security groups depends on + // account quota. For more information, see [Amazon VPC Quotas]in the Amazon VPC User Guide (see the + // Security Groups table). + // + // [Amazon VPC Quotas]: https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html + SecurityGroups []string + + noSmithyDocumentSerde +} + +// Provides a description of a mount target. +type CreateMountTargetOutput struct { + + // The ID of the file system for which the mount target is intended. + // + // This member is required. + FileSystemId *string + + // Lifecycle state of the mount target. + // + // This member is required. + LifeCycleState types.LifeCycleState + + // System-assigned mount target ID. + // + // This member is required. + MountTargetId *string + + // The ID of the mount target's subnet. + // + // This member is required. + SubnetId *string + + // The unique and consistent identifier of the Availability Zone that the mount + // target resides in. For example, use1-az1 is an AZ ID for the us-east-1 Region + // and it has the same location in every Amazon Web Services account. + AvailabilityZoneId *string + + // The name of the Availability Zone in which the mount target is located. + // Availability Zones are independently mapped to names for each Amazon Web + // Services account. For example, the Availability Zone us-east-1a for your Amazon + // Web Services account might not be the same location as us-east-1a for another + // Amazon Web Services account. + AvailabilityZoneName *string + + // Address at which the file system can be mounted by using the mount target. + IpAddress *string + + // The IPv6 address for the mount target. + Ipv6Address *string + + // The ID of the network interface that Amazon EFS created when it created the + // mount target. + NetworkInterfaceId *string + + // Amazon Web Services account ID that owns the resource. + OwnerId *string + + // The virtual private cloud (VPC) ID that the mount target is configured in. + VpcId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateMountTargetMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateMountTarget{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateMountTarget{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateMountTarget"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateMountTargetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMountTarget(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateMountTarget(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateMountTarget", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateReplicationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateReplicationConfiguration.go new file mode 100644 index 0000000000..ff7f6432d1 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateReplicationConfiguration.go @@ -0,0 +1,226 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Creates a replication configuration to either a new or existing EFS file system. +// For more information, see [Amazon EFS replication]in the Amazon EFS User Guide. The replication +// configuration specifies the following: +// +// - Source file system – The EFS file system that you want to replicate. +// +// - Destination file system – The destination file system to which the source +// file system is replicated. There can only be one destination file system in a +// replication configuration. +// +// A file system can be part of only one replication configuration. +// +// The destination parameters for the replication configuration depend on whether +// +// you are replicating to a new file system or to an existing file system, and if +// you are replicating across Amazon Web Services accounts. See DestinationToCreatefor more +// information. +// +// This operation requires permissions for the +// elasticfilesystem:CreateReplicationConfiguration action. Additionally, other +// permissions are required depending on how you are replicating file systems. For +// more information, see [Required permissions for replication]in the Amazon EFS User Guide. +// +// [Required permissions for replication]: https://docs.aws.amazon.com/efs/latest/ug/efs-replication.html#efs-replication-permissions +// [Amazon EFS replication]: https://docs.aws.amazon.com/efs/latest/ug/efs-replication.html +func (c *Client) CreateReplicationConfiguration(ctx context.Context, params *CreateReplicationConfigurationInput, optFns ...func(*Options)) (*CreateReplicationConfigurationOutput, error) { + if params == nil { + params = &CreateReplicationConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateReplicationConfiguration", params, optFns, c.addOperationCreateReplicationConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateReplicationConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateReplicationConfigurationInput struct { + + // An array of destination configuration objects. Only one destination + // configuration object is supported. + // + // This member is required. + Destinations []types.DestinationToCreate + + // Specifies the Amazon EFS file system that you want to replicate. This file + // system cannot already be a source or destination file system in another + // replication configuration. + // + // This member is required. + SourceFileSystemId *string + + noSmithyDocumentSerde +} + +// Describes the replication configuration for a specific file system. +type CreateReplicationConfigurationOutput struct { + + // Describes when the replication configuration was created. + // + // This member is required. + CreationTime *time.Time + + // An array of destination objects. Only one destination object is supported. + // + // This member is required. + Destinations []types.Destination + + // The Amazon Resource Name (ARN) of the original source EFS file system in the + // replication configuration. + // + // This member is required. + OriginalSourceFileSystemArn *string + + // The Amazon Resource Name (ARN) of the current source file system in the + // replication configuration. + // + // This member is required. + SourceFileSystemArn *string + + // The ID of the source Amazon EFS file system that is being replicated. + // + // This member is required. + SourceFileSystemId *string + + // The Amazon Web Services Region in which the source EFS file system is located. + // + // This member is required. + SourceFileSystemRegion *string + + // ID of the Amazon Web Services account in which the source file system resides. + SourceFileSystemOwnerId *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateReplicationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateReplicationConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateReplicationConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateReplicationConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateReplicationConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateReplicationConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateReplicationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateReplicationConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateTags.go new file mode 100644 index 0000000000..308d4be8cc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateTags.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// DEPRECATED - CreateTags is deprecated and not maintained. To create tags for +// EFS resources, use the API action. +// +// Creates or overwrites tags associated with a file system. Each tag is a +// key-value pair. If a tag key specified in the request already exists on the file +// system, this operation overwrites its value with the value provided in the +// request. If you add the Name tag to your file system, Amazon EFS returns it in +// the response to the DescribeFileSystemsoperation. +// +// This operation requires permission for the elasticfilesystem:CreateTags action. +// +// Deprecated: Use TagResource. +func (c *Client) CreateTags(ctx context.Context, params *CreateTagsInput, optFns ...func(*Options)) (*CreateTagsOutput, error) { + if params == nil { + params = &CreateTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateTags", params, optFns, c.addOperationCreateTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateTagsInput struct { + + // The ID of the file system whose tags you want to modify (String). This + // operation modifies the tags only, not the file system. + // + // This member is required. + FileSystemId *string + + // An array of Tag objects to add. Each Tag object is a key-value pair. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateTagsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateTags"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpCreateTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateTags(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opCreateTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteAccessPoint.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteAccessPoint.go new file mode 100644 index 0000000000..3190415320 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteAccessPoint.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified access point. After deletion is complete, new clients can +// no longer connect to the access points. Clients connected to the access point at +// the time of deletion will continue to function until they terminate their +// connection. +// +// This operation requires permissions for the elasticfilesystem:DeleteAccessPoint +// action. +func (c *Client) DeleteAccessPoint(ctx context.Context, params *DeleteAccessPointInput, optFns ...func(*Options)) (*DeleteAccessPointOutput, error) { + if params == nil { + params = &DeleteAccessPointInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteAccessPoint", params, optFns, c.addOperationDeleteAccessPointMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteAccessPointOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteAccessPointInput struct { + + // The ID of the access point that you want to delete. + // + // This member is required. + AccessPointId *string + + noSmithyDocumentSerde +} + +type DeleteAccessPointOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteAccessPointMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAccessPoint{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAccessPoint{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAccessPoint"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteAccessPointValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAccessPoint(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteAccessPoint(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteAccessPoint", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteFileSystem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteFileSystem.go new file mode 100644 index 0000000000..211078febc --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteFileSystem.go @@ -0,0 +1,176 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a file system, permanently severing access to its contents. Upon +// return, the file system no longer exists and you can't access any contents of +// the deleted file system. +// +// You need to manually delete mount targets attached to a file system before you +// can delete an EFS file system. This step is performed for you when you use the +// Amazon Web Services console to delete a file system. +// +// You cannot delete a file system that is part of an EFS replication +// configuration. You need to delete the replication configuration first. +// +// You can't delete a file system that is in use. That is, if the file system has +// any mount targets, you must first delete them. For more information, see DescribeMountTargetsand DeleteMountTarget. +// +// The DeleteFileSystem call returns while the file system state is still deleting +// . You can check the file system deletion status by calling the DescribeFileSystemsoperation, which +// returns a list of file systems in your account. If you pass file system ID or +// creation token for the deleted file system, the DescribeFileSystemsreturns a 404 FileSystemNotFound +// error. +// +// This operation requires permissions for the elasticfilesystem:DeleteFileSystem +// action. +func (c *Client) DeleteFileSystem(ctx context.Context, params *DeleteFileSystemInput, optFns ...func(*Options)) (*DeleteFileSystemOutput, error) { + if params == nil { + params = &DeleteFileSystemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFileSystem", params, optFns, c.addOperationDeleteFileSystemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFileSystemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFileSystemInput struct { + + // The ID of the file system you want to delete. + // + // This member is required. + FileSystemId *string + + noSmithyDocumentSerde +} + +type DeleteFileSystemOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFileSystemMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFileSystem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFileSystem{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFileSystem"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteFileSystemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFileSystem(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFileSystem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFileSystem", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteFileSystemPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteFileSystemPolicy.go new file mode 100644 index 0000000000..ae0741ecb8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteFileSystemPolicy.go @@ -0,0 +1,162 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the FileSystemPolicy for the specified file system. The default +// FileSystemPolicy goes into effect once the existing policy is deleted. For more +// information about the default file system policy, see [Using Resource-based Policies with EFS]. +// +// This operation requires permissions for the +// elasticfilesystem:DeleteFileSystemPolicy action. +// +// [Using Resource-based Policies with EFS]: https://docs.aws.amazon.com/efs/latest/ug/res-based-policies-efs.html +func (c *Client) DeleteFileSystemPolicy(ctx context.Context, params *DeleteFileSystemPolicyInput, optFns ...func(*Options)) (*DeleteFileSystemPolicyOutput, error) { + if params == nil { + params = &DeleteFileSystemPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteFileSystemPolicy", params, optFns, c.addOperationDeleteFileSystemPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteFileSystemPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteFileSystemPolicyInput struct { + + // Specifies the EFS file system for which to delete the FileSystemPolicy . + // + // This member is required. + FileSystemId *string + + noSmithyDocumentSerde +} + +type DeleteFileSystemPolicyOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteFileSystemPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteFileSystemPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteFileSystemPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteFileSystemPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteFileSystemPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteFileSystemPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteFileSystemPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteFileSystemPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteMountTarget.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteMountTarget.go new file mode 100644 index 0000000000..b5e66abae5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteMountTarget.go @@ -0,0 +1,177 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes the specified mount target. +// +// This operation forcibly breaks any mounts of the file system by using the mount +// target that is being deleted, which might disrupt instances or applications +// using those mounts. To avoid applications getting cut off abruptly, you might +// consider unmounting any mounts of the mount target, if feasible. The operation +// also deletes the associated network interface. Uncommitted writes might be lost, +// but breaking a mount target using this operation does not corrupt the file +// system itself. The file system you created remains. You can mount an EC2 +// instance in your VPC by using another mount target. +// +// This operation requires permissions for the following action on the file system: +// +// - elasticfilesystem:DeleteMountTarget +// +// The DeleteMountTarget call returns while the mount target state is still +// deleting . You can check the mount target deletion by calling the DescribeMountTargets operation, +// which returns a list of mount target descriptions for the given file system. +// +// The operation also requires permissions for the following Amazon EC2 action on +// the mount target's network interface: +// +// - ec2:DeleteNetworkInterface +func (c *Client) DeleteMountTarget(ctx context.Context, params *DeleteMountTargetInput, optFns ...func(*Options)) (*DeleteMountTargetOutput, error) { + if params == nil { + params = &DeleteMountTargetInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteMountTarget", params, optFns, c.addOperationDeleteMountTargetMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteMountTargetOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteMountTargetInput struct { + + // The ID of the mount target to delete (String). + // + // This member is required. + MountTargetId *string + + noSmithyDocumentSerde +} + +type DeleteMountTargetOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteMountTargetMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteMountTarget{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteMountTarget{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMountTarget"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteMountTargetValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMountTarget(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteMountTarget(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteMountTarget", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteReplicationConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteReplicationConfiguration.go new file mode 100644 index 0000000000..f508ebfd2e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteReplicationConfiguration.go @@ -0,0 +1,181 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a replication configuration. Deleting a replication configuration ends +// the replication process. After a replication configuration is deleted, the +// destination file system becomes Writeable and its replication overwrite +// protection is re-enabled. For more information, see [Delete a replication configuration]. +// +// This operation requires permissions for the +// elasticfilesystem:DeleteReplicationConfiguration action. +// +// [Delete a replication configuration]: https://docs.aws.amazon.com/efs/latest/ug/delete-replications.html +func (c *Client) DeleteReplicationConfiguration(ctx context.Context, params *DeleteReplicationConfigurationInput, optFns ...func(*Options)) (*DeleteReplicationConfigurationOutput, error) { + if params == nil { + params = &DeleteReplicationConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteReplicationConfiguration", params, optFns, c.addOperationDeleteReplicationConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteReplicationConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteReplicationConfigurationInput struct { + + // The ID of the source file system in the replication configuration. + // + // This member is required. + SourceFileSystemId *string + + // When replicating across Amazon Web Services accounts or across Amazon Web + // Services Regions, Amazon EFS deletes the replication configuration from both the + // source and destination account or Region ( ALL_CONFIGURATIONS ) by default. If + // there's a configuration or permissions issue that prevents Amazon EFS from + // deleting the replication configuration from both sides, you can use the + // LOCAL_CONFIGURATION_ONLY mode to delete the replication configuration from only + // the local side (the account or Region from which the delete is performed). + // + // Only use the LOCAL_CONFIGURATION_ONLY mode in the case that Amazon EFS is + // unable to delete the replication configuration in both the source and + // destination account or Region. Deleting the local configuration leaves the + // configuration in the other account or Region unrecoverable. + // + // Additionally, do not use this mode for same-account, same-region replication as + // doing so results in a BadRequest exception error. + DeletionMode types.DeletionMode + + noSmithyDocumentSerde +} + +type DeleteReplicationConfigurationOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteReplicationConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteReplicationConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteReplicationConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteReplicationConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteReplicationConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteReplicationConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteReplicationConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteReplicationConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteTags.go new file mode 100644 index 0000000000..3613c8ac84 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteTags.go @@ -0,0 +1,172 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// DEPRECATED - DeleteTags is deprecated and not maintained. To remove tags from +// EFS resources, use the API action. +// +// Deletes the specified tags from a file system. If the DeleteTags request +// includes a tag key that doesn't exist, Amazon EFS ignores it and doesn't cause +// an error. For more information about tags and related restrictions, see [Tag restrictions]in the +// Billing and Cost Management User Guide. +// +// This operation requires permissions for the elasticfilesystem:DeleteTags action. +// +// Deprecated: Use UntagResource. +// +// [Tag restrictions]: https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html +func (c *Client) DeleteTags(ctx context.Context, params *DeleteTagsInput, optFns ...func(*Options)) (*DeleteTagsOutput, error) { + if params == nil { + params = &DeleteTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteTags", params, optFns, c.addOperationDeleteTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteTagsInput struct { + + // The ID of the file system whose tags you want to delete (String). + // + // This member is required. + FileSystemId *string + + // A list of tag keys to delete. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type DeleteTagsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteTags"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDeleteTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteTags(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeAccessPoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeAccessPoints.go new file mode 100644 index 0000000000..b3ed9a4e7d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeAccessPoints.go @@ -0,0 +1,276 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the description of a specific Amazon EFS access point if the +// AccessPointId is provided. If you provide an EFS FileSystemId , it returns +// descriptions of all access points for that file system. You can provide either +// an AccessPointId or a FileSystemId in the request, but not both. +// +// This operation requires permissions for the +// elasticfilesystem:DescribeAccessPoints action. +func (c *Client) DescribeAccessPoints(ctx context.Context, params *DescribeAccessPointsInput, optFns ...func(*Options)) (*DescribeAccessPointsOutput, error) { + if params == nil { + params = &DescribeAccessPointsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAccessPoints", params, optFns, c.addOperationDescribeAccessPointsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAccessPointsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAccessPointsInput struct { + + // (Optional) Specifies an EFS access point to describe in the response; mutually + // exclusive with FileSystemId . + AccessPointId *string + + // (Optional) If you provide a FileSystemId , EFS returns all access points for + // that file system; mutually exclusive with AccessPointId . + FileSystemId *string + + // (Optional) When retrieving all access points for a file system, you can + // optionally specify the MaxItems parameter to limit the number of objects + // returned in a response. The default value is 100. + MaxResults *int32 + + // NextToken is present if the response is paginated. You can use NextMarker in + // the subsequent request to fetch the next page of access point descriptions. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeAccessPointsOutput struct { + + // An array of access point descriptions. + AccessPoints []types.AccessPointDescription + + // Present if there are more access points than returned in the response. You can + // use the NextMarker in the subsequent request to fetch the additional + // descriptions. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAccessPointsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAccessPoints{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAccessPoints{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAccessPoints"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccessPoints(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// DescribeAccessPointsPaginatorOptions is the paginator options for +// DescribeAccessPoints +type DescribeAccessPointsPaginatorOptions struct { + // (Optional) When retrieving all access points for a file system, you can + // optionally specify the MaxItems parameter to limit the number of objects + // returned in a response. The default 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 +} + +// DescribeAccessPointsPaginator is a paginator for DescribeAccessPoints +type DescribeAccessPointsPaginator struct { + options DescribeAccessPointsPaginatorOptions + client DescribeAccessPointsAPIClient + params *DescribeAccessPointsInput + nextToken *string + firstPage bool +} + +// NewDescribeAccessPointsPaginator returns a new DescribeAccessPointsPaginator +func NewDescribeAccessPointsPaginator(client DescribeAccessPointsAPIClient, params *DescribeAccessPointsInput, optFns ...func(*DescribeAccessPointsPaginatorOptions)) *DescribeAccessPointsPaginator { + if params == nil { + params = &DescribeAccessPointsInput{} + } + + options := DescribeAccessPointsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeAccessPointsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeAccessPointsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeAccessPoints page. +func (p *DescribeAccessPointsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeAccessPointsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeAccessPoints(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 +} + +// DescribeAccessPointsAPIClient is a client that implements the +// DescribeAccessPoints operation. +type DescribeAccessPointsAPIClient interface { + DescribeAccessPoints(context.Context, *DescribeAccessPointsInput, ...func(*Options)) (*DescribeAccessPointsOutput, error) +} + +var _ DescribeAccessPointsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeAccessPoints(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAccessPoints", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeAccountPreferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeAccountPreferences.go new file mode 100644 index 0000000000..cd6d8a70ce --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeAccountPreferences.go @@ -0,0 +1,170 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the account preferences settings for the Amazon Web Services account +// associated with the user making the request, in the current Amazon Web Services +// Region. +func (c *Client) DescribeAccountPreferences(ctx context.Context, params *DescribeAccountPreferencesInput, optFns ...func(*Options)) (*DescribeAccountPreferencesOutput, error) { + if params == nil { + params = &DescribeAccountPreferencesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeAccountPreferences", params, optFns, c.addOperationDescribeAccountPreferencesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeAccountPreferencesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeAccountPreferencesInput struct { + + // (Optional) When retrieving account preferences, you can optionally specify the + // MaxItems parameter to limit the number of objects returned in a response. The + // default value is 100. + MaxResults *int32 + + // (Optional) You can use NextToken in a subsequent request to fetch the next page + // of Amazon Web Services account preferences if the response payload was + // paginated. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeAccountPreferencesOutput struct { + + // Present if there are more records than returned in the response. You can use + // the NextToken in the subsequent request to fetch the additional descriptions. + NextToken *string + + // Describes the resource ID preference setting for the Amazon Web Services + // account associated with the user making the request, in the current Amazon Web + // Services Region. + ResourceIdPreference *types.ResourceIdPreference + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeAccountPreferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAccountPreferences{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAccountPreferences{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAccountPreferences"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAccountPreferences(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeAccountPreferences(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeAccountPreferences", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeBackupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeBackupPolicy.go new file mode 100644 index 0000000000..238442fde8 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeBackupPolicy.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the backup policy for the specified EFS file system. +func (c *Client) DescribeBackupPolicy(ctx context.Context, params *DescribeBackupPolicyInput, optFns ...func(*Options)) (*DescribeBackupPolicyOutput, error) { + if params == nil { + params = &DescribeBackupPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeBackupPolicy", params, optFns, c.addOperationDescribeBackupPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeBackupPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeBackupPolicyInput struct { + + // Specifies which EFS file system for which to retrieve the BackupPolicy . + // + // This member is required. + FileSystemId *string + + noSmithyDocumentSerde +} + +type DescribeBackupPolicyOutput struct { + + // Describes the file system's backup policy, indicating whether automatic backups + // are turned on or off. + BackupPolicy *types.BackupPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeBackupPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeBackupPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeBackupPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeBackupPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeBackupPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBackupPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeBackupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeBackupPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeFileSystemPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeFileSystemPolicy.go new file mode 100644 index 0000000000..fc1fbb9980 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeFileSystemPolicy.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the FileSystemPolicy for the specified EFS file system. +// +// This operation requires permissions for the +// elasticfilesystem:DescribeFileSystemPolicy action. +func (c *Client) DescribeFileSystemPolicy(ctx context.Context, params *DescribeFileSystemPolicyInput, optFns ...func(*Options)) (*DescribeFileSystemPolicyOutput, error) { + if params == nil { + params = &DescribeFileSystemPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeFileSystemPolicy", params, optFns, c.addOperationDescribeFileSystemPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeFileSystemPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeFileSystemPolicyInput struct { + + // Specifies which EFS file system to retrieve the FileSystemPolicy for. + // + // This member is required. + FileSystemId *string + + noSmithyDocumentSerde +} + +type DescribeFileSystemPolicyOutput struct { + + // Specifies the EFS file system to which the FileSystemPolicy applies. + FileSystemId *string + + // The JSON formatted FileSystemPolicy for the EFS file system. + Policy *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeFileSystemPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeFileSystemPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeFileSystemPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFileSystemPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeFileSystemPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFileSystemPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeFileSystemPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeFileSystemPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeFileSystems.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeFileSystems.go new file mode 100644 index 0000000000..83c304e789 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeFileSystems.go @@ -0,0 +1,297 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the description of a specific Amazon EFS file system if either the file +// system CreationToken or the FileSystemId is provided. Otherwise, it returns +// descriptions of all file systems owned by the caller's Amazon Web Services +// account in the Amazon Web Services Region of the endpoint that you're calling. +// +// When retrieving all file system descriptions, you can optionally specify the +// MaxItems parameter to limit the number of descriptions in a response. This +// number is automatically set to 100. If more file system descriptions remain, +// Amazon EFS returns a NextMarker , an opaque token, in the response. In this +// case, you should send a subsequent request with the Marker request parameter +// set to the value of NextMarker . +// +// To retrieve a list of your file system descriptions, this operation is used in +// an iterative process, where DescribeFileSystems is called first without the +// Marker and then the operation continues to call it with the Marker parameter +// set to the value of the NextMarker from the previous response until the +// response has no NextMarker . +// +// The order of file systems returned in the response of one DescribeFileSystems +// call and the order of file systems returned across the responses of a multi-call +// iteration is unspecified. +// +// This operation requires permissions for the +// elasticfilesystem:DescribeFileSystems action. +func (c *Client) DescribeFileSystems(ctx context.Context, params *DescribeFileSystemsInput, optFns ...func(*Options)) (*DescribeFileSystemsOutput, error) { + if params == nil { + params = &DescribeFileSystemsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeFileSystems", params, optFns, c.addOperationDescribeFileSystemsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeFileSystemsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeFileSystemsInput struct { + + // (Optional) Restricts the list to the file system with this creation token + // (String). You specify a creation token when you create an Amazon EFS file + // system. + CreationToken *string + + // (Optional) ID of the file system whose description you want to retrieve + // (String). + FileSystemId *string + + // (Optional) Opaque pagination token returned from a previous DescribeFileSystems + // operation (String). If present, specifies to continue the list from where the + // returning call had left off. + Marker *string + + // (Optional) Specifies the maximum number of file systems to return in the + // response (integer). This number is automatically set to 100. The response is + // paginated at 100 per page if you have more than 100 file systems. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type DescribeFileSystemsOutput struct { + + // An array of file system descriptions. + FileSystems []types.FileSystemDescription + + // Present if provided by caller in the request (String). + Marker *string + + // Present if there are more file systems than returned in the response (String). + // You can use the NextMarker in the subsequent request to fetch the descriptions. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeFileSystemsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeFileSystems{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeFileSystems{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeFileSystems"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeFileSystems(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// DescribeFileSystemsPaginatorOptions is the paginator options for +// DescribeFileSystems +type DescribeFileSystemsPaginatorOptions struct { + // (Optional) Specifies the maximum number of file systems to return in the + // response (integer). This number is automatically set to 100. The response is + // paginated at 100 per page if you have more than 100 file systems. + 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 +} + +// DescribeFileSystemsPaginator is a paginator for DescribeFileSystems +type DescribeFileSystemsPaginator struct { + options DescribeFileSystemsPaginatorOptions + client DescribeFileSystemsAPIClient + params *DescribeFileSystemsInput + nextToken *string + firstPage bool +} + +// NewDescribeFileSystemsPaginator returns a new DescribeFileSystemsPaginator +func NewDescribeFileSystemsPaginator(client DescribeFileSystemsAPIClient, params *DescribeFileSystemsInput, optFns ...func(*DescribeFileSystemsPaginatorOptions)) *DescribeFileSystemsPaginator { + if params == nil { + params = &DescribeFileSystemsInput{} + } + + options := DescribeFileSystemsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeFileSystemsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeFileSystemsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeFileSystems page. +func (p *DescribeFileSystemsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeFileSystemsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeFileSystems(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeFileSystemsAPIClient is a client that implements the +// DescribeFileSystems operation. +type DescribeFileSystemsAPIClient interface { + DescribeFileSystems(context.Context, *DescribeFileSystemsInput, ...func(*Options)) (*DescribeFileSystemsOutput, error) +} + +var _ DescribeFileSystemsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeFileSystems(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeFileSystems", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeLifecycleConfiguration.go new file mode 100644 index 0000000000..031aae9b0f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeLifecycleConfiguration.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the current LifecycleConfiguration object for the specified EFS file +// system. Lifecycle management uses the LifecycleConfiguration object to identify +// when to move files between storage classes. For a file system without a +// LifecycleConfiguration object, the call returns an empty array in the response. +// +// This operation requires permissions for the +// elasticfilesystem:DescribeLifecycleConfiguration operation. +func (c *Client) DescribeLifecycleConfiguration(ctx context.Context, params *DescribeLifecycleConfigurationInput, optFns ...func(*Options)) (*DescribeLifecycleConfigurationOutput, error) { + if params == nil { + params = &DescribeLifecycleConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeLifecycleConfiguration", params, optFns, c.addOperationDescribeLifecycleConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeLifecycleConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeLifecycleConfigurationInput struct { + + // The ID of the file system whose LifecycleConfiguration object you want to + // retrieve (String). + // + // This member is required. + FileSystemId *string + + noSmithyDocumentSerde +} + +type DescribeLifecycleConfigurationOutput struct { + + // An array of lifecycle management policies. EFS supports a maximum of one policy + // per file system. + LifecyclePolicies []types.LifecyclePolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeLifecycleConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeLifecycleConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeLifecycleConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeLifecycleConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeLifecycleConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeLifecycleConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeLifecycleConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeLifecycleConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeMountTargetSecurityGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeMountTargetSecurityGroups.go new file mode 100644 index 0000000000..5f35d2fac3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeMountTargetSecurityGroups.go @@ -0,0 +1,171 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the security groups currently in effect for a mount target. This +// operation requires that the network interface of the mount target has been +// created and the lifecycle state of the mount target is not deleted . +// +// This operation requires permissions for the following actions: +// +// - elasticfilesystem:DescribeMountTargetSecurityGroups action on the mount +// target's file system. +// +// - ec2:DescribeNetworkInterfaceAttribute action on the mount target's network +// interface. +func (c *Client) DescribeMountTargetSecurityGroups(ctx context.Context, params *DescribeMountTargetSecurityGroupsInput, optFns ...func(*Options)) (*DescribeMountTargetSecurityGroupsOutput, error) { + if params == nil { + params = &DescribeMountTargetSecurityGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMountTargetSecurityGroups", params, optFns, c.addOperationDescribeMountTargetSecurityGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMountTargetSecurityGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMountTargetSecurityGroupsInput struct { + + // The ID of the mount target whose security groups you want to retrieve. + // + // This member is required. + MountTargetId *string + + noSmithyDocumentSerde +} + +type DescribeMountTargetSecurityGroupsOutput struct { + + // An array of security groups. + // + // This member is required. + SecurityGroups []string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMountTargetSecurityGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeMountTargetSecurityGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeMountTargetSecurityGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMountTargetSecurityGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeMountTargetSecurityGroupsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMountTargetSecurityGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeMountTargetSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMountTargetSecurityGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeMountTargets.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeMountTargets.go new file mode 100644 index 0000000000..bc08e8f7d9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeMountTargets.go @@ -0,0 +1,292 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns the descriptions of all the current mount targets, or a specific mount +// target, for a file system. When requesting all of the current mount targets, the +// order of mount targets returned in the response is unspecified. +// +// This operation requires permissions for the +// elasticfilesystem:DescribeMountTargets action, on either the file system ID that +// you specify in FileSystemId , or on the file system of the mount target that you +// specify in MountTargetId . +func (c *Client) DescribeMountTargets(ctx context.Context, params *DescribeMountTargetsInput, optFns ...func(*Options)) (*DescribeMountTargetsOutput, error) { + if params == nil { + params = &DescribeMountTargetsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeMountTargets", params, optFns, c.addOperationDescribeMountTargetsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeMountTargetsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeMountTargetsInput struct { + + // (Optional) The ID of the access point whose mount targets that you want to + // list. It must be included in your request if a FileSystemId or MountTargetId is + // not included in your request. Accepts either an access point ID or ARN as input. + AccessPointId *string + + // (Optional) ID of the file system whose mount targets you want to list (String). + // It must be included in your request if an AccessPointId or MountTargetId is not + // included. Accepts either a file system ID or ARN as input. + FileSystemId *string + + // (Optional) Opaque pagination token returned from a previous DescribeMountTargets + // operation (String). If present, it specifies to continue the list from where the + // previous returning call left off. + Marker *string + + // (Optional) Maximum number of mount targets to return in the response. + // Currently, this number is automatically set to 10, and other values are ignored. + // The response is paginated at 100 per page if you have more than 100 mount + // targets. + MaxItems *int32 + + // (Optional) ID of the mount target that you want to have described (String). It + // must be included in your request if FileSystemId is not included. Accepts + // either a mount target ID or ARN as input. + MountTargetId *string + + noSmithyDocumentSerde +} + +type DescribeMountTargetsOutput struct { + + // If the request included the Marker , the response returns that value in this + // field. + Marker *string + + // Returns the file system's mount targets as an array of MountTargetDescription + // objects. + MountTargets []types.MountTargetDescription + + // If a value is present, there are more mount targets to return. In a subsequent + // request, you can provide Marker in your request with this value to retrieve the + // next set of mount targets. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeMountTargetsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeMountTargets{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeMountTargets{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeMountTargets"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeMountTargets(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// DescribeMountTargetsPaginatorOptions is the paginator options for +// DescribeMountTargets +type DescribeMountTargetsPaginatorOptions struct { + // (Optional) Maximum number of mount targets to return in the response. + // Currently, this number is automatically set to 10, and other values are ignored. + // The response is paginated at 100 per page if you have more than 100 mount + // targets. + 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 +} + +// DescribeMountTargetsPaginator is a paginator for DescribeMountTargets +type DescribeMountTargetsPaginator struct { + options DescribeMountTargetsPaginatorOptions + client DescribeMountTargetsAPIClient + params *DescribeMountTargetsInput + nextToken *string + firstPage bool +} + +// NewDescribeMountTargetsPaginator returns a new DescribeMountTargetsPaginator +func NewDescribeMountTargetsPaginator(client DescribeMountTargetsAPIClient, params *DescribeMountTargetsInput, optFns ...func(*DescribeMountTargetsPaginatorOptions)) *DescribeMountTargetsPaginator { + if params == nil { + params = &DescribeMountTargetsInput{} + } + + options := DescribeMountTargetsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeMountTargetsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeMountTargetsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeMountTargets page. +func (p *DescribeMountTargetsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeMountTargetsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeMountTargets(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeMountTargetsAPIClient is a client that implements the +// DescribeMountTargets operation. +type DescribeMountTargetsAPIClient interface { + DescribeMountTargets(context.Context, *DescribeMountTargetsInput, ...func(*Options)) (*DescribeMountTargetsOutput, error) +} + +var _ DescribeMountTargetsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeMountTargets(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeMountTargets", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeReplicationConfigurations.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeReplicationConfigurations.go new file mode 100644 index 0000000000..5a5bc2f459 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeReplicationConfigurations.go @@ -0,0 +1,269 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the replication configuration for a specific file system. If a file +// system is not specified, all of the replication configurations for the Amazon +// Web Services account in an Amazon Web Services Region are retrieved. +func (c *Client) DescribeReplicationConfigurations(ctx context.Context, params *DescribeReplicationConfigurationsInput, optFns ...func(*Options)) (*DescribeReplicationConfigurationsOutput, error) { + if params == nil { + params = &DescribeReplicationConfigurationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeReplicationConfigurations", params, optFns, c.addOperationDescribeReplicationConfigurationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeReplicationConfigurationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeReplicationConfigurationsInput struct { + + // You can retrieve the replication configuration for a specific file system by + // providing its file system ID. For cross-account,cross-region replication, an + // account can only describe the replication configuration for a file system in its + // own Region. + FileSystemId *string + + // (Optional) To limit the number of objects returned in a response, you can + // specify the MaxItems parameter. The default value is 100. + MaxResults *int32 + + // NextToken is present if the response is paginated. You can use NextToken in a + // subsequent request to fetch the next page of output. + NextToken *string + + noSmithyDocumentSerde +} + +type DescribeReplicationConfigurationsOutput struct { + + // You can use the NextToken from the previous response in a subsequent request to + // fetch the additional descriptions. + NextToken *string + + // The collection of replication configurations that is returned. + Replications []types.ReplicationConfigurationDescription + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeReplicationConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeReplicationConfigurations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeReplicationConfigurations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeReplicationConfigurations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeReplicationConfigurations(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// DescribeReplicationConfigurationsPaginatorOptions is the paginator options for +// DescribeReplicationConfigurations +type DescribeReplicationConfigurationsPaginatorOptions struct { + // (Optional) To limit the number of objects returned in a response, you can + // specify the MaxItems parameter. The default 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 +} + +// DescribeReplicationConfigurationsPaginator is a paginator for +// DescribeReplicationConfigurations +type DescribeReplicationConfigurationsPaginator struct { + options DescribeReplicationConfigurationsPaginatorOptions + client DescribeReplicationConfigurationsAPIClient + params *DescribeReplicationConfigurationsInput + nextToken *string + firstPage bool +} + +// NewDescribeReplicationConfigurationsPaginator returns a new +// DescribeReplicationConfigurationsPaginator +func NewDescribeReplicationConfigurationsPaginator(client DescribeReplicationConfigurationsAPIClient, params *DescribeReplicationConfigurationsInput, optFns ...func(*DescribeReplicationConfigurationsPaginatorOptions)) *DescribeReplicationConfigurationsPaginator { + if params == nil { + params = &DescribeReplicationConfigurationsInput{} + } + + options := DescribeReplicationConfigurationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeReplicationConfigurationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeReplicationConfigurationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeReplicationConfigurations page. +func (p *DescribeReplicationConfigurationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeReplicationConfigurationsOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeReplicationConfigurations(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 +} + +// DescribeReplicationConfigurationsAPIClient is a client that implements the +// DescribeReplicationConfigurations operation. +type DescribeReplicationConfigurationsAPIClient interface { + DescribeReplicationConfigurations(context.Context, *DescribeReplicationConfigurationsInput, ...func(*Options)) (*DescribeReplicationConfigurationsOutput, error) +} + +var _ DescribeReplicationConfigurationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeReplicationConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeReplicationConfigurations", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeTags.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeTags.go new file mode 100644 index 0000000000..42f8a1b692 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeTags.go @@ -0,0 +1,286 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// DEPRECATED - The DescribeTags action is deprecated and not maintained. To view +// tags associated with EFS resources, use the ListTagsForResource API action. +// +// Returns the tags associated with a file system. The order of tags returned in +// the response of one DescribeTags call and the order of tags returned across the +// responses of a multiple-call iteration (when using pagination) is unspecified. +// +// This operation requires permissions for the elasticfilesystem:DescribeTags +// action. +// +// Deprecated: Use ListTagsForResource. +func (c *Client) DescribeTags(ctx context.Context, params *DescribeTagsInput, optFns ...func(*Options)) (*DescribeTagsOutput, error) { + if params == nil { + params = &DescribeTagsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeTags", params, optFns, c.addOperationDescribeTagsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeTagsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeTagsInput struct { + + // The ID of the file system whose tag set you want to retrieve. + // + // This member is required. + FileSystemId *string + + // (Optional) An opaque pagination token returned from a previous DescribeTags + // operation (String). If present, it specifies to continue the list from where the + // previous call left off. + Marker *string + + // (Optional) The maximum number of file system tags to return in the response. + // Currently, this number is automatically set to 100, and other values are + // ignored. The response is paginated at 100 per page if you have more than 100 + // tags. + MaxItems *int32 + + noSmithyDocumentSerde +} + +type DescribeTagsOutput struct { + + // Returns tags associated with the file system as an array of Tag objects. + // + // This member is required. + Tags []types.Tag + + // If the request included a Marker , the response returns that value in this field. + Marker *string + + // If a value is present, there are more tags to return. In a subsequent request, + // you can provide the value of NextMarker as the value of the Marker parameter in + // your next request to retrieve the next set of tags. + NextMarker *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeTags{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeTags{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeTags"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpDescribeTagsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeTags(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// DescribeTagsPaginatorOptions is the paginator options for DescribeTags +type DescribeTagsPaginatorOptions struct { + // (Optional) The maximum number of file system tags to return in the response. + // Currently, this number is automatically set to 100, and other values are + // ignored. The response is paginated at 100 per page if you have more than 100 + // tags. + 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 +} + +// DescribeTagsPaginator is a paginator for DescribeTags +type DescribeTagsPaginator struct { + options DescribeTagsPaginatorOptions + client DescribeTagsAPIClient + params *DescribeTagsInput + nextToken *string + firstPage bool +} + +// NewDescribeTagsPaginator returns a new DescribeTagsPaginator +func NewDescribeTagsPaginator(client DescribeTagsAPIClient, params *DescribeTagsInput, optFns ...func(*DescribeTagsPaginatorOptions)) *DescribeTagsPaginator { + if params == nil { + params = &DescribeTagsInput{} + } + + options := DescribeTagsPaginatorOptions{} + if params.MaxItems != nil { + options.Limit = *params.MaxItems + } + + for _, fn := range optFns { + fn(&options) + } + + return &DescribeTagsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.Marker, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *DescribeTagsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next DescribeTags page. +func (p *DescribeTagsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*DescribeTagsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.Marker = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxItems = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.DescribeTags(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextMarker + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// DescribeTagsAPIClient is a client that implements the DescribeTags operation. +type DescribeTagsAPIClient interface { + DescribeTags(context.Context, *DescribeTagsInput, ...func(*Options)) (*DescribeTagsOutput, error) +} + +var _ DescribeTagsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opDescribeTags(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeTags", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_ListTagsForResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_ListTagsForResource.go new file mode 100644 index 0000000000..0bc9fb8596 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_ListTagsForResource.go @@ -0,0 +1,272 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all tags for a top-level EFS resource. You must provide the ID of the +// resource that you want to retrieve the tags for. +// +// This operation requires permissions for the +// elasticfilesystem:DescribeAccessPoints action. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // Specifies the EFS resource you want to retrieve tags for. You can retrieve tags + // for EFS file systems and access points using this API endpoint. + // + // This member is required. + ResourceId *string + + // (Optional) Specifies the maximum number of tag objects to return in the + // response. The default value is 100. + MaxResults *int32 + + // (Optional) You can use NextToken in a subsequent request to fetch the next page + // of access point descriptions if the response payload was paginated. + NextToken *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // NextToken is present if the response payload is paginated. You can use NextToken + // in a subsequent request to fetch the next page of access point descriptions. + NextToken *string + + // An array of the tags for the specified EFS resource. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListTagsForResourcePaginatorOptions is the paginator options for +// ListTagsForResource +type ListTagsForResourcePaginatorOptions struct { + // (Optional) Specifies the maximum number of tag objects to return in the + // response. The default 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 +} + +// ListTagsForResourcePaginator is a paginator for ListTagsForResource +type ListTagsForResourcePaginator struct { + options ListTagsForResourcePaginatorOptions + client ListTagsForResourceAPIClient + params *ListTagsForResourceInput + nextToken *string + firstPage bool +} + +// NewListTagsForResourcePaginator returns a new ListTagsForResourcePaginator +func NewListTagsForResourcePaginator(client ListTagsForResourceAPIClient, params *ListTagsForResourceInput, optFns ...func(*ListTagsForResourcePaginatorOptions)) *ListTagsForResourcePaginator { + if params == nil { + params = &ListTagsForResourceInput{} + } + + options := ListTagsForResourcePaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListTagsForResourcePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListTagsForResourcePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListTagsForResource page. +func (p *ListTagsForResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListTagsForResourceOutput, 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 + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListTagsForResource(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 +} + +// ListTagsForResourceAPIClient is a client that implements the +// ListTagsForResource operation. +type ListTagsForResourceAPIClient interface { + ListTagsForResource(context.Context, *ListTagsForResourceInput, ...func(*Options)) (*ListTagsForResourceOutput, error) +} + +var _ ListTagsForResourceAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListTagsForResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_ModifyMountTargetSecurityGroups.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_ModifyMountTargetSecurityGroups.go new file mode 100644 index 0000000000..9f4a4016f0 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_ModifyMountTargetSecurityGroups.go @@ -0,0 +1,173 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Modifies the set of security groups in effect for a mount target. +// +// When you create a mount target, Amazon EFS also creates a new network +// interface. For more information, see CreateMountTarget. This operation replaces the security +// groups in effect for the network interface associated with a mount target, with +// the SecurityGroups provided in the request. This operation requires that the +// network interface of the mount target has been created and the lifecycle state +// of the mount target is not deleted . +// +// The operation requires permissions for the following actions: +// +// - elasticfilesystem:ModifyMountTargetSecurityGroups action on the mount +// target's file system. +// +// - ec2:ModifyNetworkInterfaceAttribute action on the mount target's network +// interface. +func (c *Client) ModifyMountTargetSecurityGroups(ctx context.Context, params *ModifyMountTargetSecurityGroupsInput, optFns ...func(*Options)) (*ModifyMountTargetSecurityGroupsOutput, error) { + if params == nil { + params = &ModifyMountTargetSecurityGroupsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ModifyMountTargetSecurityGroups", params, optFns, c.addOperationModifyMountTargetSecurityGroupsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ModifyMountTargetSecurityGroupsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ModifyMountTargetSecurityGroupsInput struct { + + // The ID of the mount target whose security groups you want to modify. + // + // This member is required. + MountTargetId *string + + // An array of VPC security group IDs. + SecurityGroups []string + + noSmithyDocumentSerde +} + +type ModifyMountTargetSecurityGroupsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationModifyMountTargetSecurityGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpModifyMountTargetSecurityGroups{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpModifyMountTargetSecurityGroups{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ModifyMountTargetSecurityGroups"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpModifyMountTargetSecurityGroupsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opModifyMountTargetSecurityGroups(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opModifyMountTargetSecurityGroups(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ModifyMountTargetSecurityGroups", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutAccountPreferences.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutAccountPreferences.go new file mode 100644 index 0000000000..77a410d447 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutAccountPreferences.go @@ -0,0 +1,179 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this operation to set the account preference in the current Amazon Web +// Services Region to use long 17 character (63 bit) or short 8 character (32 bit) +// resource IDs for new EFS file system and mount target resources. All existing +// resource IDs are not affected by any changes you make. You can set the ID +// preference during the opt-in period as EFS transitions to long resource IDs. For +// more information, see [Managing Amazon EFS resource IDs]. +// +// Starting in October, 2021, you will receive an error if you try to set the +// account preference to use the short 8 character format resource ID. Contact +// Amazon Web Services support if you receive an error and must use short IDs for +// file system and mount target resources. +// +// [Managing Amazon EFS resource IDs]: https://docs.aws.amazon.com/efs/latest/ug/manage-efs-resource-ids.html +func (c *Client) PutAccountPreferences(ctx context.Context, params *PutAccountPreferencesInput, optFns ...func(*Options)) (*PutAccountPreferencesOutput, error) { + if params == nil { + params = &PutAccountPreferencesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutAccountPreferences", params, optFns, c.addOperationPutAccountPreferencesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutAccountPreferencesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutAccountPreferencesInput struct { + + // Specifies the EFS resource ID preference to set for the user's Amazon Web + // Services account, in the current Amazon Web Services Region, either LONG_ID (17 + // characters), or SHORT_ID (8 characters). + // + // Starting in October, 2021, you will receive an error when setting the account + // preference to SHORT_ID . Contact Amazon Web Services support if you receive an + // error and must use short IDs for file system and mount target resources. + // + // This member is required. + ResourceIdType types.ResourceIdType + + noSmithyDocumentSerde +} + +type PutAccountPreferencesOutput struct { + + // Describes the resource type and its ID preference for the user's Amazon Web + // Services account, in the current Amazon Web Services Region. + ResourceIdPreference *types.ResourceIdPreference + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutAccountPreferencesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutAccountPreferences{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutAccountPreferences{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutAccountPreferences"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutAccountPreferencesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAccountPreferences(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutAccountPreferences(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutAccountPreferences", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutBackupPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutBackupPolicy.go new file mode 100644 index 0000000000..28f31cd1f3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutBackupPolicy.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the file system's backup policy. Use this action to start or stop +// automatic backups of the file system. +func (c *Client) PutBackupPolicy(ctx context.Context, params *PutBackupPolicyInput, optFns ...func(*Options)) (*PutBackupPolicyOutput, error) { + if params == nil { + params = &PutBackupPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutBackupPolicy", params, optFns, c.addOperationPutBackupPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutBackupPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutBackupPolicyInput struct { + + // The backup policy included in the PutBackupPolicy request. + // + // This member is required. + BackupPolicy *types.BackupPolicy + + // Specifies which EFS file system to update the backup policy for. + // + // This member is required. + FileSystemId *string + + noSmithyDocumentSerde +} + +type PutBackupPolicyOutput struct { + + // Describes the file system's backup policy, indicating whether automatic backups + // are turned on or off. + BackupPolicy *types.BackupPolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutBackupPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutBackupPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutBackupPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutBackupPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutBackupPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutBackupPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutBackupPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutBackupPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutFileSystemPolicy.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutFileSystemPolicy.go new file mode 100644 index 0000000000..319efd745a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutFileSystemPolicy.go @@ -0,0 +1,195 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Applies an Amazon EFS FileSystemPolicy to an Amazon EFS file system. A file +// system policy is an IAM resource-based policy and can contain multiple policy +// statements. A file system always has exactly one file system policy, which can +// be the default policy or an explicit policy set or updated using this API +// operation. EFS file system policies have a 20,000 character limit. When an +// explicit policy is set, it overrides the default policy. For more information +// about the default file system policy, see [Default EFS file system policy]. +// +// EFS file system policies have a 20,000 character limit. +// +// This operation requires permissions for the +// elasticfilesystem:PutFileSystemPolicy action. +// +// [Default EFS file system policy]: https://docs.aws.amazon.com/efs/latest/ug/iam-access-control-nfs-efs.html#default-filesystempolicy +func (c *Client) PutFileSystemPolicy(ctx context.Context, params *PutFileSystemPolicyInput, optFns ...func(*Options)) (*PutFileSystemPolicyOutput, error) { + if params == nil { + params = &PutFileSystemPolicyInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutFileSystemPolicy", params, optFns, c.addOperationPutFileSystemPolicyMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutFileSystemPolicyOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutFileSystemPolicyInput struct { + + // The ID of the EFS file system that you want to create or update the + // FileSystemPolicy for. + // + // This member is required. + FileSystemId *string + + // The FileSystemPolicy that you're creating. Accepts a JSON formatted policy + // definition. EFS file system policies have a 20,000 character limit. To find out + // more about the elements that make up a file system policy, see [Resource-based policies within Amazon EFS]. + // + // [Resource-based policies within Amazon EFS]: https://docs.aws.amazon.com/efs/latest/ug/security_iam_service-with-iam.html#security_iam_service-with-iam-resource-based-policies + // + // This member is required. + Policy *string + + // (Optional) A boolean that specifies whether or not to bypass the + // FileSystemPolicy lockout safety check. The lockout safety check determines + // whether the policy in the request will lock out, or prevent, the IAM principal + // that is making the request from making future PutFileSystemPolicy requests on + // this file system. Set BypassPolicyLockoutSafetyCheck to True only when you + // intend to prevent the IAM principal that is making the request from making + // subsequent PutFileSystemPolicy requests on this file system. The default value + // is False . + BypassPolicyLockoutSafetyCheck bool + + noSmithyDocumentSerde +} + +type PutFileSystemPolicyOutput struct { + + // Specifies the EFS file system to which the FileSystemPolicy applies. + FileSystemId *string + + // The JSON formatted FileSystemPolicy for the EFS file system. + Policy *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutFileSystemPolicyMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutFileSystemPolicy{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutFileSystemPolicy{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutFileSystemPolicy"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutFileSystemPolicyValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutFileSystemPolicy(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutFileSystemPolicy(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutFileSystemPolicy", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutLifecycleConfiguration.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutLifecycleConfiguration.go new file mode 100644 index 0000000000..9bebd66aac --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutLifecycleConfiguration.go @@ -0,0 +1,243 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Use this action to manage storage for your file system. A LifecycleConfiguration +// consists of one or more LifecyclePolicy objects that define the following: +// +// - TransitionToIA – When to move files in the file system from primary storage +// (Standard storage class) into the Infrequent Access (IA) storage. +// +// - TransitionToArchive – When to move files in the file system from their +// current storage class (either IA or Standard storage) into the Archive storage. +// +// File systems cannot transition into Archive storage before transitioning into +// +// IA storage. Therefore, TransitionToArchive must either not be set or must be +// later than TransitionToIA. +// +// The Archive storage class is available only for file systems that use the +// +// Elastic throughput mode and the General Purpose performance mode. +// +// - TransitionToPrimaryStorageClass – Whether to move files in the file system +// back to primary storage (Standard storage class) after they are accessed in IA +// or Archive storage. +// +// For more information, see [Managing file system storage]. +// +// Each Amazon EFS file system supports one lifecycle configuration, which applies +// to all files in the file system. If a LifecycleConfiguration object already +// exists for the specified file system, a PutLifecycleConfiguration call modifies +// the existing configuration. A PutLifecycleConfiguration call with an empty +// LifecyclePolicies array in the request body deletes any existing +// LifecycleConfiguration . In the request, specify the following: +// +// - The ID for the file system for which you are enabling, disabling, or +// modifying lifecycle management. +// +// - A LifecyclePolicies array of LifecyclePolicy objects that define when to +// move files to IA storage, to Archive storage, and back to primary storage. +// +// Amazon EFS requires that each LifecyclePolicy object have only have a single +// +// transition, so the LifecyclePolicies array needs to be structured with +// separate LifecyclePolicy objects. See the example requests in the following +// section for more information. +// +// This operation requires permissions for the +// elasticfilesystem:PutLifecycleConfiguration operation. +// +// To apply a LifecycleConfiguration object to an encrypted file system, you need +// the same Key Management Service permissions as when you created the encrypted +// file system. +// +// [Managing file system storage]: https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html +func (c *Client) PutLifecycleConfiguration(ctx context.Context, params *PutLifecycleConfigurationInput, optFns ...func(*Options)) (*PutLifecycleConfigurationOutput, error) { + if params == nil { + params = &PutLifecycleConfigurationInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutLifecycleConfiguration", params, optFns, c.addOperationPutLifecycleConfigurationMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutLifecycleConfigurationOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutLifecycleConfigurationInput struct { + + // The ID of the file system for which you are creating the LifecycleConfiguration + // object (String). + // + // This member is required. + FileSystemId *string + + // An array of LifecyclePolicy objects that define the file system's + // LifecycleConfiguration object. A LifecycleConfiguration object informs + // lifecycle management of the following: + // + // - TransitionToIA – When to move files in the file system from primary storage + // (Standard storage class) into the Infrequent Access (IA) storage. + // + // - TransitionToArchive – When to move files in the file system from their + // current storage class (either IA or Standard storage) into the Archive storage. + // + // File systems cannot transition into Archive storage before transitioning into + // IA storage. Therefore, TransitionToArchive must either not be set or must be + // later than TransitionToIA. + // + // The Archive storage class is available only for file systems that use the + // Elastic throughput mode and the General Purpose performance mode. + // + // - TransitionToPrimaryStorageClass – Whether to move files in the file system + // back to primary storage (Standard storage class) after they are accessed in IA + // or Archive storage. + // + // When using the put-lifecycle-configuration CLI command or the + // PutLifecycleConfiguration API action, Amazon EFS requires that each + // LifecyclePolicy object have only a single transition. This means that in a + // request body, LifecyclePolicies must be structured as an array of + // LifecyclePolicy objects, one object for each storage transition. See the example + // requests in the following section for more information. + // + // This member is required. + LifecyclePolicies []types.LifecyclePolicy + + noSmithyDocumentSerde +} + +type PutLifecycleConfigurationOutput struct { + + // An array of lifecycle management policies. EFS supports a maximum of one policy + // per file system. + LifecyclePolicies []types.LifecyclePolicy + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutLifecycleConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutLifecycleConfiguration{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutLifecycleConfiguration{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "PutLifecycleConfiguration"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpPutLifecycleConfigurationValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutLifecycleConfiguration(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opPutLifecycleConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "PutLifecycleConfiguration", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_TagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_TagResource.go new file mode 100644 index 0000000000..28ed2d3358 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_TagResource.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a tag for an EFS resource. You can create tags for EFS file systems and +// access points using this API operation. +// +// This operation requires permissions for the elasticfilesystem:TagResource +// action. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The ID specifying the EFS resource that you want to create a tag for. + // + // This member is required. + ResourceId *string + + // An array of Tag objects to add. Each Tag object is a key-value pair. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "TagResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UntagResource.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UntagResource.go new file mode 100644 index 0000000000..e94d5b6272 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UntagResource.go @@ -0,0 +1,165 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes tags from an EFS resource. You can remove tags from EFS file systems +// and access points using this API operation. +// +// This operation requires permissions for the elasticfilesystem:UntagResource +// action. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // Specifies the EFS resource that you want to remove tags from. + // + // This member is required. + ResourceId *string + + // The keys of the key-value tag pairs that you want to remove from the specified + // EFS resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UntagResource", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UpdateFileSystem.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UpdateFileSystem.go new file mode 100644 index 0000000000..23c09c1515 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UpdateFileSystem.go @@ -0,0 +1,273 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Updates the throughput mode or the amount of provisioned throughput of an +// existing file system. +func (c *Client) UpdateFileSystem(ctx context.Context, params *UpdateFileSystemInput, optFns ...func(*Options)) (*UpdateFileSystemOutput, error) { + if params == nil { + params = &UpdateFileSystemInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFileSystem", params, optFns, c.addOperationUpdateFileSystemMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFileSystemOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFileSystemInput struct { + + // The ID of the file system that you want to update. + // + // This member is required. + FileSystemId *string + + // (Optional) The throughput, measured in mebibytes per second (MiBps), that you + // want to provision for a file system that you're creating. Required if + // ThroughputMode is set to provisioned . Valid values are 1-3414 MiBps, with the + // upper limit depending on Region. To increase this limit, contact Amazon Web + // ServicesSupport. For more information, see [Amazon EFS quotas that you can increase]in the Amazon EFS User Guide. + // + // [Amazon EFS quotas that you can increase]: https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits + ProvisionedThroughputInMibps *float64 + + // (Optional) Updates the file system's throughput mode. If you're not updating + // your throughput mode, you don't need to provide this value in your request. If + // you are changing the ThroughputMode to provisioned , you must also set a value + // for ProvisionedThroughputInMibps . + ThroughputMode types.ThroughputMode + + noSmithyDocumentSerde +} + +// A description of the file system. +type UpdateFileSystemOutput struct { + + // The time that the file system was created, in seconds (since + // 1970-01-01T00:00:00Z). + // + // This member is required. + CreationTime *time.Time + + // The opaque string specified in the request. + // + // This member is required. + CreationToken *string + + // The ID of the file system, assigned by Amazon EFS. + // + // This member is required. + FileSystemId *string + + // The lifecycle phase of the file system. + // + // This member is required. + LifeCycleState types.LifeCycleState + + // The current number of mount targets that the file system has. For more + // information, see CreateMountTarget. + // + // This member is required. + NumberOfMountTargets int32 + + // The Amazon Web Services account that created the file system. + // + // This member is required. + OwnerId *string + + // The performance mode of the file system. + // + // This member is required. + PerformanceMode types.PerformanceMode + + // The latest known metered size (in bytes) of data stored in the file system, in + // its Value field, and the time at which that size was determined in its Timestamp + // field. The Timestamp value is the integer number of seconds since + // 1970-01-01T00:00:00Z. The SizeInBytes value doesn't represent the size of a + // consistent snapshot of the file system, but it is eventually consistent when + // there are no writes to the file system. That is, SizeInBytes represents actual + // size only if the file system is not modified for a period longer than a couple + // of hours. Otherwise, the value is not the exact size that the file system was at + // any point in time. + // + // This member is required. + SizeInBytes *types.FileSystemSize + + // The tags associated with the file system, presented as an array of Tag objects. + // + // This member is required. + Tags []types.Tag + + // The unique and consistent identifier of the Availability Zone in which the file + // system is located, and is valid only for One Zone file systems. For example, + // use1-az1 is an Availability Zone ID for the us-east-1 Amazon Web Services + // Region, and it has the same location in every Amazon Web Services account. + AvailabilityZoneId *string + + // Describes the Amazon Web Services Availability Zone in which the file system is + // located, and is valid only for One Zone file systems. For more information, see [Using EFS storage classes] + // in the Amazon EFS User Guide. + // + // [Using EFS storage classes]: https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html + AvailabilityZoneName *string + + // A Boolean value that, if true, indicates that the file system is encrypted. + Encrypted *bool + + // The Amazon Resource Name (ARN) for the EFS file system, in the format + // arn:aws:elasticfilesystem:region:account-id:file-system/file-system-id . + // Example with sample data: + // arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567 + FileSystemArn *string + + // Describes the protection on the file system. + FileSystemProtection *types.FileSystemProtectionDescription + + // The ID of an KMS key used to protect the encrypted file system. + KmsKeyId *string + + // You can add tags to a file system, including a Name tag. For more information, + // see CreateFileSystem. If the file system has a Name tag, Amazon EFS returns the value in this + // field. + Name *string + + // The amount of provisioned throughput, measured in MiBps, for the file system. + // Valid for file systems using ThroughputMode set to provisioned . + ProvisionedThroughputInMibps *float64 + + // Displays the file system's throughput mode. For more information, see [Throughput modes] in the + // Amazon EFS User Guide. + // + // [Throughput modes]: https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes + ThroughputMode types.ThroughputMode + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFileSystemMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFileSystem{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFileSystem{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFileSystem"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateFileSystemValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFileSystem(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFileSystem(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFileSystem", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UpdateFileSystemProtection.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UpdateFileSystemProtection.go new file mode 100644 index 0000000000..2c55d86def --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UpdateFileSystemProtection.go @@ -0,0 +1,197 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates protection on the file system. +// +// This operation requires permissions for the +// elasticfilesystem:UpdateFileSystemProtection action. +func (c *Client) UpdateFileSystemProtection(ctx context.Context, params *UpdateFileSystemProtectionInput, optFns ...func(*Options)) (*UpdateFileSystemProtectionOutput, error) { + if params == nil { + params = &UpdateFileSystemProtectionInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateFileSystemProtection", params, optFns, c.addOperationUpdateFileSystemProtectionMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateFileSystemProtectionOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateFileSystemProtectionInput struct { + + // The ID of the file system to update. + // + // This member is required. + FileSystemId *string + + // The status of the file system's replication overwrite protection. + // + // - ENABLED – The file system cannot be used as the destination file system in a + // replication configuration. The file system is writeable. Replication overwrite + // protection is ENABLED by default. + // + // - DISABLED – The file system can be used as the destination file system in a + // replication configuration. The file system is read-only and can only be modified + // by EFS replication. + // + // - REPLICATING – The file system is being used as the destination file system + // in a replication configuration. The file system is read-only and is only + // modified only by EFS replication. + // + // If the replication configuration is deleted, the file system's replication + // overwrite protection is re-enabled and the file system becomes writeable. + ReplicationOverwriteProtection types.ReplicationOverwriteProtection + + noSmithyDocumentSerde +} + +// Describes the protection on a file system. +type UpdateFileSystemProtectionOutput struct { + + // The status of the file system's replication overwrite protection. + // + // - ENABLED – The file system cannot be used as the destination file system in a + // replication configuration. The file system is writeable. Replication overwrite + // protection is ENABLED by default. + // + // - DISABLED – The file system can be used as the destination file system in a + // replication configuration. The file system is read-only and can only be modified + // by EFS replication. + // + // - REPLICATING – The file system is being used as the destination file system + // in a replication configuration. The file system is read-only and is modified + // only by EFS replication. + // + // If the replication configuration is deleted, the file system's replication + // overwrite protection is re-enabled, the file system becomes writeable. + ReplicationOverwriteProtection types.ReplicationOverwriteProtection + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateFileSystemProtectionMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateFileSystemProtection{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateFileSystemProtection{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateFileSystemProtection"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); 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 = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addCredentialSource(stack, options); err != nil { + return err + } + if err = addOpUpdateFileSystemProtectionValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateFileSystemProtection(options.Region), middleware.Before); err != nil { + return err + } + if err = 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 = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateFileSystemProtection(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateFileSystemProtection", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/auth.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/auth.go new file mode 100644 index 0000000000..3acaeec739 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/auth.go @@ -0,0 +1,313 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + smithy "github.com/aws/smithy-go" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { + params.Region = options.Region +} + +type setLegacyContextSigningOptionsMiddleware struct { +} + +func (*setLegacyContextSigningOptionsMiddleware) ID() string { + return "setLegacyContextSigningOptions" +} + +func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + rscheme := getResolvedAuthScheme(ctx) + schemeID := rscheme.Scheme.SchemeID() + + if sn := awsmiddleware.GetSigningName(ctx); sn != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) + } + } + + if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { + if schemeID == "aws.auth#sigv4" { + smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) + } else if schemeID == "aws.auth#sigv4a" { + smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) + } + } + + return next.HandleFinalize(ctx, in) +} + +func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { + return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) +} + +type withAnonymous struct { + resolver AuthSchemeResolver +} + +var _ AuthSchemeResolver = (*withAnonymous)(nil) + +func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + opts, err := v.resolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return nil, err + } + + opts = append(opts, &smithyauth.Option{ + SchemeID: smithyauth.SchemeIDAnonymous, + }) + return opts, nil +} + +func wrapWithAnonymousAuth(options *Options) { + if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { + return + } + + options.AuthSchemeResolver = &withAnonymous{ + resolver: options.AuthSchemeResolver, + } +} + +// AuthResolverParameters contains the set of inputs necessary for auth scheme +// resolution. +type AuthResolverParameters struct { + // The name of the operation being invoked. + Operation string + + // The region in which the operation is being invoked. + Region string +} + +func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { + params := &AuthResolverParameters{ + Operation: operation, + } + + bindAuthParamsRegion(ctx, params, input, options) + + return params +} + +// AuthSchemeResolver returns a set of possible authentication options for an +// operation. +type AuthSchemeResolver interface { + ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) +} + +type defaultAuthSchemeResolver struct{} + +var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) + +func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { + if overrides, ok := operationAuthOptions[params.Operation]; ok { + return overrides(params), nil + } + return serviceAuthOptions(params), nil +} + +var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} + +func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { + return []*smithyauth.Option{ + { + SchemeID: smithyauth.SchemeIDSigV4, + SignerProperties: func() smithy.Properties { + var props smithy.Properties + smithyhttp.SetSigV4SigningName(&props, "elasticfilesystem") + smithyhttp.SetSigV4SigningRegion(&props, params.Region) + return props + }(), + }, + } +} + +type resolveAuthSchemeMiddleware struct { + operation string + options Options +} + +func (*resolveAuthSchemeMiddleware) ID() string { + return "ResolveAuthScheme" +} + +func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveAuthScheme") + defer span.End() + + params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) + options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) + if err != nil { + return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) + } + + scheme, ok := m.selectScheme(options) + if !ok { + return out, metadata, fmt.Errorf("could not select an auth scheme") + } + + ctx = setResolvedAuthScheme(ctx, scheme) + + span.SetProperty("auth.scheme_id", scheme.Scheme.SchemeID()) + span.End() + return next.HandleFinalize(ctx, in) +} + +func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { + for _, option := range options { + if option.SchemeID == smithyauth.SchemeIDAnonymous { + return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true + } + + for _, scheme := range m.options.AuthSchemes { + if scheme.SchemeID() != option.SchemeID { + continue + } + + if scheme.IdentityResolver(m.options) != nil { + return newResolvedAuthScheme(scheme, option), true + } + } + } + + return nil, false +} + +type resolvedAuthSchemeKey struct{} + +type resolvedAuthScheme struct { + Scheme smithyhttp.AuthScheme + IdentityProperties smithy.Properties + SignerProperties smithy.Properties +} + +func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { + return &resolvedAuthScheme{ + Scheme: scheme, + IdentityProperties: option.IdentityProperties, + SignerProperties: option.SignerProperties, + } +} + +func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { + return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) +} + +func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { + v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) + return v +} + +type getIdentityMiddleware struct { + options Options +} + +func (*getIdentityMiddleware) ID() string { + return "GetIdentity" +} + +func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + innerCtx, span := tracing.StartSpan(ctx, "GetIdentity") + defer span.End() + + rscheme := getResolvedAuthScheme(innerCtx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + resolver := rscheme.Scheme.IdentityResolver(m.options) + if resolver == nil { + return out, metadata, fmt.Errorf("no identity resolver") + } + + identity, err := timeOperationMetric(ctx, "client.call.resolve_identity_duration", + func() (smithyauth.Identity, error) { + return resolver.GetIdentity(innerCtx, rscheme.IdentityProperties) + }, + func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("get identity: %w", err) + } + + ctx = setIdentity(ctx, identity) + + span.End() + return next.HandleFinalize(ctx, in) +} + +type identityKey struct{} + +func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { + return middleware.WithStackValue(ctx, identityKey{}, identity) +} + +func getIdentity(ctx context.Context) smithyauth.Identity { + v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) + return v +} + +type signRequestMiddleware struct { + options Options +} + +func (*signRequestMiddleware) ID() string { + return "Signing" +} + +func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "SignRequest") + defer span.End() + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + identity := getIdentity(ctx) + if identity == nil { + return out, metadata, fmt.Errorf("no identity") + } + + signer := rscheme.Scheme.Signer() + if signer == nil { + return out, metadata, fmt.Errorf("no signer") + } + + _, err = timeOperationMetric(ctx, "client.call.signing_duration", func() (any, error) { + return nil, signer.SignRequest(ctx, req, identity, rscheme.SignerProperties) + }, func(o *metrics.RecordMetricOptions) { + o.Properties.Set("auth.scheme_id", rscheme.Scheme.SchemeID()) + }) + if err != nil { + return out, metadata, fmt.Errorf("sign request: %w", err) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/deserializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/deserializers.go new file mode 100644 index 0000000000..2710bc40a6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/deserializers.go @@ -0,0 +1,9474 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "bytes" + "context" + "encoding/json" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + smithy "github.com/aws/smithy-go" + smithyio "github.com/aws/smithy-go/io" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + smithytime "github.com/aws/smithy-go/time" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "io" + "io/ioutil" + "math" + "strings" + "time" +) + +func deserializeS3Expires(v string) (*time.Time, error) { + t, err := smithytime.ParseHTTPDate(v) + if err != nil { + return nil, nil + } + return &t, nil +} + +type awsRestjson1_deserializeOpCreateAccessPoint struct { +} + +func (*awsRestjson1_deserializeOpCreateAccessPoint) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateAccessPoint) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorCreateAccessPoint(response, &metadata) + } + output := &CreateAccessPointOutput{} + 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_deserializeOpDocumentCreateAccessPointOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateAccessPoint(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("AccessPointAlreadyExists", errorCode): + return awsRestjson1_deserializeErrorAccessPointAlreadyExists(response, errorBody) + + case strings.EqualFold("AccessPointLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorAccessPointLimitExceeded(response, errorBody) + + case strings.EqualFold("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("IncorrectFileSystemLifeCycleState", errorCode): + return awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateAccessPointOutput(v **CreateAccessPointOutput, 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 *CreateAccessPointOutput + if *v == nil { + sv = &CreateAccessPointOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessPointArn to be of type string, got %T instead", value) + } + sv.AccessPointArn = ptr.String(jtv) + } + + case "AccessPointId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessPointId to be of type string, got %T instead", value) + } + sv.AccessPointId = ptr.String(jtv) + } + + case "ClientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClientToken to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "LifeCycleState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LifeCycleState to be of type string, got %T instead", value) + } + sv.LifeCycleState = types.LifeCycleState(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "PosixUser": + if err := awsRestjson1_deserializeDocumentPosixUser(&sv.PosixUser, value); err != nil { + return err + } + + case "RootDirectory": + if err := awsRestjson1_deserializeDocumentRootDirectory(&sv.RootDirectory, value); err != nil { + return err + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateFileSystem struct { +} + +func (*awsRestjson1_deserializeOpCreateFileSystem) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateFileSystem) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorCreateFileSystem(response, &metadata) + } + output := &CreateFileSystemOutput{} + 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_deserializeOpDocumentCreateFileSystemOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateFileSystem(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemAlreadyExists", errorCode): + return awsRestjson1_deserializeErrorFileSystemAlreadyExists(response, errorBody) + + case strings.EqualFold("FileSystemLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorFileSystemLimitExceeded(response, errorBody) + + case strings.EqualFold("InsufficientThroughputCapacity", errorCode): + return awsRestjson1_deserializeErrorInsufficientThroughputCapacity(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ThroughputLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorThroughputLimitExceeded(response, errorBody) + + case strings.EqualFold("UnsupportedAvailabilityZone", errorCode): + return awsRestjson1_deserializeErrorUnsupportedAvailabilityZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateFileSystemOutput(v **CreateFileSystemOutput, 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 *CreateFileSystemOutput + if *v == nil { + sv = &CreateFileSystemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityZoneId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneId to be of type string, got %T instead", value) + } + sv.AvailabilityZoneId = ptr.String(jtv) + } + + case "AvailabilityZoneName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneName to be of type string, got %T instead", value) + } + sv.AvailabilityZoneName = ptr.String(jtv) + } + + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "CreationToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreationToken to be of type string, got %T instead", value) + } + sv.CreationToken = ptr.String(jtv) + } + + case "Encrypted": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Encrypted to be of type *bool, got %T instead", value) + } + sv.Encrypted = ptr.Bool(jtv) + } + + case "FileSystemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemArn to be of type string, got %T instead", value) + } + sv.FileSystemArn = ptr.String(jtv) + } + + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "FileSystemProtection": + if err := awsRestjson1_deserializeDocumentFileSystemProtectionDescription(&sv.FileSystemProtection, value); err != nil { + return err + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "LifeCycleState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LifeCycleState to be of type string, got %T instead", value) + } + sv.LifeCycleState = types.LifeCycleState(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NumberOfMountTargets": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MountTargetCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumberOfMountTargets = int32(i64) + } + + case "OwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "PerformanceMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PerformanceMode to be of type string, got %T instead", value) + } + sv.PerformanceMode = types.PerformanceMode(jtv) + } + + case "ProvisionedThroughputInMibps": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ProvisionedThroughputInMibps = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ProvisionedThroughputInMibps = ptr.Float64(f64) + + default: + return fmt.Errorf("expected ProvisionedThroughputInMibps to be a JSON Number, got %T instead", value) + + } + } + + case "SizeInBytes": + if err := awsRestjson1_deserializeDocumentFileSystemSize(&sv.SizeInBytes, value); err != nil { + return err + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "ThroughputMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ThroughputMode to be of type string, got %T instead", value) + } + sv.ThroughputMode = types.ThroughputMode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateMountTarget struct { +} + +func (*awsRestjson1_deserializeOpCreateMountTarget) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateMountTarget) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorCreateMountTarget(response, &metadata) + } + output := &CreateMountTargetOutput{} + 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_deserializeOpDocumentCreateMountTargetOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateMountTarget(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("AvailabilityZonesMismatch", errorCode): + return awsRestjson1_deserializeErrorAvailabilityZonesMismatch(response, errorBody) + + case strings.EqualFold("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("IncorrectFileSystemLifeCycleState", errorCode): + return awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("IpAddressInUse", errorCode): + return awsRestjson1_deserializeErrorIpAddressInUse(response, errorBody) + + case strings.EqualFold("MountTargetConflict", errorCode): + return awsRestjson1_deserializeErrorMountTargetConflict(response, errorBody) + + case strings.EqualFold("NetworkInterfaceLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorNetworkInterfaceLimitExceeded(response, errorBody) + + case strings.EqualFold("NoFreeAddressesInSubnet", errorCode): + return awsRestjson1_deserializeErrorNoFreeAddressesInSubnet(response, errorBody) + + case strings.EqualFold("SecurityGroupLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorSecurityGroupLimitExceeded(response, errorBody) + + case strings.EqualFold("SecurityGroupNotFound", errorCode): + return awsRestjson1_deserializeErrorSecurityGroupNotFound(response, errorBody) + + case strings.EqualFold("SubnetNotFound", errorCode): + return awsRestjson1_deserializeErrorSubnetNotFound(response, errorBody) + + case strings.EqualFold("UnsupportedAvailabilityZone", errorCode): + return awsRestjson1_deserializeErrorUnsupportedAvailabilityZone(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateMountTargetOutput(v **CreateMountTargetOutput, 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 *CreateMountTargetOutput + if *v == nil { + sv = &CreateMountTargetOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityZoneId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneId to be of type string, got %T instead", value) + } + sv.AvailabilityZoneId = ptr.String(jtv) + } + + case "AvailabilityZoneName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneName to be of type string, got %T instead", value) + } + sv.AvailabilityZoneName = ptr.String(jtv) + } + + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "IpAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IpAddress to be of type string, got %T instead", value) + } + sv.IpAddress = ptr.String(jtv) + } + + case "Ipv6Address": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Ipv6Address to be of type string, got %T instead", value) + } + sv.Ipv6Address = ptr.String(jtv) + } + + case "LifeCycleState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LifeCycleState to be of type string, got %T instead", value) + } + sv.LifeCycleState = types.LifeCycleState(jtv) + } + + case "MountTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MountTargetId to be of type string, got %T instead", value) + } + sv.MountTargetId = ptr.String(jtv) + } + + case "NetworkInterfaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkInterfaceId to be of type string, got %T instead", value) + } + sv.NetworkInterfaceId = ptr.String(jtv) + } + + case "OwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "SubnetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubnetId to be of type string, got %T instead", value) + } + sv.SubnetId = ptr.String(jtv) + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateReplicationConfiguration struct { +} + +func (*awsRestjson1_deserializeOpCreateReplicationConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateReplicationConfiguration) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorCreateReplicationConfiguration(response, &metadata) + } + output := &CreateReplicationConfigurationOutput{} + 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_deserializeOpDocumentCreateReplicationConfigurationOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateReplicationConfiguration(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("FileSystemLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorFileSystemLimitExceeded(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("IncorrectFileSystemLifeCycleState", errorCode): + return awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response, errorBody) + + case strings.EqualFold("InsufficientThroughputCapacity", errorCode): + return awsRestjson1_deserializeErrorInsufficientThroughputCapacity(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ReplicationNotFound", errorCode): + return awsRestjson1_deserializeErrorReplicationNotFound(response, errorBody) + + case strings.EqualFold("ThroughputLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorThroughputLimitExceeded(response, errorBody) + + case strings.EqualFold("UnsupportedAvailabilityZone", errorCode): + return awsRestjson1_deserializeErrorUnsupportedAvailabilityZone(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateReplicationConfigurationOutput(v **CreateReplicationConfigurationOutput, 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 *CreateReplicationConfigurationOutput + if *v == nil { + sv = &CreateReplicationConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Destinations": + if err := awsRestjson1_deserializeDocumentDestinations(&sv.Destinations, value); err != nil { + return err + } + + case "OriginalSourceFileSystemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemArn to be of type string, got %T instead", value) + } + sv.OriginalSourceFileSystemArn = ptr.String(jtv) + } + + case "SourceFileSystemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemArn to be of type string, got %T instead", value) + } + sv.SourceFileSystemArn = ptr.String(jtv) + } + + case "SourceFileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.SourceFileSystemId = ptr.String(jtv) + } + + case "SourceFileSystemOwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.SourceFileSystemOwnerId = ptr.String(jtv) + } + + case "SourceFileSystemRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegionName to be of type string, got %T instead", value) + } + sv.SourceFileSystemRegion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpCreateTags struct { +} + +func (*awsRestjson1_deserializeOpCreateTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateTags) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorCreateTags(response, &metadata) + } + output := &CreateTagsOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateTags(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteAccessPoint struct { +} + +func (*awsRestjson1_deserializeOpDeleteAccessPoint) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteAccessPoint) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDeleteAccessPoint(response, &metadata) + } + output := &DeleteAccessPointOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteAccessPoint(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("AccessPointNotFound", errorCode): + return awsRestjson1_deserializeErrorAccessPointNotFound(response, errorBody) + + case strings.EqualFold("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteFileSystem struct { +} + +func (*awsRestjson1_deserializeOpDeleteFileSystem) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFileSystem) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDeleteFileSystem(response, &metadata) + } + output := &DeleteFileSystemOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteFileSystem(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemInUse", errorCode): + return awsRestjson1_deserializeErrorFileSystemInUse(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteFileSystemPolicy struct { +} + +func (*awsRestjson1_deserializeOpDeleteFileSystemPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteFileSystemPolicy) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDeleteFileSystemPolicy(response, &metadata) + } + output := &DeleteFileSystemPolicyOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteFileSystemPolicy(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("IncorrectFileSystemLifeCycleState", errorCode): + return awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteMountTarget struct { +} + +func (*awsRestjson1_deserializeOpDeleteMountTarget) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteMountTarget) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDeleteMountTarget(response, &metadata) + } + output := &DeleteMountTargetOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteMountTarget(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("DependencyTimeout", errorCode): + return awsRestjson1_deserializeErrorDependencyTimeout(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("MountTargetNotFound", errorCode): + return awsRestjson1_deserializeErrorMountTargetNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteReplicationConfiguration struct { +} + +func (*awsRestjson1_deserializeOpDeleteReplicationConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteReplicationConfiguration) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDeleteReplicationConfiguration(response, &metadata) + } + output := &DeleteReplicationConfigurationOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteReplicationConfiguration(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ReplicationNotFound", errorCode): + return awsRestjson1_deserializeErrorReplicationNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDeleteTags struct { +} + +func (*awsRestjson1_deserializeOpDeleteTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteTags) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDeleteTags(response, &metadata) + } + output := &DeleteTagsOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteTags(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpDescribeAccessPoints struct { +} + +func (*awsRestjson1_deserializeOpDescribeAccessPoints) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeAccessPoints) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeAccessPoints(response, &metadata) + } + output := &DescribeAccessPointsOutput{} + 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_deserializeOpDocumentDescribeAccessPointsOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeAccessPoints(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("AccessPointNotFound", errorCode): + return awsRestjson1_deserializeErrorAccessPointNotFound(response, errorBody) + + case strings.EqualFold("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeAccessPointsOutput(v **DescribeAccessPointsOutput, 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 *DescribeAccessPointsOutput + if *v == nil { + sv = &DescribeAccessPointsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPoints": + if err := awsRestjson1_deserializeDocumentAccessPointDescriptions(&sv.AccessPoints, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeAccountPreferences struct { +} + +func (*awsRestjson1_deserializeOpDescribeAccountPreferences) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeAccountPreferences) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeAccountPreferences(response, &metadata) + } + output := &DescribeAccountPreferencesOutput{} + 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_deserializeOpDocumentDescribeAccountPreferencesOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeAccountPreferences(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("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeAccountPreferencesOutput(v **DescribeAccountPreferencesOutput, 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 *DescribeAccountPreferencesOutput + if *v == nil { + sv = &DescribeAccountPreferencesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "ResourceIdPreference": + if err := awsRestjson1_deserializeDocumentResourceIdPreference(&sv.ResourceIdPreference, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeBackupPolicy struct { +} + +func (*awsRestjson1_deserializeOpDescribeBackupPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeBackupPolicy) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeBackupPolicy(response, &metadata) + } + output := &DescribeBackupPolicyOutput{} + 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_deserializeOpDocumentDescribeBackupPolicyOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeBackupPolicy(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("PolicyNotFound", errorCode): + return awsRestjson1_deserializeErrorPolicyNotFound(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeBackupPolicyOutput(v **DescribeBackupPolicyOutput, 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 *DescribeBackupPolicyOutput + if *v == nil { + sv = &DescribeBackupPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BackupPolicy": + if err := awsRestjson1_deserializeDocumentBackupPolicy(&sv.BackupPolicy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeFileSystemPolicy struct { +} + +func (*awsRestjson1_deserializeOpDescribeFileSystemPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeFileSystemPolicy) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeFileSystemPolicy(response, &metadata) + } + output := &DescribeFileSystemPolicyOutput{} + 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_deserializeOpDocumentDescribeFileSystemPolicyOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeFileSystemPolicy(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("PolicyNotFound", errorCode): + return awsRestjson1_deserializeErrorPolicyNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeFileSystemPolicyOutput(v **DescribeFileSystemPolicyOutput, 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 *DescribeFileSystemPolicyOutput + if *v == nil { + sv = &DescribeFileSystemPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "Policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Policy to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeFileSystems struct { +} + +func (*awsRestjson1_deserializeOpDescribeFileSystems) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeFileSystems) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeFileSystems(response, &metadata) + } + output := &DescribeFileSystemsOutput{} + 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_deserializeOpDocumentDescribeFileSystemsOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeFileSystems(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeFileSystemsOutput(v **DescribeFileSystemsOutput, 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 *DescribeFileSystemsOutput + if *v == nil { + sv = &DescribeFileSystemsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FileSystems": + if err := awsRestjson1_deserializeDocumentFileSystemDescriptions(&sv.FileSystems, value); err != nil { + return err + } + + case "Marker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Marker to be of type string, got %T instead", value) + } + sv.Marker = ptr.String(jtv) + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Marker to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeLifecycleConfiguration struct { +} + +func (*awsRestjson1_deserializeOpDescribeLifecycleConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeLifecycleConfiguration) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeLifecycleConfiguration(response, &metadata) + } + output := &DescribeLifecycleConfigurationOutput{} + 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_deserializeOpDocumentDescribeLifecycleConfigurationOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeLifecycleConfiguration(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeLifecycleConfigurationOutput(v **DescribeLifecycleConfigurationOutput, 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 *DescribeLifecycleConfigurationOutput + if *v == nil { + sv = &DescribeLifecycleConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LifecyclePolicies": + if err := awsRestjson1_deserializeDocumentLifecyclePolicies(&sv.LifecyclePolicies, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeMountTargets struct { +} + +func (*awsRestjson1_deserializeOpDescribeMountTargets) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeMountTargets) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeMountTargets(response, &metadata) + } + output := &DescribeMountTargetsOutput{} + 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_deserializeOpDocumentDescribeMountTargetsOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeMountTargets(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("AccessPointNotFound", errorCode): + return awsRestjson1_deserializeErrorAccessPointNotFound(response, errorBody) + + case strings.EqualFold("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("MountTargetNotFound", errorCode): + return awsRestjson1_deserializeErrorMountTargetNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeMountTargetsOutput(v **DescribeMountTargetsOutput, 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 *DescribeMountTargetsOutput + if *v == nil { + sv = &DescribeMountTargetsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Marker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Marker to be of type string, got %T instead", value) + } + sv.Marker = ptr.String(jtv) + } + + case "MountTargets": + if err := awsRestjson1_deserializeDocumentMountTargetDescriptions(&sv.MountTargets, value); err != nil { + return err + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Marker to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeMountTargetSecurityGroups struct { +} + +func (*awsRestjson1_deserializeOpDescribeMountTargetSecurityGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeMountTargetSecurityGroups) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeMountTargetSecurityGroups(response, &metadata) + } + output := &DescribeMountTargetSecurityGroupsOutput{} + 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_deserializeOpDocumentDescribeMountTargetSecurityGroupsOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeMountTargetSecurityGroups(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("IncorrectMountTargetState", errorCode): + return awsRestjson1_deserializeErrorIncorrectMountTargetState(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("MountTargetNotFound", errorCode): + return awsRestjson1_deserializeErrorMountTargetNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeMountTargetSecurityGroupsOutput(v **DescribeMountTargetSecurityGroupsOutput, 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 *DescribeMountTargetSecurityGroupsOutput + if *v == nil { + sv = &DescribeMountTargetSecurityGroupsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "SecurityGroups": + if err := awsRestjson1_deserializeDocumentSecurityGroups(&sv.SecurityGroups, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeReplicationConfigurations struct { +} + +func (*awsRestjson1_deserializeOpDescribeReplicationConfigurations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeReplicationConfigurations) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeReplicationConfigurations(response, &metadata) + } + output := &DescribeReplicationConfigurationsOutput{} + 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_deserializeOpDocumentDescribeReplicationConfigurationsOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeReplicationConfigurations(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ReplicationNotFound", errorCode): + return awsRestjson1_deserializeErrorReplicationNotFound(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeReplicationConfigurationsOutput(v **DescribeReplicationConfigurationsOutput, 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 *DescribeReplicationConfigurationsOutput + if *v == nil { + sv = &DescribeReplicationConfigurationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Replications": + if err := awsRestjson1_deserializeDocumentReplicationConfigurationDescriptions(&sv.Replications, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeTags struct { +} + +func (*awsRestjson1_deserializeOpDescribeTags) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeTags) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorDescribeTags(response, &metadata) + } + output := &DescribeTagsOutput{} + 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_deserializeOpDocumentDescribeTagsOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeTags(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeTagsOutput(v **DescribeTagsOutput, 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 *DescribeTagsOutput + if *v == nil { + sv = &DescribeTagsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Marker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Marker to be of type string, got %T instead", value) + } + sv.Marker = ptr.String(jtv) + } + + case "NextMarker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Marker to be of type string, got %T instead", value) + } + sv.NextMarker = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + 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_deserializeOpDocumentListTagsForResourceOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_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)} + } + 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("AccessPointNotFound", errorCode): + return awsRestjson1_deserializeErrorAccessPointNotFound(response, errorBody) + + case strings.EqualFold("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, 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 *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Token to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpModifyMountTargetSecurityGroups struct { +} + +func (*awsRestjson1_deserializeOpModifyMountTargetSecurityGroups) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpModifyMountTargetSecurityGroups) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorModifyMountTargetSecurityGroups(response, &metadata) + } + output := &ModifyMountTargetSecurityGroupsOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorModifyMountTargetSecurityGroups(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("IncorrectMountTargetState", errorCode): + return awsRestjson1_deserializeErrorIncorrectMountTargetState(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("MountTargetNotFound", errorCode): + return awsRestjson1_deserializeErrorMountTargetNotFound(response, errorBody) + + case strings.EqualFold("SecurityGroupLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorSecurityGroupLimitExceeded(response, errorBody) + + case strings.EqualFold("SecurityGroupNotFound", errorCode): + return awsRestjson1_deserializeErrorSecurityGroupNotFound(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpPutAccountPreferences struct { +} + +func (*awsRestjson1_deserializeOpPutAccountPreferences) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutAccountPreferences) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorPutAccountPreferences(response, &metadata) + } + output := &PutAccountPreferencesOutput{} + 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_deserializeOpDocumentPutAccountPreferencesOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutAccountPreferences(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutAccountPreferencesOutput(v **PutAccountPreferencesOutput, 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 *PutAccountPreferencesOutput + if *v == nil { + sv = &PutAccountPreferencesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ResourceIdPreference": + if err := awsRestjson1_deserializeDocumentResourceIdPreference(&sv.ResourceIdPreference, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutBackupPolicy struct { +} + +func (*awsRestjson1_deserializeOpPutBackupPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutBackupPolicy) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorPutBackupPolicy(response, &metadata) + } + output := &PutBackupPolicyOutput{} + 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_deserializeOpDocumentPutBackupPolicyOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutBackupPolicy(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("IncorrectFileSystemLifeCycleState", errorCode): + return awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutBackupPolicyOutput(v **PutBackupPolicyOutput, 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 *PutBackupPolicyOutput + if *v == nil { + sv = &PutBackupPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "BackupPolicy": + if err := awsRestjson1_deserializeDocumentBackupPolicy(&sv.BackupPolicy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutFileSystemPolicy struct { +} + +func (*awsRestjson1_deserializeOpPutFileSystemPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutFileSystemPolicy) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorPutFileSystemPolicy(response, &metadata) + } + output := &PutFileSystemPolicyOutput{} + 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_deserializeOpDocumentPutFileSystemPolicyOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutFileSystemPolicy(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("IncorrectFileSystemLifeCycleState", errorCode): + return awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("InvalidPolicyException", errorCode): + return awsRestjson1_deserializeErrorInvalidPolicyException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutFileSystemPolicyOutput(v **PutFileSystemPolicyOutput, 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 *PutFileSystemPolicyOutput + if *v == nil { + sv = &PutFileSystemPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "Policy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Policy to be of type string, got %T instead", value) + } + sv.Policy = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutLifecycleConfiguration struct { +} + +func (*awsRestjson1_deserializeOpPutLifecycleConfiguration) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutLifecycleConfiguration) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorPutLifecycleConfiguration(response, &metadata) + } + output := &PutLifecycleConfigurationOutput{} + 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_deserializeOpDocumentPutLifecycleConfigurationOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorPutLifecycleConfiguration(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("IncorrectFileSystemLifeCycleState", errorCode): + return awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutLifecycleConfigurationOutput(v **PutLifecycleConfigurationOutput, 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 *PutLifecycleConfigurationOutput + if *v == nil { + sv = &PutLifecycleConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "LifecyclePolicies": + if err := awsRestjson1_deserializeDocumentLifecyclePolicies(&sv.LifecyclePolicies, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_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)} + } + 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("AccessPointNotFound", errorCode): + return awsRestjson1_deserializeErrorAccessPointNotFound(response, errorBody) + + case strings.EqualFold("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_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) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to discard response body, %w", err), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_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)} + } + 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("AccessPointNotFound", errorCode): + return awsRestjson1_deserializeErrorAccessPointNotFound(response, errorBody) + + case strings.EqualFold("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateFileSystem struct { +} + +func (*awsRestjson1_deserializeOpUpdateFileSystem) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFileSystem) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorUpdateFileSystem(response, &metadata) + } + output := &UpdateFileSystemOutput{} + 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_deserializeOpDocumentUpdateFileSystemOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFileSystem(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("IncorrectFileSystemLifeCycleState", errorCode): + return awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response, errorBody) + + case strings.EqualFold("InsufficientThroughputCapacity", errorCode): + return awsRestjson1_deserializeErrorInsufficientThroughputCapacity(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ThroughputLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorThroughputLimitExceeded(response, errorBody) + + case strings.EqualFold("TooManyRequests", errorCode): + return awsRestjson1_deserializeErrorTooManyRequests(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFileSystemOutput(v **UpdateFileSystemOutput, 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 *UpdateFileSystemOutput + if *v == nil { + sv = &UpdateFileSystemOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityZoneId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneId to be of type string, got %T instead", value) + } + sv.AvailabilityZoneId = ptr.String(jtv) + } + + case "AvailabilityZoneName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneName to be of type string, got %T instead", value) + } + sv.AvailabilityZoneName = ptr.String(jtv) + } + + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "CreationToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreationToken to be of type string, got %T instead", value) + } + sv.CreationToken = ptr.String(jtv) + } + + case "Encrypted": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Encrypted to be of type *bool, got %T instead", value) + } + sv.Encrypted = ptr.Bool(jtv) + } + + case "FileSystemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemArn to be of type string, got %T instead", value) + } + sv.FileSystemArn = ptr.String(jtv) + } + + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "FileSystemProtection": + if err := awsRestjson1_deserializeDocumentFileSystemProtectionDescription(&sv.FileSystemProtection, value); err != nil { + return err + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "LifeCycleState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LifeCycleState to be of type string, got %T instead", value) + } + sv.LifeCycleState = types.LifeCycleState(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NumberOfMountTargets": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MountTargetCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumberOfMountTargets = int32(i64) + } + + case "OwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "PerformanceMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PerformanceMode to be of type string, got %T instead", value) + } + sv.PerformanceMode = types.PerformanceMode(jtv) + } + + case "ProvisionedThroughputInMibps": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ProvisionedThroughputInMibps = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ProvisionedThroughputInMibps = ptr.Float64(f64) + + default: + return fmt.Errorf("expected ProvisionedThroughputInMibps to be a JSON Number, got %T instead", value) + + } + } + + case "SizeInBytes": + if err := awsRestjson1_deserializeDocumentFileSystemSize(&sv.SizeInBytes, value); err != nil { + return err + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "ThroughputMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ThroughputMode to be of type string, got %T instead", value) + } + sv.ThroughputMode = types.ThroughputMode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFileSystemProtection struct { +} + +func (*awsRestjson1_deserializeOpUpdateFileSystemProtection) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFileSystemProtection) 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 + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + 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_deserializeOpErrorUpdateFileSystemProtection(response, &metadata) + } + output := &UpdateFileSystemProtectionOutput{} + 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_deserializeOpDocumentUpdateFileSystemProtectionOutput(&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(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFileSystemProtection(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("BadRequest", errorCode): + return awsRestjson1_deserializeErrorBadRequest(response, errorBody) + + case strings.EqualFold("FileSystemNotFound", errorCode): + return awsRestjson1_deserializeErrorFileSystemNotFound(response, errorBody) + + case strings.EqualFold("IncorrectFileSystemLifeCycleState", errorCode): + return awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response, errorBody) + + case strings.EqualFold("InsufficientThroughputCapacity", errorCode): + return awsRestjson1_deserializeErrorInsufficientThroughputCapacity(response, errorBody) + + case strings.EqualFold("InternalServerError", errorCode): + return awsRestjson1_deserializeErrorInternalServerError(response, errorBody) + + case strings.EqualFold("ReplicationAlreadyExists", errorCode): + return awsRestjson1_deserializeErrorReplicationAlreadyExists(response, errorBody) + + case strings.EqualFold("ThroughputLimitExceeded", errorCode): + return awsRestjson1_deserializeErrorThroughputLimitExceeded(response, errorBody) + + case strings.EqualFold("TooManyRequests", errorCode): + return awsRestjson1_deserializeErrorTooManyRequests(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFileSystemProtectionOutput(v **UpdateFileSystemProtectionOutput, 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 *UpdateFileSystemProtectionOutput + if *v == nil { + sv = &UpdateFileSystemProtectionOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ReplicationOverwriteProtection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationOverwriteProtection to be of type string, got %T instead", value) + } + sv.ReplicationOverwriteProtection = types.ReplicationOverwriteProtection(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessPointAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessPointAlreadyExists{} + 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 + } + + err := awsRestjson1_deserializeDocumentAccessPointAlreadyExists(&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 awsRestjson1_deserializeErrorAccessPointLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessPointLimitExceeded{} + 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 + } + + err := awsRestjson1_deserializeDocumentAccessPointLimitExceeded(&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 awsRestjson1_deserializeErrorAccessPointNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessPointNotFound{} + 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 + } + + err := awsRestjson1_deserializeDocumentAccessPointNotFound(&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 awsRestjson1_deserializeErrorAvailabilityZonesMismatch(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AvailabilityZonesMismatch{} + 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 + } + + err := awsRestjson1_deserializeDocumentAvailabilityZonesMismatch(&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 awsRestjson1_deserializeErrorBadRequest(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.BadRequest{} + 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 + } + + err := awsRestjson1_deserializeDocumentBadRequest(&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 awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} + 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 + } + + err := awsRestjson1_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 awsRestjson1_deserializeErrorDependencyTimeout(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.DependencyTimeout{} + 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 + } + + err := awsRestjson1_deserializeDocumentDependencyTimeout(&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 awsRestjson1_deserializeErrorFileSystemAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FileSystemAlreadyExists{} + 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 + } + + err := awsRestjson1_deserializeDocumentFileSystemAlreadyExists(&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 awsRestjson1_deserializeErrorFileSystemInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FileSystemInUse{} + 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 + } + + err := awsRestjson1_deserializeDocumentFileSystemInUse(&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 awsRestjson1_deserializeErrorFileSystemLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FileSystemLimitExceeded{} + 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 + } + + err := awsRestjson1_deserializeDocumentFileSystemLimitExceeded(&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 awsRestjson1_deserializeErrorFileSystemNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.FileSystemNotFound{} + 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 + } + + err := awsRestjson1_deserializeDocumentFileSystemNotFound(&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 awsRestjson1_deserializeErrorIncorrectFileSystemLifeCycleState(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IncorrectFileSystemLifeCycleState{} + 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 + } + + err := awsRestjson1_deserializeDocumentIncorrectFileSystemLifeCycleState(&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 awsRestjson1_deserializeErrorIncorrectMountTargetState(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IncorrectMountTargetState{} + 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 + } + + err := awsRestjson1_deserializeDocumentIncorrectMountTargetState(&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 awsRestjson1_deserializeErrorInsufficientThroughputCapacity(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InsufficientThroughputCapacity{} + 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 + } + + err := awsRestjson1_deserializeDocumentInsufficientThroughputCapacity(&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 awsRestjson1_deserializeErrorInternalServerError(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerError{} + 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 + } + + err := awsRestjson1_deserializeDocumentInternalServerError(&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 awsRestjson1_deserializeErrorInvalidPolicyException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InvalidPolicyException{} + 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 + } + + err := awsRestjson1_deserializeDocumentInvalidPolicyException(&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 awsRestjson1_deserializeErrorIpAddressInUse(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.IpAddressInUse{} + 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 + } + + err := awsRestjson1_deserializeDocumentIpAddressInUse(&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 awsRestjson1_deserializeErrorMountTargetConflict(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MountTargetConflict{} + 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 + } + + err := awsRestjson1_deserializeDocumentMountTargetConflict(&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 awsRestjson1_deserializeErrorMountTargetNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.MountTargetNotFound{} + 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 + } + + err := awsRestjson1_deserializeDocumentMountTargetNotFound(&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 awsRestjson1_deserializeErrorNetworkInterfaceLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NetworkInterfaceLimitExceeded{} + 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 + } + + err := awsRestjson1_deserializeDocumentNetworkInterfaceLimitExceeded(&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 awsRestjson1_deserializeErrorNoFreeAddressesInSubnet(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NoFreeAddressesInSubnet{} + 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 + } + + err := awsRestjson1_deserializeDocumentNoFreeAddressesInSubnet(&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 awsRestjson1_deserializeErrorPolicyNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.PolicyNotFound{} + 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 + } + + err := awsRestjson1_deserializeDocumentPolicyNotFound(&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 awsRestjson1_deserializeErrorReplicationAlreadyExists(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ReplicationAlreadyExists{} + 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 + } + + err := awsRestjson1_deserializeDocumentReplicationAlreadyExists(&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 awsRestjson1_deserializeErrorReplicationNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ReplicationNotFound{} + 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 + } + + err := awsRestjson1_deserializeDocumentReplicationNotFound(&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 awsRestjson1_deserializeErrorSecurityGroupLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.SecurityGroupLimitExceeded{} + 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 + } + + err := awsRestjson1_deserializeDocumentSecurityGroupLimitExceeded(&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 awsRestjson1_deserializeErrorSecurityGroupNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.SecurityGroupNotFound{} + 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 + } + + err := awsRestjson1_deserializeDocumentSecurityGroupNotFound(&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 awsRestjson1_deserializeErrorSubnetNotFound(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.SubnetNotFound{} + 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 + } + + err := awsRestjson1_deserializeDocumentSubnetNotFound(&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 awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + 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 + } + + err := awsRestjson1_deserializeDocumentThrottlingException(&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 awsRestjson1_deserializeErrorThroughputLimitExceeded(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThroughputLimitExceeded{} + 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 + } + + err := awsRestjson1_deserializeDocumentThroughputLimitExceeded(&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 awsRestjson1_deserializeErrorTooManyRequests(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyRequests{} + 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 + } + + err := awsRestjson1_deserializeDocumentTooManyRequests(&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 awsRestjson1_deserializeErrorUnsupportedAvailabilityZone(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnsupportedAvailabilityZone{} + 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 + } + + err := awsRestjson1_deserializeDocumentUnsupportedAvailabilityZone(&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 awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + 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 + } + + err := awsRestjson1_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 awsRestjson1_deserializeDocumentAccessPointAlreadyExists(v **types.AccessPointAlreadyExists, 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.AccessPointAlreadyExists + if *v == nil { + sv = &types.AccessPointAlreadyExists{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPointId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessPointId to be of type string, got %T instead", value) + } + sv.AccessPointId = ptr.String(jtv) + } + + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessPointDescription(v **types.AccessPointDescription, 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.AccessPointDescription + if *v == nil { + sv = &types.AccessPointDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AccessPointArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessPointArn to be of type string, got %T instead", value) + } + sv.AccessPointArn = ptr.String(jtv) + } + + case "AccessPointId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccessPointId to be of type string, got %T instead", value) + } + sv.AccessPointId = ptr.String(jtv) + } + + case "ClientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClientToken to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "LifeCycleState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LifeCycleState to be of type string, got %T instead", value) + } + sv.LifeCycleState = types.LifeCycleState(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Name to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "PosixUser": + if err := awsRestjson1_deserializeDocumentPosixUser(&sv.PosixUser, value); err != nil { + return err + } + + case "RootDirectory": + if err := awsRestjson1_deserializeDocumentRootDirectory(&sv.RootDirectory, value); err != nil { + return err + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessPointDescriptions(v *[]types.AccessPointDescription, 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.AccessPointDescription + if *v == nil { + cv = []types.AccessPointDescription{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AccessPointDescription + destAddr := &col + if err := awsRestjson1_deserializeDocumentAccessPointDescription(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAccessPointLimitExceeded(v **types.AccessPointLimitExceeded, 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.AccessPointLimitExceeded + if *v == nil { + sv = &types.AccessPointLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAccessPointNotFound(v **types.AccessPointNotFound, 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.AccessPointNotFound + if *v == nil { + sv = &types.AccessPointNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAvailabilityZonesMismatch(v **types.AvailabilityZonesMismatch, 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.AvailabilityZonesMismatch + if *v == nil { + sv = &types.AvailabilityZonesMismatch{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBackupPolicy(v **types.BackupPolicy, 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.BackupPolicy + if *v == nil { + sv = &types.BackupPolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = types.Status(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBadRequest(v **types.BadRequest, 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.BadRequest + if *v == nil { + sv = &types.BadRequest{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, 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.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCreationInfo(v **types.CreationInfo, 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.CreationInfo + if *v == nil { + sv = &types.CreationInfo{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OwnerGid": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected OwnerGid to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.OwnerGid = ptr.Int64(i64) + } + + case "OwnerUid": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected OwnerUid to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.OwnerUid = ptr.Int64(i64) + } + + case "Permissions": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Permissions to be of type string, got %T instead", value) + } + sv.Permissions = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDependencyTimeout(v **types.DependencyTimeout, 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.DependencyTimeout + if *v == nil { + sv = &types.DependencyTimeout{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDestination(v **types.Destination, 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.Destination + if *v == nil { + sv = &types.Destination{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "LastReplicatedTimestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.LastReplicatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "OwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "Region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegionName to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "RoleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RoleArn to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationStatus to be of type string, got %T instead", value) + } + sv.Status = types.ReplicationStatus(jtv) + } + + case "StatusMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusMessage to be of type string, got %T instead", value) + } + sv.StatusMessage = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDestinations(v *[]types.Destination, 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.Destination + if *v == nil { + cv = []types.Destination{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Destination + destAddr := &col + if err := awsRestjson1_deserializeDocumentDestination(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemAlreadyExists(v **types.FileSystemAlreadyExists, 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.FileSystemAlreadyExists + if *v == nil { + sv = &types.FileSystemAlreadyExists{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemDescription(v **types.FileSystemDescription, 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.FileSystemDescription + if *v == nil { + sv = &types.FileSystemDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityZoneId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneId to be of type string, got %T instead", value) + } + sv.AvailabilityZoneId = ptr.String(jtv) + } + + case "AvailabilityZoneName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneName to be of type string, got %T instead", value) + } + sv.AvailabilityZoneName = ptr.String(jtv) + } + + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "CreationToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreationToken to be of type string, got %T instead", value) + } + sv.CreationToken = ptr.String(jtv) + } + + case "Encrypted": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Encrypted to be of type *bool, got %T instead", value) + } + sv.Encrypted = ptr.Bool(jtv) + } + + case "FileSystemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemArn to be of type string, got %T instead", value) + } + sv.FileSystemArn = ptr.String(jtv) + } + + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "FileSystemProtection": + if err := awsRestjson1_deserializeDocumentFileSystemProtectionDescription(&sv.FileSystemProtection, value); err != nil { + return err + } + + case "KmsKeyId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KmsKeyId to be of type string, got %T instead", value) + } + sv.KmsKeyId = ptr.String(jtv) + } + + case "LifeCycleState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LifeCycleState to be of type string, got %T instead", value) + } + sv.LifeCycleState = types.LifeCycleState(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "NumberOfMountTargets": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MountTargetCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.NumberOfMountTargets = int32(i64) + } + + case "OwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "PerformanceMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PerformanceMode to be of type string, got %T instead", value) + } + sv.PerformanceMode = types.PerformanceMode(jtv) + } + + case "ProvisionedThroughputInMibps": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ProvisionedThroughputInMibps = ptr.Float64(f64) + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.ProvisionedThroughputInMibps = ptr.Float64(f64) + + default: + return fmt.Errorf("expected ProvisionedThroughputInMibps to be a JSON Number, got %T instead", value) + + } + } + + case "SizeInBytes": + if err := awsRestjson1_deserializeDocumentFileSystemSize(&sv.SizeInBytes, value); err != nil { + return err + } + + case "Tags": + if err := awsRestjson1_deserializeDocumentTags(&sv.Tags, value); err != nil { + return err + } + + case "ThroughputMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ThroughputMode to be of type string, got %T instead", value) + } + sv.ThroughputMode = types.ThroughputMode(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemDescriptions(v *[]types.FileSystemDescription, 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.FileSystemDescription + if *v == nil { + cv = []types.FileSystemDescription{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.FileSystemDescription + destAddr := &col + if err := awsRestjson1_deserializeDocumentFileSystemDescription(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemInUse(v **types.FileSystemInUse, 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.FileSystemInUse + if *v == nil { + sv = &types.FileSystemInUse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemLimitExceeded(v **types.FileSystemLimitExceeded, 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.FileSystemLimitExceeded + if *v == nil { + sv = &types.FileSystemLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemNotFound(v **types.FileSystemNotFound, 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.FileSystemNotFound + if *v == nil { + sv = &types.FileSystemNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemProtectionDescription(v **types.FileSystemProtectionDescription, 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.FileSystemProtectionDescription + if *v == nil { + sv = &types.FileSystemProtectionDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ReplicationOverwriteProtection": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationOverwriteProtection to be of type string, got %T instead", value) + } + sv.ReplicationOverwriteProtection = types.ReplicationOverwriteProtection(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentFileSystemSize(v **types.FileSystemSize, 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.FileSystemSize + if *v == nil { + sv = &types.FileSystemSize{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Timestamp": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Timestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Value": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected FileSystemSizeValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Value = i64 + } + + case "ValueInArchive": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected FileSystemNullableSizeValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ValueInArchive = ptr.Int64(i64) + } + + case "ValueInIA": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected FileSystemNullableSizeValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ValueInIA = ptr.Int64(i64) + } + + case "ValueInStandard": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected FileSystemNullableSizeValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ValueInStandard = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIncorrectFileSystemLifeCycleState(v **types.IncorrectFileSystemLifeCycleState, 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.IncorrectFileSystemLifeCycleState + if *v == nil { + sv = &types.IncorrectFileSystemLifeCycleState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIncorrectMountTargetState(v **types.IncorrectMountTargetState, 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.IncorrectMountTargetState + if *v == nil { + sv = &types.IncorrectMountTargetState{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInsufficientThroughputCapacity(v **types.InsufficientThroughputCapacity, 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.InsufficientThroughputCapacity + if *v == nil { + sv = &types.InsufficientThroughputCapacity{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInternalServerError(v **types.InternalServerError, 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.InternalServerError + if *v == nil { + sv = &types.InternalServerError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentInvalidPolicyException(v **types.InvalidPolicyException, 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.InvalidPolicyException + if *v == nil { + sv = &types.InvalidPolicyException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentIpAddressInUse(v **types.IpAddressInUse, 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.IpAddressInUse + if *v == nil { + sv = &types.IpAddressInUse{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentLifecyclePolicies(v *[]types.LifecyclePolicy, 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.LifecyclePolicy + if *v == nil { + cv = []types.LifecyclePolicy{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.LifecyclePolicy + destAddr := &col + if err := awsRestjson1_deserializeDocumentLifecyclePolicy(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentLifecyclePolicy(v **types.LifecyclePolicy, 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.LifecyclePolicy + if *v == nil { + sv = &types.LifecyclePolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "TransitionToArchive": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TransitionToArchiveRules to be of type string, got %T instead", value) + } + sv.TransitionToArchive = types.TransitionToArchiveRules(jtv) + } + + case "TransitionToIA": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TransitionToIARules to be of type string, got %T instead", value) + } + sv.TransitionToIA = types.TransitionToIARules(jtv) + } + + case "TransitionToPrimaryStorageClass": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TransitionToPrimaryStorageClassRules to be of type string, got %T instead", value) + } + sv.TransitionToPrimaryStorageClass = types.TransitionToPrimaryStorageClassRules(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMountTargetConflict(v **types.MountTargetConflict, 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.MountTargetConflict + if *v == nil { + sv = &types.MountTargetConflict{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMountTargetDescription(v **types.MountTargetDescription, 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.MountTargetDescription + if *v == nil { + sv = &types.MountTargetDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AvailabilityZoneId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneId to be of type string, got %T instead", value) + } + sv.AvailabilityZoneId = ptr.String(jtv) + } + + case "AvailabilityZoneName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AvailabilityZoneName to be of type string, got %T instead", value) + } + sv.AvailabilityZoneName = ptr.String(jtv) + } + + case "FileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.FileSystemId = ptr.String(jtv) + } + + case "IpAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected IpAddress to be of type string, got %T instead", value) + } + sv.IpAddress = ptr.String(jtv) + } + + case "Ipv6Address": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Ipv6Address to be of type string, got %T instead", value) + } + sv.Ipv6Address = ptr.String(jtv) + } + + case "LifeCycleState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LifeCycleState to be of type string, got %T instead", value) + } + sv.LifeCycleState = types.LifeCycleState(jtv) + } + + case "MountTargetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MountTargetId to be of type string, got %T instead", value) + } + sv.MountTargetId = ptr.String(jtv) + } + + case "NetworkInterfaceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NetworkInterfaceId to be of type string, got %T instead", value) + } + sv.NetworkInterfaceId = ptr.String(jtv) + } + + case "OwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.OwnerId = ptr.String(jtv) + } + + case "SubnetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubnetId to be of type string, got %T instead", value) + } + sv.SubnetId = ptr.String(jtv) + } + + case "VpcId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VpcId to be of type string, got %T instead", value) + } + sv.VpcId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMountTargetDescriptions(v *[]types.MountTargetDescription, 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.MountTargetDescription + if *v == nil { + cv = []types.MountTargetDescription{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MountTargetDescription + destAddr := &col + if err := awsRestjson1_deserializeDocumentMountTargetDescription(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentMountTargetNotFound(v **types.MountTargetNotFound, 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.MountTargetNotFound + if *v == nil { + sv = &types.MountTargetNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNetworkInterfaceLimitExceeded(v **types.NetworkInterfaceLimitExceeded, 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.NetworkInterfaceLimitExceeded + if *v == nil { + sv = &types.NetworkInterfaceLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentNoFreeAddressesInSubnet(v **types.NoFreeAddressesInSubnet, 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.NoFreeAddressesInSubnet + if *v == nil { + sv = &types.NoFreeAddressesInSubnet{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPolicyNotFound(v **types.PolicyNotFound, 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.PolicyNotFound + if *v == nil { + sv = &types.PolicyNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPosixUser(v **types.PosixUser, 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.PosixUser + if *v == nil { + sv = &types.PosixUser{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Gid": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Gid to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Gid = ptr.Int64(i64) + } + + case "SecondaryGids": + if err := awsRestjson1_deserializeDocumentSecondaryGids(&sv.SecondaryGids, value); err != nil { + return err + } + + case "Uid": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Uid to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Uid = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReplicationAlreadyExists(v **types.ReplicationAlreadyExists, 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.ReplicationAlreadyExists + if *v == nil { + sv = &types.ReplicationAlreadyExists{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReplicationConfigurationDescription(v **types.ReplicationConfigurationDescription, 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.ReplicationConfigurationDescription + if *v == nil { + sv = &types.ReplicationConfigurationDescription{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) + + } + } + + case "Destinations": + if err := awsRestjson1_deserializeDocumentDestinations(&sv.Destinations, value); err != nil { + return err + } + + case "OriginalSourceFileSystemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemArn to be of type string, got %T instead", value) + } + sv.OriginalSourceFileSystemArn = ptr.String(jtv) + } + + case "SourceFileSystemArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemArn to be of type string, got %T instead", value) + } + sv.SourceFileSystemArn = ptr.String(jtv) + } + + case "SourceFileSystemId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected FileSystemId to be of type string, got %T instead", value) + } + sv.SourceFileSystemId = ptr.String(jtv) + } + + case "SourceFileSystemOwnerId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.SourceFileSystemOwnerId = ptr.String(jtv) + } + + case "SourceFileSystemRegion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected RegionName to be of type string, got %T instead", value) + } + sv.SourceFileSystemRegion = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentReplicationConfigurationDescriptions(v *[]types.ReplicationConfigurationDescription, 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.ReplicationConfigurationDescription + if *v == nil { + cv = []types.ReplicationConfigurationDescription{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ReplicationConfigurationDescription + destAddr := &col + if err := awsRestjson1_deserializeDocumentReplicationConfigurationDescription(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentReplicationNotFound(v **types.ReplicationNotFound, 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.ReplicationNotFound + if *v == nil { + sv = &types.ReplicationNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResourceIdPreference(v **types.ResourceIdPreference, 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.ResourceIdPreference + if *v == nil { + sv = &types.ResourceIdPreference{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ResourceIdType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceIdType to be of type string, got %T instead", value) + } + sv.ResourceIdType = types.ResourceIdType(jtv) + } + + case "Resources": + if err := awsRestjson1_deserializeDocumentResources(&sv.Resources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentResources(v *[]types.Resource, 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.Resource + if *v == nil { + cv = []types.Resource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Resource + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Resource to be of type string, got %T instead", value) + } + col = types.Resource(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRootDirectory(v **types.RootDirectory, 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.RootDirectory + if *v == nil { + sv = &types.RootDirectory{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CreationInfo": + if err := awsRestjson1_deserializeDocumentCreationInfo(&sv.CreationInfo, value); err != nil { + return err + } + + case "Path": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Path to be of type string, got %T instead", value) + } + sv.Path = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSecondaryGids(v *[]int64, 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 []int64 + if *v == nil { + cv = []int64{} + } else { + cv = *v + } + + for _, value := range shape { + var col int64 + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Gid to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + col = i64 + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSecurityGroupLimitExceeded(v **types.SecurityGroupLimitExceeded, 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.SecurityGroupLimitExceeded + if *v == nil { + sv = &types.SecurityGroupLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSecurityGroupNotFound(v **types.SecurityGroupNotFound, 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.SecurityGroupNotFound + if *v == nil { + sv = &types.SecurityGroupNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentSecurityGroups(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 SecurityGroup to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentSubnetNotFound(v **types.SubnetNotFound, 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.SubnetNotFound + if *v == nil { + sv = &types.SubnetNotFound{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTag(v **types.Tag, 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.Tag + if *v == nil { + sv = &types.Tag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTags(v *[]types.Tag, 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.Tag + if *v == nil { + cv = []types.Tag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Tag + destAddr := &col + if err := awsRestjson1_deserializeDocumentTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, 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.ThrottlingException + if *v == nil { + sv = &types.ThrottlingException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentThroughputLimitExceeded(v **types.ThroughputLimitExceeded, 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.ThroughputLimitExceeded + if *v == nil { + sv = &types.ThroughputLimitExceeded{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTooManyRequests(v **types.TooManyRequests, 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.TooManyRequests + if *v == nil { + sv = &types.TooManyRequests{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentUnsupportedAvailabilityZone(v **types.UnsupportedAvailabilityZone, 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.UnsupportedAvailabilityZone + if *v == nil { + sv = &types.UnsupportedAvailabilityZone{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentValidationException(v **types.ValidationException, 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.ValidationException + if *v == nil { + sv = &types.ValidationException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.ErrorCode_ = ptr.String(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/doc.go new file mode 100644 index 0000000000..418ae65f88 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/doc.go @@ -0,0 +1,16 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +// Package efs provides the API client, operations, and parameter types for Amazon +// Elastic File System. +// +// # Amazon Elastic File System +// +// Amazon Elastic File System (Amazon EFS) provides simple, scalable file storage +// for use with Amazon EC2 Linux and Mac instances in the Amazon Web Services +// Cloud. With Amazon EFS, storage capacity is elastic, growing and shrinking +// automatically as you add and remove files, so that your applications have the +// storage they need, when they need it. For more information, see the [Amazon Elastic File System API Reference]and the [Amazon Elastic File System User Guide]. +// +// [Amazon Elastic File System User Guide]: https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html +// [Amazon Elastic File System API Reference]: https://docs.aws.amazon.com/efs/latest/ug/api-reference.html +package efs diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/endpoints.go new file mode 100644 index 0000000000..c1e5e46ef7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/endpoints.go @@ -0,0 +1,685 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "errors" + "fmt" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" + "github.com/aws/aws-sdk-go-v2/internal/endpoints" + "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" + internalendpoints "github.com/aws/aws-sdk-go-v2/service/efs/internal/endpoints" + smithyauth "github.com/aws/smithy-go/auth" + smithyendpoints "github.com/aws/smithy-go/endpoints" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/ptr" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" + "net/url" + "os" + "strings" +) + +// EndpointResolverOptions is the service endpoint resolver options +type EndpointResolverOptions = internalendpoints.Options + +// EndpointResolver interface for resolving service endpoints. +type EndpointResolver interface { + ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) +} + +var _ EndpointResolver = &internalendpoints.Resolver{} + +// NewDefaultEndpointResolver constructs a new service endpoint resolver +func NewDefaultEndpointResolver() *internalendpoints.Resolver { + return internalendpoints.New() +} + +// EndpointResolverFunc is a helper utility that wraps a function so it satisfies +// the EndpointResolver interface. This is useful when you want to add additional +// endpoint resolving logic, or stub out specific endpoints with custom values. +type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) + +func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return fn(region, options) +} + +// EndpointResolverFromURL returns an EndpointResolver configured using the +// provided endpoint url. By default, the resolved endpoint resolver uses the +// client region as signing region, and the endpoint source is set to +// EndpointSourceCustom.You can provide functional options to configure endpoint +// values for the resolved endpoint. +func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { + e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} + for _, fn := range optFns { + fn(&e) + } + + return EndpointResolverFunc( + func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { + if len(e.SigningRegion) == 0 { + e.SigningRegion = region + } + return e, nil + }, + ) +} + +type ResolveEndpoint struct { + Resolver EndpointResolver + Options EndpointResolverOptions +} + +func (*ResolveEndpoint) ID() string { + return "ResolveEndpoint" +} + +func (m *ResolveEndpoint) 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.Resolver == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + eo := m.Options + eo.Logger = middleware.GetLogger(ctx) + + var endpoint aws.Endpoint + endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) + if err != nil { + nf := (&aws.EndpointNotFoundError{}) + if errors.As(err, &nf) { + ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) + return next.HandleSerialize(ctx, in) + } + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + req.URL, err = url.Parse(endpoint.URL) + if err != nil { + return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) + } + + if len(awsmiddleware.GetSigningName(ctx)) == 0 { + signingName := endpoint.SigningName + if len(signingName) == 0 { + signingName = "elasticfilesystem" + } + ctx = awsmiddleware.SetSigningName(ctx, signingName) + } + ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) + ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) + ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) + ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) + return next.HandleSerialize(ctx, in) +} +func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { + return stack.Serialize.Insert(&ResolveEndpoint{ + Resolver: o.EndpointResolver, + Options: o.EndpointOptions, + }, "OperationSerializer", middleware.Before) +} + +func removeResolveEndpointMiddleware(stack *middleware.Stack) error { + _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) + return err +} + +type wrappedEndpointResolver struct { + awsResolver aws.EndpointResolverWithOptions +} + +func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { + return w.awsResolver.ResolveEndpoint(ServiceID, region, options) +} + +type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) + +func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { + return a(service, region) +} + +var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) + +// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. +// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, +// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked +// via its middleware. +// +// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. +func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { + var resolver aws.EndpointResolverWithOptions + + if awsResolverWithOptions != nil { + resolver = awsResolverWithOptions + } else if awsResolver != nil { + resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) + } + + return &wrappedEndpointResolver{ + awsResolver: resolver, + } +} + +func finalizeClientEndpointResolverOptions(options *Options) { + options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() + + if len(options.EndpointOptions.ResolvedRegion) == 0 { + const fipsInfix = "-fips-" + const fipsPrefix = "fips-" + const fipsSuffix = "-fips" + + if strings.Contains(options.Region, fipsInfix) || + strings.Contains(options.Region, fipsPrefix) || + strings.Contains(options.Region, fipsSuffix) { + options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( + options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") + options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled + } + } + +} + +func resolveEndpointResolverV2(options *Options) { + if options.EndpointResolverV2 == nil { + options.EndpointResolverV2 = NewDefaultEndpointResolverV2() + } +} + +func resolveBaseEndpoint(cfg aws.Config, o *Options) { + if cfg.BaseEndpoint != nil { + o.BaseEndpoint = cfg.BaseEndpoint + } + + _, g := os.LookupEnv("AWS_ENDPOINT_URL") + _, s := os.LookupEnv("AWS_ENDPOINT_URL_EFS") + + if g && !s { + return + } + + value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "EFS", cfg.ConfigSources) + if found && err == nil { + o.BaseEndpoint = &value + } +} + +func bindRegion(region string) *string { + if region == "" { + return nil + } + return aws.String(endpoints.MapFIPSRegion(region)) +} + +// EndpointParameters provides the parameters that influence how endpoints are +// resolved. +type EndpointParameters struct { + // When true, use the dual-stack endpoint. If the configured endpoint does not + // support dual-stack, dispatching the request MAY return an error. + // + // Defaults to + // false if no value is provided. + // + // AWS::UseDualStack + UseDualStack *bool + + // When true, send this request to the FIPS-compliant regional endpoint. If the + // configured endpoint does not have a FIPS compliant endpoint, dispatching the + // request will return an error. + // + // Defaults to false if no value is + // provided. + // + // AWS::UseFIPS + UseFIPS *bool + + // Override the endpoint used to send this request + // + // Parameter is + // required. + // + // SDK::Endpoint + Endpoint *string + + // The AWS region used to dispatch the request. + // + // Parameter is + // required. + // + // AWS::Region + Region *string +} + +// ValidateRequired validates required parameters are set. +func (p EndpointParameters) ValidateRequired() error { + if p.UseDualStack == nil { + return fmt.Errorf("parameter UseDualStack is required") + } + + if p.UseFIPS == nil { + return fmt.Errorf("parameter UseFIPS is required") + } + + return nil +} + +// WithDefaults returns a shallow copy of EndpointParameterswith default values +// applied to members where applicable. +func (p EndpointParameters) WithDefaults() EndpointParameters { + if p.UseDualStack == nil { + p.UseDualStack = ptr.Bool(false) + } + + if p.UseFIPS == nil { + p.UseFIPS = ptr.Bool(false) + } + return p +} + +type stringSlice []string + +func (s stringSlice) Get(i int) *string { + if i < 0 || i >= len(s) { + return nil + } + + v := s[i] + return &v +} + +// EndpointResolverV2 provides the interface for resolving service endpoints. +type EndpointResolverV2 interface { + // ResolveEndpoint attempts to resolve the endpoint with the provided options, + // returning the endpoint if found. Otherwise an error is returned. + ResolveEndpoint(ctx context.Context, params EndpointParameters) ( + smithyendpoints.Endpoint, error, + ) +} + +// resolver provides the implementation for resolving endpoints. +type resolver struct{} + +func NewDefaultEndpointResolverV2() EndpointResolverV2 { + return &resolver{} +} + +// ResolveEndpoint attempts to resolve the endpoint with the provided options, +// returning the endpoint if found. Otherwise an error is returned. +func (r *resolver) ResolveEndpoint( + ctx context.Context, params EndpointParameters, +) ( + endpoint smithyendpoints.Endpoint, err error, +) { + params = params.WithDefaults() + if err = params.ValidateRequired(); err != nil { + return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) + } + _UseDualStack := *params.UseDualStack + _UseFIPS := *params.UseFIPS + + if exprVal := params.Endpoint; exprVal != nil { + _Endpoint := *exprVal + _ = _Endpoint + if _UseFIPS == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") + } + if _UseDualStack == true { + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") + } + uriString := _Endpoint + + 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{}, + }, nil + } + if exprVal := params.Region; exprVal != nil { + _Region := *exprVal + _ = _Region + if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { + _PartitionResult := *exprVal + _ = _PartitionResult + if _PartitionResult.Name == "aws" { + if _UseFIPS == false { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://efs.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + } + } + if _PartitionResult.Name == "aws" { + if _UseFIPS == true { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://efs-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + } + } + if _PartitionResult.Name == "aws-cn" { + if _UseFIPS == false { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://efs.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + } + } + if _PartitionResult.Name == "aws-cn" { + if _UseFIPS == true { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://efs-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == false { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://efs.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + } + } + if _PartitionResult.Name == "aws-us-gov" { + if _UseFIPS == true { + if _UseDualStack == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://efs-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + } + } + if _UseFIPS == true { + if _UseDualStack == true { + if true == _PartitionResult.SupportsFIPS { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://elasticfilesystem-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") + } + } + if _UseFIPS == true { + if _UseDualStack == false { + if _PartitionResult.SupportsFIPS == true { + uriString := func() string { + var out strings.Builder + out.WriteString("https://elasticfilesystem-fips.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") + } + } + if _UseFIPS == false { + if _UseDualStack == true { + if true == _PartitionResult.SupportsDualStack { + uriString := func() string { + var out strings.Builder + out.WriteString("https://elasticfilesystem.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DualStackDnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") + } + } + uriString := func() string { + var out strings.Builder + out.WriteString("https://elasticfilesystem.") + out.WriteString(_Region) + out.WriteString(".") + out.WriteString(_PartitionResult.DnsSuffix) + return out.String() + }() + + 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{}, + }, nil + } + return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") + } + return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") +} + +type endpointParamsBinder interface { + bindEndpointParams(*EndpointParameters) +} + +func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { + params := &EndpointParameters{} + + params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) + params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) + params.Endpoint = options.BaseEndpoint + params.Region = bindRegion(options.Region) + + if b, ok := input.(endpointParamsBinder); ok { + b.bindEndpointParams(params) + } + + return params +} + +type resolveEndpointV2Middleware struct { + options Options +} + +func (*resolveEndpointV2Middleware) ID() string { + return "ResolveEndpointV2" +} + +func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( + out middleware.FinalizeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "ResolveEndpoint") + defer span.End() + + if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { + return next.HandleFinalize(ctx, in) + } + + req, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) + } + + if m.options.EndpointResolverV2 == nil { + return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") + } + + params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) + endpt, err := timeOperationMetric(ctx, "client.call.resolve_endpoint_duration", + func() (smithyendpoints.Endpoint, error) { + return m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) + }) + if err != nil { + return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) + } + + span.SetProperty("client.call.resolved_endpoint", endpt.URI.String()) + + if endpt.URI.RawPath == "" && req.URL.RawPath != "" { + endpt.URI.RawPath = endpt.URI.Path + } + req.URL.Scheme = endpt.URI.Scheme + req.URL.Host = endpt.URI.Host + req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) + req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) + for k := range endpt.Headers { + req.Header.Set(k, endpt.Headers.Get(k)) + } + + rscheme := getResolvedAuthScheme(ctx) + if rscheme == nil { + return out, metadata, fmt.Errorf("no resolved auth scheme") + } + + opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) + for _, o := range opts { + rscheme.SignerProperties.SetAll(&o.SignerProperties) + } + + span.End() + return next.HandleFinalize(ctx, in) +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/generated.json b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/generated.json new file mode 100644 index 0000000000..8dbb910b3d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/generated.json @@ -0,0 +1,64 @@ +{ + "dependencies": { + "github.com/aws/aws-sdk-go-v2": "v1.4.0", + "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", + "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", + "github.com/aws/smithy-go": "v1.4.0" + }, + "files": [ + "api_client.go", + "api_client_test.go", + "api_op_CreateAccessPoint.go", + "api_op_CreateFileSystem.go", + "api_op_CreateMountTarget.go", + "api_op_CreateReplicationConfiguration.go", + "api_op_CreateTags.go", + "api_op_DeleteAccessPoint.go", + "api_op_DeleteFileSystem.go", + "api_op_DeleteFileSystemPolicy.go", + "api_op_DeleteMountTarget.go", + "api_op_DeleteReplicationConfiguration.go", + "api_op_DeleteTags.go", + "api_op_DescribeAccessPoints.go", + "api_op_DescribeAccountPreferences.go", + "api_op_DescribeBackupPolicy.go", + "api_op_DescribeFileSystemPolicy.go", + "api_op_DescribeFileSystems.go", + "api_op_DescribeLifecycleConfiguration.go", + "api_op_DescribeMountTargetSecurityGroups.go", + "api_op_DescribeMountTargets.go", + "api_op_DescribeReplicationConfigurations.go", + "api_op_DescribeTags.go", + "api_op_ListTagsForResource.go", + "api_op_ModifyMountTargetSecurityGroups.go", + "api_op_PutAccountPreferences.go", + "api_op_PutBackupPolicy.go", + "api_op_PutFileSystemPolicy.go", + "api_op_PutLifecycleConfiguration.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", + "api_op_UpdateFileSystem.go", + "api_op_UpdateFileSystemProtection.go", + "auth.go", + "deserializers.go", + "doc.go", + "endpoints.go", + "endpoints_config_test.go", + "endpoints_test.go", + "generated.json", + "internal/endpoints/endpoints.go", + "internal/endpoints/endpoints_test.go", + "options.go", + "protocol_test.go", + "serializers.go", + "snapshot_test.go", + "sra_operation_order_test.go", + "types/enums.go", + "types/errors.go", + "types/types.go", + "validators.go" + ], + "go": "1.22", + "module": "github.com/aws/aws-sdk-go-v2/service/efs", + "unstable": false +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/go_module_metadata.go new file mode 100644 index 0000000000..d57d1cac91 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/go_module_metadata.go @@ -0,0 +1,6 @@ +// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. + +package efs + +// goModuleVersion is the tagged release for this module +const goModuleVersion = "1.36.2" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/internal/endpoints/endpoints.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/internal/endpoints/endpoints.go new file mode 100644 index 0000000000..e87e077cc3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/internal/endpoints/endpoints.go @@ -0,0 +1,1092 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package endpoints + +import ( + "github.com/aws/aws-sdk-go-v2/aws" + endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" + "github.com/aws/smithy-go/logging" + "regexp" +) + +// Options is the endpoint resolver configuration options +type Options struct { + // Logger is a logging implementation that log events should be sent to. + Logger logging.Logger + + // LogDeprecated indicates that deprecated endpoints should be logged to the + // provided logger. + LogDeprecated bool + + // ResolvedRegion is used to override the region to be resolved, rather then the + // using the value passed to the ResolveEndpoint method. This value is used by the + // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative + // name. You must not set this value directly in your application. + ResolvedRegion string + + // DisableHTTPS informs the resolver to return an endpoint that does not use the + // HTTPS scheme. + DisableHTTPS bool + + // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. + UseDualStackEndpoint aws.DualStackEndpointState + + // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. + UseFIPSEndpoint aws.FIPSEndpointState +} + +func (o Options) GetResolvedRegion() string { + return o.ResolvedRegion +} + +func (o Options) GetDisableHTTPS() bool { + return o.DisableHTTPS +} + +func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { + return o.UseDualStackEndpoint +} + +func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { + return o.UseFIPSEndpoint +} + +func transformToSharedOptions(options Options) endpoints.Options { + return endpoints.Options{ + Logger: options.Logger, + LogDeprecated: options.LogDeprecated, + ResolvedRegion: options.ResolvedRegion, + DisableHTTPS: options.DisableHTTPS, + UseDualStackEndpoint: options.UseDualStackEndpoint, + UseFIPSEndpoint: options.UseFIPSEndpoint, + } +} + +// Resolver EFS endpoint resolver +type Resolver struct { + partitions endpoints.Partitions +} + +// ResolveEndpoint resolves the service endpoint for the given region and options +func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { + if len(region) == 0 { + return endpoint, &aws.MissingRegionError{} + } + + opt := transformToSharedOptions(options) + return r.partitions.ResolveEndpoint(region, opt) +} + +// New returns a new Resolver +func New() *Resolver { + return &Resolver{ + partitions: defaultPartitions, + } +} + +var partitionRegexp = struct { + Aws *regexp.Regexp + AwsCn *regexp.Regexp + AwsEusc *regexp.Regexp + AwsIso *regexp.Regexp + AwsIsoB *regexp.Regexp + AwsIsoE *regexp.Regexp + AwsIsoF *regexp.Regexp + AwsUsGov *regexp.Regexp +}{ + + Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$"), + AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), + AwsEusc: regexp.MustCompile("^eusc\\-(de)\\-\\w+\\-\\d+$"), + AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), + AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), + AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), + AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), + AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), +} + +var defaultPartitions = endpoints.Partitions{ + { + ID: "aws", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "elasticfilesystem.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "elasticfilesystem.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.Aws, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "af-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "af-south-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-south-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-southeast-4.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-5", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-southeast-5.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-7", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-7", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-southeast-7.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ca-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ca-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.eu-central-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "eu-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.eu-south-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "fips-af-south-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.af-south-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "af-south-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-east-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-northeast-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-northeast-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-northeast-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-northeast-2", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-northeast-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-northeast-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-northeast-3", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-northeast-3.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-northeast-3", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-south-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-south-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-south-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-south-2", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-south-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-south-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-southeast-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-southeast-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-southeast-2", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-southeast-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-southeast-3", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-3", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-southeast-4", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-southeast-4.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-4", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-southeast-5", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-southeast-5.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-5", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ap-southeast-7", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-southeast-7.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-7", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ca-central-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ca-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-central-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-ca-west-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ca-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-eu-central-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.eu-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-central-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-eu-central-2", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.eu-central-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-central-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-eu-north-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.eu-north-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-north-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-eu-south-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.eu-south-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-south-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-eu-south-2", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.eu-south-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-south-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-eu-west-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.eu-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-eu-west-2", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.eu-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-west-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-eu-west-3", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.eu-west-3.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-west-3", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-il-central-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.il-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "il-central-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-me-central-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.me-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "me-central-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-me-south-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "me-south-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-mx-central-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.mx-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "mx-central-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-sa-east-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "sa-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-2", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-2", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.il-central-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.me-central-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "me-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.me-south-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "mx-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "mx-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.mx-central-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "sa-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.sa-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-east-2.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-west-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-west-2.amazonaws.com", + }, + }, + }, + { + ID: "aws-cn", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "elasticfilesystem.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.api.amazonwebservices.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "elasticfilesystem.{region}.amazonaws.com.cn", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsCn, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "cn-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-north-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn", + }, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn", + }, + endpoints.EndpointKey{ + Region: "fips-cn-north-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.cn-north-1.amazonaws.com.cn", + CredentialScope: endpoints.CredentialScope{ + Region: "cn-north-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-cn-northwest-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.cn-northwest-1.amazonaws.com.cn", + CredentialScope: endpoints.CredentialScope{ + Region: "cn-northwest-1", + }, + Deprecated: aws.TrueTernary, + }, + }, + }, + { + ID: "aws-eusc", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "elasticfilesystem.{region}.amazonaws.eu", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsEusc, + IsRegionalized: true, + }, + { + ID: "aws-iso", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "elasticfilesystem.{region}.c2s.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIso, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-iso-east-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-iso-west-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-iso-west-1.c2s.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-iso-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-iso-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-iso-east-1.c2s.ic.gov", + }, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-iso-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-iso-west-1.c2s.ic.gov", + }, + }, + }, + { + ID: "aws-iso-b", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "elasticfilesystem.{region}.sc2s.sgov.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoB, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-isob-east-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-isob-east-1.sc2s.sgov.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isob-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isob-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-isob-east-1.sc2s.sgov.gov", + }, + }, + }, + { + ID: "aws-iso-e", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "elasticfilesystem.{region}.cloud.adc-e.uk", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoE, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "eu-isoe-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-isoe-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.eu-isoe-west-1.cloud.adc-e.uk", + }, + endpoints.EndpointKey{ + Region: "fips-eu-isoe-west-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.eu-isoe-west-1.cloud.adc-e.uk", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-isoe-west-1", + }, + Deprecated: aws.TrueTernary, + }, + }, + }, + { + ID: "aws-iso-f", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "elasticfilesystem.{region}.csp.hci.ic.gov", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsIsoF, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-isof-east-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-isof-east-1.csp.hci.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isof-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-isof-south-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-isof-south-1.csp.hci.ic.gov", + CredentialScope: endpoints.CredentialScope{ + Region: "us-isof-south-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-isof-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isof-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-isof-east-1.csp.hci.ic.gov", + }, + endpoints.EndpointKey{ + Region: "us-isof-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-isof-south-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-isof-south-1.csp.hci.ic.gov", + }, + }, + }, + { + ID: "aws-us-gov", + Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ + { + Variant: endpoints.DualStackVariant, + }: { + Hostname: "elasticfilesystem.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, + }: { + Hostname: "elasticfilesystem-fips.{region}.api.aws", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + { + Variant: 0, + }: { + Hostname: "elasticfilesystem.{region}.amazonaws.com", + Protocols: []string{"https"}, + SignatureVersions: []string{"v4"}, + }, + }, + RegionRegex: partitionRegexp.AwsUsGov, + IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "fips-us-gov-east-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-gov-west-1", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-gov-east-1.amazonaws.com", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.us-gov-west-1.amazonaws.com", + }, + }, + }, +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/options.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/options.go new file mode 100644 index 0000000000..11f02995f3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/options.go @@ -0,0 +1,236 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "github.com/aws/aws-sdk-go-v2/aws" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" + smithyauth "github.com/aws/smithy-go/auth" + "github.com/aws/smithy-go/logging" + "github.com/aws/smithy-go/metrics" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "net/http" +) + +type HTTPClient interface { + Do(*http.Request) (*http.Response, error) +} + +type Options struct { + // Set of options to modify how an operation is invoked. These apply to all + // operations invoked for this client. Use functional options on operation call to + // modify this list for per operation behavior. + APIOptions []func(*middleware.Stack) error + + // The optional application specific identifier appended to the User-Agent header. + AppID string + + // This endpoint will be given as input to an EndpointResolverV2. It is used for + // providing a custom base endpoint that is subject to modifications by the + // processing EndpointResolverV2. + BaseEndpoint *string + + // Configures the events that will be sent to the configured logger. + ClientLogMode aws.ClientLogMode + + // The credentials object to use when signing requests. + Credentials aws.CredentialsProvider + + // The configuration DefaultsMode that the SDK should use when constructing the + // clients initial default settings. + DefaultsMode aws.DefaultsMode + + // The endpoint options to be used when attempting to resolve an endpoint. + EndpointOptions EndpointResolverOptions + + // The service endpoint resolver. + // + // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a + // value for this field will likely prevent you from using any endpoint-related + // service features released after the introduction of EndpointResolverV2 and + // BaseEndpoint. + // + // To migrate an EndpointResolver implementation that uses a custom endpoint, set + // the client option BaseEndpoint instead. + EndpointResolver EndpointResolver + + // Resolves the endpoint used for a particular service operation. This should be + // used over the deprecated EndpointResolver. + EndpointResolverV2 EndpointResolverV2 + + // Signature Version 4 (SigV4) Signer + HTTPSignerV4 HTTPSignerV4 + + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + + // The logger writer interface to write logging messages to. + Logger logging.Logger + + // The client meter provider. + MeterProvider metrics.MeterProvider + + // The region to send requests to. (Required) + Region string + + // RetryMaxAttempts specifies the maximum number attempts an API client will call + // an operation that fails with a retryable error. A value of 0 is ignored, and + // will not be used to configure the API client created default retryer, or modify + // per operation call's retry max attempts. + // + // If specified in an operation call's functional options with a value that is + // different than the constructed client's Options, the Client's Retryer will be + // wrapped to use the operation's specific RetryMaxAttempts value. + RetryMaxAttempts int + + // RetryMode specifies the retry mode the API client will be created with, if + // Retryer option is not also specified. + // + // When creating a new API Clients this member will only be used if the Retryer + // Options member is nil. This value will be ignored if Retryer is not nil. + // + // Currently does not support per operation call overrides, may in the future. + RetryMode aws.RetryMode + + // Retryer guides how HTTP requests should be retried in case of recoverable + // failures. When nil the API client will use a default retryer. The kind of + // default retry created by the API client can be changed with the RetryMode + // option. + Retryer aws.Retryer + + // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set + // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You + // should not populate this structure programmatically, or rely on the values here + // within your applications. + RuntimeEnvironment aws.RuntimeEnvironment + + // The client tracer provider. + TracerProvider tracing.TracerProvider + + // The initial DefaultsMode used when the client options were constructed. If the + // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved + // value was at that point in time. + // + // Currently does not support per operation call overrides, may in the future. + resolvedDefaultsMode aws.DefaultsMode + + // The HTTP client to invoke API calls with. Defaults to client's default HTTP + // implementation if nil. + HTTPClient HTTPClient + + // The auth scheme resolver which determines how to authenticate for each + // operation. + AuthSchemeResolver AuthSchemeResolver + + // The list of auth schemes supported by the client. + AuthSchemes []smithyhttp.AuthScheme +} + +// Copy creates a clone where the APIOptions list is deep copied. +func (o Options) Copy() Options { + to := o + to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) + copy(to.APIOptions, o.APIOptions) + + return to +} + +func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { + if schemeID == "aws.auth#sigv4" { + return getSigV4IdentityResolver(o) + } + if schemeID == "smithy.api#noAuth" { + return &smithyauth.AnonymousIdentityResolver{} + } + return nil +} + +// WithAPIOptions returns a functional option for setting the Client's APIOptions +// option. +func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { + return func(o *Options) { + o.APIOptions = append(o.APIOptions, optFns...) + } +} + +// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for +// this field will likely prevent you from using any endpoint-related service +// features released after the introduction of EndpointResolverV2 and BaseEndpoint. +// +// To migrate an EndpointResolver implementation that uses a custom endpoint, set +// the client option BaseEndpoint instead. +func WithEndpointResolver(v EndpointResolver) func(*Options) { + return func(o *Options) { + o.EndpointResolver = v + } +} + +// WithEndpointResolverV2 returns a functional option for setting the Client's +// EndpointResolverV2 option. +func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { + return func(o *Options) { + o.EndpointResolverV2 = v + } +} + +func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { + if o.Credentials != nil { + return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} + } + return nil +} + +// WithSigV4SigningName applies an override to the authentication workflow to +// use the given signing name for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing name from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningName(name string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), + middleware.Before, + ) + }) + } +} + +// WithSigV4SigningRegion applies an override to the authentication workflow to +// use the given signing region for SigV4-authenticated operations. +// +// This is an advanced setting. The value here is FINAL, taking precedence over +// the resolved signing region from both auth scheme resolution and endpoint +// resolution. +func WithSigV4SigningRegion(region string) func(*Options) { + fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, + ) { + return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) + } + return func(o *Options) { + o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { + return s.Initialize.Add( + middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), + middleware.Before, + ) + }) + } +} + +func ignoreAnonymousAuth(options *Options) { + if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { + options.Credentials = nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/serializers.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/serializers.go new file mode 100644 index 0000000000..d11d68399c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/serializers.go @@ -0,0 +1,2922 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "bytes" + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/encoding/httpbinding" + smithyjson "github.com/aws/smithy-go/encoding/json" + "github.com/aws/smithy-go/middleware" + "github.com/aws/smithy-go/tracing" + smithyhttp "github.com/aws/smithy-go/transport/http" + "math" +) + +type awsRestjson1_serializeOpCreateAccessPoint struct { +} + +func (*awsRestjson1_serializeOpCreateAccessPoint) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateAccessPoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateAccessPointInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/access-points") + 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_serializeOpDocumentCreateAccessPointInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateAccessPointInput(v *CreateAccessPointInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateAccessPointInput(v *CreateAccessPointInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("ClientToken") + ok.String(*v.ClientToken) + } + + if v.FileSystemId != nil { + ok := object.Key("FileSystemId") + ok.String(*v.FileSystemId) + } + + if v.PosixUser != nil { + ok := object.Key("PosixUser") + if err := awsRestjson1_serializeDocumentPosixUser(v.PosixUser, ok); err != nil { + return err + } + } + + if v.RootDirectory != nil { + ok := object.Key("RootDirectory") + if err := awsRestjson1_serializeDocumentRootDirectory(v.RootDirectory, ok); err != nil { + return err + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateFileSystem struct { +} + +func (*awsRestjson1_serializeOpCreateFileSystem) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateFileSystem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateFileSystemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems") + 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_serializeOpDocumentCreateFileSystemInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateFileSystemInput(v *CreateFileSystemInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateFileSystemInput(v *CreateFileSystemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvailabilityZoneName != nil { + ok := object.Key("AvailabilityZoneName") + ok.String(*v.AvailabilityZoneName) + } + + if v.Backup != nil { + ok := object.Key("Backup") + ok.Boolean(*v.Backup) + } + + if v.CreationToken != nil { + ok := object.Key("CreationToken") + ok.String(*v.CreationToken) + } + + if v.Encrypted != nil { + ok := object.Key("Encrypted") + ok.Boolean(*v.Encrypted) + } + + if v.KmsKeyId != nil { + ok := object.Key("KmsKeyId") + ok.String(*v.KmsKeyId) + } + + if len(v.PerformanceMode) > 0 { + ok := object.Key("PerformanceMode") + ok.String(string(v.PerformanceMode)) + } + + if v.ProvisionedThroughputInMibps != nil { + ok := object.Key("ProvisionedThroughputInMibps") + switch { + case math.IsNaN(*v.ProvisionedThroughputInMibps): + ok.String("NaN") + + case math.IsInf(*v.ProvisionedThroughputInMibps, 1): + ok.String("Infinity") + + case math.IsInf(*v.ProvisionedThroughputInMibps, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.ProvisionedThroughputInMibps) + + } + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + if len(v.ThroughputMode) > 0 { + ok := object.Key("ThroughputMode") + ok.String(string(v.ThroughputMode)) + } + + return nil +} + +type awsRestjson1_serializeOpCreateMountTarget struct { +} + +func (*awsRestjson1_serializeOpCreateMountTarget) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateMountTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateMountTargetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/mount-targets") + 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_serializeOpDocumentCreateMountTargetInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateMountTargetInput(v *CreateMountTargetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateMountTargetInput(v *CreateMountTargetInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FileSystemId != nil { + ok := object.Key("FileSystemId") + ok.String(*v.FileSystemId) + } + + if v.IpAddress != nil { + ok := object.Key("IpAddress") + ok.String(*v.IpAddress) + } + + if len(v.IpAddressType) > 0 { + ok := object.Key("IpAddressType") + ok.String(string(v.IpAddressType)) + } + + if v.Ipv6Address != nil { + ok := object.Key("Ipv6Address") + ok.String(*v.Ipv6Address) + } + + if v.SecurityGroups != nil { + ok := object.Key("SecurityGroups") + if err := awsRestjson1_serializeDocumentSecurityGroups(v.SecurityGroups, ok); err != nil { + return err + } + } + + if v.SubnetId != nil { + ok := object.Key("SubnetId") + ok.String(*v.SubnetId) + } + + return nil +} + +type awsRestjson1_serializeOpCreateReplicationConfiguration struct { +} + +func (*awsRestjson1_serializeOpCreateReplicationConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateReplicationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateReplicationConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateReplicationConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateReplicationConfigurationInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateReplicationConfigurationInput(v *CreateReplicationConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.SourceFileSystemId == nil || len(*v.SourceFileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SourceFileSystemId must not be empty")} + } + if v.SourceFileSystemId != nil { + if err := encoder.SetURI("SourceFileSystemId").String(*v.SourceFileSystemId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateReplicationConfigurationInput(v *CreateReplicationConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Destinations != nil { + ok := object.Key("Destinations") + if err := awsRestjson1_serializeDocumentDestinationsToCreate(v.Destinations, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpCreateTags struct { +} + +func (*awsRestjson1_serializeOpCreateTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*CreateTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/create-tags/{FileSystemId}") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateTagsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateTagsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateTagsInput(v *CreateTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateTagsInput(v *CreateTagsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteAccessPoint struct { +} + +func (*awsRestjson1_serializeOpDeleteAccessPoint) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteAccessPoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteAccessPointInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/access-points/{AccessPointId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteAccessPointInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteAccessPointInput(v *DeleteAccessPointInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AccessPointId == nil || len(*v.AccessPointId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccessPointId must not be empty")} + } + if v.AccessPointId != nil { + if err := encoder.SetURI("AccessPointId").String(*v.AccessPointId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteFileSystem struct { +} + +func (*awsRestjson1_serializeOpDeleteFileSystem) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteFileSystem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteFileSystemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteFileSystemInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteFileSystemInput(v *DeleteFileSystemInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteFileSystemPolicy struct { +} + +func (*awsRestjson1_serializeOpDeleteFileSystemPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteFileSystemPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteFileSystemPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}/policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteFileSystemPolicyInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteFileSystemPolicyInput(v *DeleteFileSystemPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteMountTarget struct { +} + +func (*awsRestjson1_serializeOpDeleteMountTarget) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteMountTarget) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteMountTargetInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/mount-targets/{MountTargetId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteMountTargetInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteMountTargetInput(v *DeleteMountTargetInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MountTargetId == nil || len(*v.MountTargetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MountTargetId must not be empty")} + } + if v.MountTargetId != nil { + if err := encoder.SetURI("MountTargetId").String(*v.MountTargetId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteReplicationConfiguration struct { +} + +func (*awsRestjson1_serializeOpDeleteReplicationConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteReplicationConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteReplicationConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteReplicationConfigurationInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteReplicationConfigurationInput(v *DeleteReplicationConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if len(v.DeletionMode) > 0 { + encoder.SetQuery("deletionMode").String(string(v.DeletionMode)) + } + + if v.SourceFileSystemId == nil || len(*v.SourceFileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SourceFileSystemId must not be empty")} + } + if v.SourceFileSystemId != nil { + if err := encoder.SetURI("SourceFileSystemId").String(*v.SourceFileSystemId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteTags struct { +} + +func (*awsRestjson1_serializeOpDeleteTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DeleteTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/delete-tags/{FileSystemId}") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteTagsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeleteTagsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteTagsInput(v *DeleteTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteTagsInput(v *DeleteTagsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.TagKeys != nil { + ok := object.Key("TagKeys") + if err := awsRestjson1_serializeDocumentTagKeys(v.TagKeys, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeAccessPoints struct { +} + +func (*awsRestjson1_serializeOpDescribeAccessPoints) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeAccessPoints) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeAccessPointsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/access-points") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeAccessPointsInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeAccessPointsInput(v *DescribeAccessPointsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AccessPointId != nil { + encoder.SetQuery("AccessPointId").String(*v.AccessPointId) + } + + if v.FileSystemId != nil { + encoder.SetQuery("FileSystemId").String(*v.FileSystemId) + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeAccountPreferences struct { +} + +func (*awsRestjson1_serializeOpDescribeAccountPreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeAccountPreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeAccountPreferencesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/account-preferences") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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_serializeOpDocumentDescribeAccountPreferencesInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeAccountPreferencesInput(v *DescribeAccountPreferencesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribeAccountPreferencesInput(v *DescribeAccountPreferencesInput, 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) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeBackupPolicy struct { +} + +func (*awsRestjson1_serializeOpDescribeBackupPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeBackupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeBackupPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}/backup-policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeBackupPolicyInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeBackupPolicyInput(v *DescribeBackupPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeFileSystemPolicy struct { +} + +func (*awsRestjson1_serializeOpDescribeFileSystemPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeFileSystemPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeFileSystemPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}/policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeFileSystemPolicyInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeFileSystemPolicyInput(v *DescribeFileSystemPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeFileSystems struct { +} + +func (*awsRestjson1_serializeOpDescribeFileSystems) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeFileSystems) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeFileSystemsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeFileSystemsInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeFileSystemsInput(v *DescribeFileSystemsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.CreationToken != nil { + encoder.SetQuery("CreationToken").String(*v.CreationToken) + } + + if v.FileSystemId != nil { + encoder.SetQuery("FileSystemId").String(*v.FileSystemId) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeLifecycleConfiguration struct { +} + +func (*awsRestjson1_serializeOpDescribeLifecycleConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeLifecycleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeLifecycleConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeLifecycleConfigurationInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeLifecycleConfigurationInput(v *DescribeLifecycleConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeMountTargets struct { +} + +func (*awsRestjson1_serializeOpDescribeMountTargets) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeMountTargets) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeMountTargetsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/mount-targets") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeMountTargetsInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeMountTargetsInput(v *DescribeMountTargetsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AccessPointId != nil { + encoder.SetQuery("AccessPointId").String(*v.AccessPointId) + } + + if v.FileSystemId != nil { + encoder.SetQuery("FileSystemId").String(*v.FileSystemId) + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + if v.MountTargetId != nil { + encoder.SetQuery("MountTargetId").String(*v.MountTargetId) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeMountTargetSecurityGroups struct { +} + +func (*awsRestjson1_serializeOpDescribeMountTargetSecurityGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeMountTargetSecurityGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeMountTargetSecurityGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/mount-targets/{MountTargetId}/security-groups") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeMountTargetSecurityGroupsInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeMountTargetSecurityGroupsInput(v *DescribeMountTargetSecurityGroupsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MountTargetId == nil || len(*v.MountTargetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MountTargetId must not be empty")} + } + if v.MountTargetId != nil { + if err := encoder.SetURI("MountTargetId").String(*v.MountTargetId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeReplicationConfigurations struct { +} + +func (*awsRestjson1_serializeOpDescribeReplicationConfigurations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeReplicationConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeReplicationConfigurationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/replication-configurations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeReplicationConfigurationsInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeReplicationConfigurationsInput(v *DescribeReplicationConfigurationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId != nil { + encoder.SetQuery("FileSystemId").String(*v.FileSystemId) + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpDescribeTags struct { +} + +func (*awsRestjson1_serializeOpDescribeTags) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*DescribeTagsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/tags/{FileSystemId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsDescribeTagsInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeTagsInput(v *DescribeTagsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + if v.Marker != nil { + encoder.SetQuery("Marker").String(*v.Marker) + } + + if v.MaxItems != nil { + encoder.SetQuery("MaxItems").Integer(*v.MaxItems) + } + + return nil +} + +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/resource-tags/{ResourceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != nil { + encoder.SetQuery("MaxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("NextToken").String(*v.NextToken) + } + + if v.ResourceId == nil || len(*v.ResourceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")} + } + if v.ResourceId != nil { + if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpModifyMountTargetSecurityGroups struct { +} + +func (*awsRestjson1_serializeOpModifyMountTargetSecurityGroups) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpModifyMountTargetSecurityGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*ModifyMountTargetSecurityGroupsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/mount-targets/{MountTargetId}/security-groups") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsModifyMountTargetSecurityGroupsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentModifyMountTargetSecurityGroupsInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsModifyMountTargetSecurityGroupsInput(v *ModifyMountTargetSecurityGroupsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MountTargetId == nil || len(*v.MountTargetId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MountTargetId must not be empty")} + } + if v.MountTargetId != nil { + if err := encoder.SetURI("MountTargetId").String(*v.MountTargetId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentModifyMountTargetSecurityGroupsInput(v *ModifyMountTargetSecurityGroupsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.SecurityGroups != nil { + ok := object.Key("SecurityGroups") + if err := awsRestjson1_serializeDocumentSecurityGroups(v.SecurityGroups, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPutAccountPreferences struct { +} + +func (*awsRestjson1_serializeOpPutAccountPreferences) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutAccountPreferences) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*PutAccountPreferencesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/account-preferences") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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_serializeOpDocumentPutAccountPreferencesInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutAccountPreferencesInput(v *PutAccountPreferencesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutAccountPreferencesInput(v *PutAccountPreferencesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ResourceIdType) > 0 { + ok := object.Key("ResourceIdType") + ok.String(string(v.ResourceIdType)) + } + + return nil +} + +type awsRestjson1_serializeOpPutBackupPolicy struct { +} + +func (*awsRestjson1_serializeOpPutBackupPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutBackupPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*PutBackupPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}/backup-policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutBackupPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutBackupPolicyInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutBackupPolicyInput(v *PutBackupPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutBackupPolicyInput(v *PutBackupPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BackupPolicy != nil { + ok := object.Key("BackupPolicy") + if err := awsRestjson1_serializeDocumentBackupPolicy(v.BackupPolicy, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPutFileSystemPolicy struct { +} + +func (*awsRestjson1_serializeOpPutFileSystemPolicy) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutFileSystemPolicy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*PutFileSystemPolicyInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}/policy") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutFileSystemPolicyInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutFileSystemPolicyInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutFileSystemPolicyInput(v *PutFileSystemPolicyInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutFileSystemPolicyInput(v *PutFileSystemPolicyInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BypassPolicyLockoutSafetyCheck { + ok := object.Key("BypassPolicyLockoutSafetyCheck") + ok.Boolean(v.BypassPolicyLockoutSafetyCheck) + } + + if v.Policy != nil { + ok := object.Key("Policy") + ok.String(*v.Policy) + } + + return nil +} + +type awsRestjson1_serializeOpPutLifecycleConfiguration struct { +} + +func (*awsRestjson1_serializeOpPutLifecycleConfiguration) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutLifecycleConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*PutLifecycleConfigurationInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsPutLifecycleConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutLifecycleConfigurationInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPutLifecycleConfigurationInput(v *PutLifecycleConfigurationInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutLifecycleConfigurationInput(v *PutLifecycleConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LifecyclePolicies != nil { + ok := object.Key("LifecyclePolicies") + if err := awsRestjson1_serializeDocumentLifecyclePolicies(v.LifecyclePolicies, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/resource-tags/{ResourceId}") + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceId == nil || len(*v.ResourceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")} + } + if v.ResourceId != nil { + if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTags(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/resource-tags/{ResourceId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); 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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceId == nil || len(*v.ResourceId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceId must not be empty")} + } + if v.ResourceId != nil { + if err := encoder.SetURI("ResourceId").String(*v.ResourceId); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + +type awsRestjson1_serializeOpUpdateFileSystem struct { +} + +func (*awsRestjson1_serializeOpUpdateFileSystem) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateFileSystem) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateFileSystemInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateFileSystemInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateFileSystemInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateFileSystemInput(v *UpdateFileSystemInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateFileSystemInput(v *UpdateFileSystemInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ProvisionedThroughputInMibps != nil { + ok := object.Key("ProvisionedThroughputInMibps") + switch { + case math.IsNaN(*v.ProvisionedThroughputInMibps): + ok.String("NaN") + + case math.IsInf(*v.ProvisionedThroughputInMibps, 1): + ok.String("Infinity") + + case math.IsInf(*v.ProvisionedThroughputInMibps, -1): + ok.String("-Infinity") + + default: + ok.Double(*v.ProvisionedThroughputInMibps) + + } + } + + if len(v.ThroughputMode) > 0 { + ok := object.Key("ThroughputMode") + ok.String(string(v.ThroughputMode)) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateFileSystemProtection struct { +} + +func (*awsRestjson1_serializeOpUpdateFileSystemProtection) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateFileSystemProtection) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + 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.(*UpdateFileSystemProtectionInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/2015-02-01/file-systems/{FileSystemId}/protection") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateFileSystemProtectionInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateFileSystemProtectionInput(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 + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateFileSystemProtectionInput(v *UpdateFileSystemProtectionInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FileSystemId == nil || len(*v.FileSystemId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FileSystemId must not be empty")} + } + if v.FileSystemId != nil { + if err := encoder.SetURI("FileSystemId").String(*v.FileSystemId); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateFileSystemProtectionInput(v *UpdateFileSystemProtectionInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.ReplicationOverwriteProtection) > 0 { + ok := object.Key("ReplicationOverwriteProtection") + ok.String(string(v.ReplicationOverwriteProtection)) + } + + return nil +} + +func awsRestjson1_serializeDocumentBackupPolicy(v *types.BackupPolicy, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Status) > 0 { + ok := object.Key("Status") + ok.String(string(v.Status)) + } + + return nil +} + +func awsRestjson1_serializeDocumentCreationInfo(v *types.CreationInfo, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.OwnerGid != nil { + ok := object.Key("OwnerGid") + ok.Long(*v.OwnerGid) + } + + if v.OwnerUid != nil { + ok := object.Key("OwnerUid") + ok.Long(*v.OwnerUid) + } + + if v.Permissions != nil { + ok := object.Key("Permissions") + ok.String(*v.Permissions) + } + + return nil +} + +func awsRestjson1_serializeDocumentDestinationsToCreate(v []types.DestinationToCreate, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentDestinationToCreate(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentDestinationToCreate(v *types.DestinationToCreate, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AvailabilityZoneName != nil { + ok := object.Key("AvailabilityZoneName") + ok.String(*v.AvailabilityZoneName) + } + + if v.FileSystemId != nil { + ok := object.Key("FileSystemId") + ok.String(*v.FileSystemId) + } + + if v.KmsKeyId != nil { + ok := object.Key("KmsKeyId") + ok.String(*v.KmsKeyId) + } + + if v.Region != nil { + ok := object.Key("Region") + ok.String(*v.Region) + } + + if v.RoleArn != nil { + ok := object.Key("RoleArn") + ok.String(*v.RoleArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentLifecyclePolicies(v []types.LifecyclePolicy, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentLifecyclePolicy(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentLifecyclePolicy(v *types.LifecyclePolicy, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.TransitionToArchive) > 0 { + ok := object.Key("TransitionToArchive") + ok.String(string(v.TransitionToArchive)) + } + + if len(v.TransitionToIA) > 0 { + ok := object.Key("TransitionToIA") + ok.String(string(v.TransitionToIA)) + } + + if len(v.TransitionToPrimaryStorageClass) > 0 { + ok := object.Key("TransitionToPrimaryStorageClass") + ok.String(string(v.TransitionToPrimaryStorageClass)) + } + + return nil +} + +func awsRestjson1_serializeDocumentPosixUser(v *types.PosixUser, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Gid != nil { + ok := object.Key("Gid") + ok.Long(*v.Gid) + } + + if v.SecondaryGids != nil { + ok := object.Key("SecondaryGids") + if err := awsRestjson1_serializeDocumentSecondaryGids(v.SecondaryGids, ok); err != nil { + return err + } + } + + if v.Uid != nil { + ok := object.Key("Uid") + ok.Long(*v.Uid) + } + + return nil +} + +func awsRestjson1_serializeDocumentRootDirectory(v *types.RootDirectory, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CreationInfo != nil { + ok := object.Key("CreationInfo") + if err := awsRestjson1_serializeDocumentCreationInfo(v.CreationInfo, ok); err != nil { + return err + } + } + + if v.Path != nil { + ok := object.Key("Path") + ok.String(*v.Path) + } + + return nil +} + +func awsRestjson1_serializeDocumentSecondaryGids(v []int64, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.Long(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentSecurityGroups(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 awsRestjson1_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("Key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentTagKeys(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 awsRestjson1_serializeDocumentTags(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/types/enums.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/types/enums.go new file mode 100644 index 0000000000..88dab0f3a9 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/types/enums.go @@ -0,0 +1,304 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +type DeletionMode string + +// Enum values for DeletionMode +const ( + DeletionModeAllConfigurations DeletionMode = "ALL_CONFIGURATIONS" + DeletionModeLocalConfigurationOnly DeletionMode = "LOCAL_CONFIGURATION_ONLY" +) + +// Values returns all known values for DeletionMode. 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 (DeletionMode) Values() []DeletionMode { + return []DeletionMode{ + "ALL_CONFIGURATIONS", + "LOCAL_CONFIGURATION_ONLY", + } +} + +type IpAddressType string + +// Enum values for IpAddressType +const ( + IpAddressTypeIpv4Only IpAddressType = "IPV4_ONLY" + IpAddressTypeIpv6Only IpAddressType = "IPV6_ONLY" + IpAddressTypeDualStack IpAddressType = "DUAL_STACK" +) + +// Values returns all known values for IpAddressType. 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 (IpAddressType) Values() []IpAddressType { + return []IpAddressType{ + "IPV4_ONLY", + "IPV6_ONLY", + "DUAL_STACK", + } +} + +type LifeCycleState string + +// Enum values for LifeCycleState +const ( + LifeCycleStateCreating LifeCycleState = "creating" + LifeCycleStateAvailable LifeCycleState = "available" + LifeCycleStateUpdating LifeCycleState = "updating" + LifeCycleStateDeleting LifeCycleState = "deleting" + LifeCycleStateDeleted LifeCycleState = "deleted" + LifeCycleStateError LifeCycleState = "error" +) + +// Values returns all known values for LifeCycleState. 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 (LifeCycleState) Values() []LifeCycleState { + return []LifeCycleState{ + "creating", + "available", + "updating", + "deleting", + "deleted", + "error", + } +} + +type PerformanceMode string + +// Enum values for PerformanceMode +const ( + PerformanceModeGeneralPurpose PerformanceMode = "generalPurpose" + PerformanceModeMaxIo PerformanceMode = "maxIO" +) + +// Values returns all known values for PerformanceMode. 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 (PerformanceMode) Values() []PerformanceMode { + return []PerformanceMode{ + "generalPurpose", + "maxIO", + } +} + +type ReplicationOverwriteProtection string + +// Enum values for ReplicationOverwriteProtection +const ( + ReplicationOverwriteProtectionEnabled ReplicationOverwriteProtection = "ENABLED" + ReplicationOverwriteProtectionDisabled ReplicationOverwriteProtection = "DISABLED" + ReplicationOverwriteProtectionReplicating ReplicationOverwriteProtection = "REPLICATING" +) + +// Values returns all known values for ReplicationOverwriteProtection. 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 (ReplicationOverwriteProtection) Values() []ReplicationOverwriteProtection { + return []ReplicationOverwriteProtection{ + "ENABLED", + "DISABLED", + "REPLICATING", + } +} + +type ReplicationStatus string + +// Enum values for ReplicationStatus +const ( + ReplicationStatusEnabled ReplicationStatus = "ENABLED" + ReplicationStatusEnabling ReplicationStatus = "ENABLING" + ReplicationStatusDeleting ReplicationStatus = "DELETING" + ReplicationStatusError ReplicationStatus = "ERROR" + ReplicationStatusPaused ReplicationStatus = "PAUSED" + ReplicationStatusPausing ReplicationStatus = "PAUSING" +) + +// Values returns all known values for ReplicationStatus. 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 (ReplicationStatus) Values() []ReplicationStatus { + return []ReplicationStatus{ + "ENABLED", + "ENABLING", + "DELETING", + "ERROR", + "PAUSED", + "PAUSING", + } +} + +type Resource string + +// Enum values for Resource +const ( + ResourceFileSystem Resource = "FILE_SYSTEM" + ResourceMountTarget Resource = "MOUNT_TARGET" +) + +// Values returns all known values for Resource. 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 (Resource) Values() []Resource { + return []Resource{ + "FILE_SYSTEM", + "MOUNT_TARGET", + } +} + +type ResourceIdType string + +// Enum values for ResourceIdType +const ( + ResourceIdTypeLongId ResourceIdType = "LONG_ID" + ResourceIdTypeShortId ResourceIdType = "SHORT_ID" +) + +// Values returns all known values for ResourceIdType. 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 (ResourceIdType) Values() []ResourceIdType { + return []ResourceIdType{ + "LONG_ID", + "SHORT_ID", + } +} + +type Status string + +// Enum values for Status +const ( + StatusEnabled Status = "ENABLED" + StatusEnabling Status = "ENABLING" + StatusDisabled Status = "DISABLED" + StatusDisabling Status = "DISABLING" +) + +// Values returns all known values for Status. 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 (Status) Values() []Status { + return []Status{ + "ENABLED", + "ENABLING", + "DISABLED", + "DISABLING", + } +} + +type ThroughputMode string + +// Enum values for ThroughputMode +const ( + ThroughputModeBursting ThroughputMode = "bursting" + ThroughputModeProvisioned ThroughputMode = "provisioned" + ThroughputModeElastic ThroughputMode = "elastic" +) + +// Values returns all known values for ThroughputMode. 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 (ThroughputMode) Values() []ThroughputMode { + return []ThroughputMode{ + "bursting", + "provisioned", + "elastic", + } +} + +type TransitionToArchiveRules string + +// Enum values for TransitionToArchiveRules +const ( + TransitionToArchiveRulesAfter1Day TransitionToArchiveRules = "AFTER_1_DAY" + TransitionToArchiveRulesAfter7Days TransitionToArchiveRules = "AFTER_7_DAYS" + TransitionToArchiveRulesAfter14Days TransitionToArchiveRules = "AFTER_14_DAYS" + TransitionToArchiveRulesAfter30Days TransitionToArchiveRules = "AFTER_30_DAYS" + TransitionToArchiveRulesAfter60Days TransitionToArchiveRules = "AFTER_60_DAYS" + TransitionToArchiveRulesAfter90Days TransitionToArchiveRules = "AFTER_90_DAYS" + TransitionToArchiveRulesAfter180Days TransitionToArchiveRules = "AFTER_180_DAYS" + TransitionToArchiveRulesAfter270Days TransitionToArchiveRules = "AFTER_270_DAYS" + TransitionToArchiveRulesAfter365Days TransitionToArchiveRules = "AFTER_365_DAYS" +) + +// Values returns all known values for TransitionToArchiveRules. 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 (TransitionToArchiveRules) Values() []TransitionToArchiveRules { + return []TransitionToArchiveRules{ + "AFTER_1_DAY", + "AFTER_7_DAYS", + "AFTER_14_DAYS", + "AFTER_30_DAYS", + "AFTER_60_DAYS", + "AFTER_90_DAYS", + "AFTER_180_DAYS", + "AFTER_270_DAYS", + "AFTER_365_DAYS", + } +} + +type TransitionToIARules string + +// Enum values for TransitionToIARules +const ( + TransitionToIARulesAfter7Days TransitionToIARules = "AFTER_7_DAYS" + TransitionToIARulesAfter14Days TransitionToIARules = "AFTER_14_DAYS" + TransitionToIARulesAfter30Days TransitionToIARules = "AFTER_30_DAYS" + TransitionToIARulesAfter60Days TransitionToIARules = "AFTER_60_DAYS" + TransitionToIARulesAfter90Days TransitionToIARules = "AFTER_90_DAYS" + TransitionToIARulesAfter1Day TransitionToIARules = "AFTER_1_DAY" + TransitionToIARulesAfter180Days TransitionToIARules = "AFTER_180_DAYS" + TransitionToIARulesAfter270Days TransitionToIARules = "AFTER_270_DAYS" + TransitionToIARulesAfter365Days TransitionToIARules = "AFTER_365_DAYS" +) + +// Values returns all known values for TransitionToIARules. 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 (TransitionToIARules) Values() []TransitionToIARules { + return []TransitionToIARules{ + "AFTER_7_DAYS", + "AFTER_14_DAYS", + "AFTER_30_DAYS", + "AFTER_60_DAYS", + "AFTER_90_DAYS", + "AFTER_1_DAY", + "AFTER_180_DAYS", + "AFTER_270_DAYS", + "AFTER_365_DAYS", + } +} + +type TransitionToPrimaryStorageClassRules string + +// Enum values for TransitionToPrimaryStorageClassRules +const ( + TransitionToPrimaryStorageClassRulesAfter1Access TransitionToPrimaryStorageClassRules = "AFTER_1_ACCESS" +) + +// Values returns all known values for TransitionToPrimaryStorageClassRules. 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 (TransitionToPrimaryStorageClassRules) Values() []TransitionToPrimaryStorageClassRules { + return []TransitionToPrimaryStorageClassRules{ + "AFTER_1_ACCESS", + } +} diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/types/errors.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/types/errors.go new file mode 100644 index 0000000000..a532bdc38d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/types/errors.go @@ -0,0 +1,950 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + "fmt" + smithy "github.com/aws/smithy-go" +) + +// Returned if the access point that you are trying to create already exists, with +// the creation token you provided in the request. +type AccessPointAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + AccessPointId *string + + noSmithyDocumentSerde +} + +func (e *AccessPointAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessPointAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessPointAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessPointAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *AccessPointAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the Amazon Web Services account has already created the maximum +// number of access points allowed per file system. For more informaton, see [https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region]. +// +// [https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region]: https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region +type AccessPointLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *AccessPointLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessPointLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessPointLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessPointLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *AccessPointLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the specified AccessPointId value doesn't exist in the requester's +// Amazon Web Services account. +type AccessPointNotFound struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *AccessPointNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AccessPointNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AccessPointNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AccessPointNotFound" + } + return *e.ErrorCodeOverride +} +func (e *AccessPointNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the Availability Zone that was specified for a mount target is +// different from the Availability Zone that was specified for One Zone storage. +// For more information, see [Regional and One Zone storage redundancy]. +// +// [Regional and One Zone storage redundancy]: https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html +type AvailabilityZonesMismatch struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *AvailabilityZonesMismatch) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *AvailabilityZonesMismatch) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *AvailabilityZonesMismatch) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "AvailabilityZonesMismatch" + } + return *e.ErrorCodeOverride +} +func (e *AvailabilityZonesMismatch) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the request is malformed or contains an error such as an invalid +// parameter value or a missing required parameter. +type BadRequest struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *BadRequest) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *BadRequest) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *BadRequest) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "BadRequest" + } + return *e.ErrorCodeOverride +} +func (e *BadRequest) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the source file system in a replication is encrypted but the +// destination file system is unencrypted. +type ConflictException struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The service timed out trying to fulfill the request, and the client should try +// the call again. +type DependencyTimeout struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *DependencyTimeout) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *DependencyTimeout) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *DependencyTimeout) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "DependencyTimeout" + } + return *e.ErrorCodeOverride +} +func (e *DependencyTimeout) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Returned if the file system you are trying to create already exists, with the +// creation token you provided. +type FileSystemAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + FileSystemId *string + + noSmithyDocumentSerde +} + +func (e *FileSystemAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FileSystemAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FileSystemAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FileSystemAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *FileSystemAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if a file system has mount targets. +type FileSystemInUse struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *FileSystemInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FileSystemInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FileSystemInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FileSystemInUse" + } + return *e.ErrorCodeOverride +} +func (e *FileSystemInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the Amazon Web Services account has already created the maximum +// number of file systems allowed per account. +type FileSystemLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *FileSystemLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FileSystemLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FileSystemLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FileSystemLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *FileSystemLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the specified FileSystemId value doesn't exist in the requester's +// Amazon Web Services account. +type FileSystemNotFound struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *FileSystemNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *FileSystemNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *FileSystemNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "FileSystemNotFound" + } + return *e.ErrorCodeOverride +} +func (e *FileSystemNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the file system's lifecycle state is not "available". +type IncorrectFileSystemLifeCycleState struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *IncorrectFileSystemLifeCycleState) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IncorrectFileSystemLifeCycleState) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IncorrectFileSystemLifeCycleState) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IncorrectFileSystemLifeCycleState" + } + return *e.ErrorCodeOverride +} +func (e *IncorrectFileSystemLifeCycleState) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the mount target is not in the correct state for the operation. +type IncorrectMountTargetState struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *IncorrectMountTargetState) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IncorrectMountTargetState) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IncorrectMountTargetState) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IncorrectMountTargetState" + } + return *e.ErrorCodeOverride +} +func (e *IncorrectMountTargetState) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if there's not enough capacity to provision additional throughput. +// This value might be returned when you try to create a file system in provisioned +// throughput mode, when you attempt to increase the provisioned throughput of an +// existing file system, or when you attempt to change an existing file system from +// Bursting Throughput to Provisioned Throughput mode. Try again later. +type InsufficientThroughputCapacity struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *InsufficientThroughputCapacity) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InsufficientThroughputCapacity) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InsufficientThroughputCapacity) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InsufficientThroughputCapacity" + } + return *e.ErrorCodeOverride +} +func (e *InsufficientThroughputCapacity) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Returned if an error occurred on the server side. +type InternalServerError struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *InternalServerError) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InternalServerError) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InternalServerError) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InternalServerError" + } + return *e.ErrorCodeOverride +} +func (e *InternalServerError) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } + +// Returned if the FileSystemPolicy is malformed or contains an error such as a +// parameter value that is not valid or a missing required parameter. Returned in +// the case of a policy lockout safety check error. +type InvalidPolicyException struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *InvalidPolicyException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *InvalidPolicyException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *InvalidPolicyException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "InvalidPolicyException" + } + return *e.ErrorCodeOverride +} +func (e *InvalidPolicyException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the request specified an IpAddress that is already in use in the +// subnet. +type IpAddressInUse struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *IpAddressInUse) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *IpAddressInUse) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *IpAddressInUse) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "IpAddressInUse" + } + return *e.ErrorCodeOverride +} +func (e *IpAddressInUse) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the mount target would violate one of the specified restrictions +// based on the file system's existing mount targets. +type MountTargetConflict struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *MountTargetConflict) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MountTargetConflict) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MountTargetConflict) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MountTargetConflict" + } + return *e.ErrorCodeOverride +} +func (e *MountTargetConflict) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if there is no mount target with the specified ID found in the +// caller's Amazon Web Services account. +type MountTargetNotFound struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *MountTargetNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *MountTargetNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *MountTargetNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "MountTargetNotFound" + } + return *e.ErrorCodeOverride +} +func (e *MountTargetNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// The calling account has reached the limit for elastic network interfaces for +// the specific Amazon Web Services Region. Either delete some network interfaces +// or request that the account quota be raised. For more information, see [Amazon VPC Quotas]in the +// Amazon VPC User Guide (see the Network interfaces per Region entry in the +// Network interfaces table). +// +// [Amazon VPC Quotas]: https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html +type NetworkInterfaceLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *NetworkInterfaceLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NetworkInterfaceLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NetworkInterfaceLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NetworkInterfaceLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *NetworkInterfaceLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if IpAddress was not specified in the request and there are no free IP +// addresses in the subnet. +type NoFreeAddressesInSubnet struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *NoFreeAddressesInSubnet) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *NoFreeAddressesInSubnet) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *NoFreeAddressesInSubnet) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "NoFreeAddressesInSubnet" + } + return *e.ErrorCodeOverride +} +func (e *NoFreeAddressesInSubnet) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if no backup is specified for a One Zone EFS file system. +type PolicyNotFound struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *PolicyNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *PolicyNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *PolicyNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "PolicyNotFound" + } + return *e.ErrorCodeOverride +} +func (e *PolicyNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the file system is already included in a replication configuration.> +type ReplicationAlreadyExists struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *ReplicationAlreadyExists) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ReplicationAlreadyExists) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ReplicationAlreadyExists) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ReplicationAlreadyExists" + } + return *e.ErrorCodeOverride +} +func (e *ReplicationAlreadyExists) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the specified file system does not have a replication configuration. +type ReplicationNotFound struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *ReplicationNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ReplicationNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ReplicationNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ReplicationNotFound" + } + return *e.ErrorCodeOverride +} +func (e *ReplicationNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the number of SecurityGroups specified in the request is greater +// than the limit, which is based on account quota. Either delete some security +// groups or request that the account quota be raised. For more information, see [Amazon VPC Quotas] +// in the Amazon VPC User Guide (see the Security Groups table). +// +// [Amazon VPC Quotas]: https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html +type SecurityGroupLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *SecurityGroupLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SecurityGroupLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SecurityGroupLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SecurityGroupLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *SecurityGroupLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if one of the specified security groups doesn't exist in the subnet's +// virtual private cloud (VPC). +type SecurityGroupNotFound struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *SecurityGroupNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SecurityGroupNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SecurityGroupNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SecurityGroupNotFound" + } + return *e.ErrorCodeOverride +} +func (e *SecurityGroupNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if there is no subnet with ID SubnetId provided in the request. +type SubnetNotFound struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *SubnetNotFound) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *SubnetNotFound) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *SubnetNotFound) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "SubnetNotFound" + } + return *e.ErrorCodeOverride +} +func (e *SubnetNotFound) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned when the CreateAccessPoint API action is called too quickly and the +// number of Access Points on the file system is nearing the [limit of 120]. +// +// [limit of 120]: https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region +type ThrottlingException struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *ThrottlingException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThrottlingException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThrottlingException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThrottlingException" + } + return *e.ErrorCodeOverride +} +func (e *ThrottlingException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the throughput mode or amount of provisioned throughput can't be +// changed because the throughput limit of 1024 MiB/s has been reached. +type ThroughputLimitExceeded struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *ThroughputLimitExceeded) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ThroughputLimitExceeded) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ThroughputLimitExceeded) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ThroughputLimitExceeded" + } + return *e.ErrorCodeOverride +} +func (e *ThroughputLimitExceeded) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if you don’t wait at least 24 hours before either changing the +// throughput mode, or decreasing the Provisioned Throughput value. +type TooManyRequests struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *TooManyRequests) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *TooManyRequests) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *TooManyRequests) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "TooManyRequests" + } + return *e.ErrorCodeOverride +} +func (e *TooManyRequests) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the requested Amazon EFS functionality is not available in the +// specified Availability Zone. +type UnsupportedAvailabilityZone struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *UnsupportedAvailabilityZone) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *UnsupportedAvailabilityZone) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *UnsupportedAvailabilityZone) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "UnsupportedAvailabilityZone" + } + return *e.ErrorCodeOverride +} +func (e *UnsupportedAvailabilityZone) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Returned if the Backup service is not available in the Amazon Web Services +// Region in which the request was made. +type ValidationException struct { + Message *string + + ErrorCodeOverride *string + + ErrorCode_ *string + + noSmithyDocumentSerde +} + +func (e *ValidationException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ValidationException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ValidationException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ValidationException" + } + return *e.ErrorCodeOverride +} +func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/types/types.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/types/types.go new file mode 100644 index 0000000000..883260fac4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/types/types.go @@ -0,0 +1,611 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types + +import ( + smithydocument "github.com/aws/smithy-go/document" + "time" +) + +// Provides a description of an EFS file system access point. +type AccessPointDescription struct { + + // The unique Amazon Resource Name (ARN) associated with the access point. + AccessPointArn *string + + // The ID of the access point, assigned by Amazon EFS. + AccessPointId *string + + // The opaque string specified in the request to ensure idempotent creation. + ClientToken *string + + // The ID of the EFS file system that the access point applies to. + FileSystemId *string + + // Identifies the lifecycle phase of the access point. + LifeCycleState LifeCycleState + + // The name of the access point. This is the value of the Name tag. + Name *string + + // Identifies the Amazon Web Services account that owns the access point resource. + OwnerId *string + + // The full POSIX identity, including the user ID, group ID, and secondary group + // IDs on the access point that is used for all file operations by NFS clients + // using the access point. + PosixUser *PosixUser + + // The directory on the EFS file system that the access point exposes as the root + // directory to NFS clients using the access point. + RootDirectory *RootDirectory + + // The tags associated with the access point, presented as an array of Tag objects. + Tags []Tag + + noSmithyDocumentSerde +} + +// The backup policy for the file system used to create automatic daily backups. +// If status has a value of ENABLED , the file system is being automatically backed +// up. For more information, see [Automatic backups]. +// +// [Automatic backups]: https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups +type BackupPolicy struct { + + // Describes the status of the file system's backup policy. + // + // - ENABLED – EFS is automatically backing up the file system. + // + // - ENABLING – EFS is turning on automatic backups for the file system. + // + // - DISABLED – Automatic back ups are turned off for the file system. + // + // - DISABLING – EFS is turning off automatic backups for the file system. + // + // This member is required. + Status Status + + noSmithyDocumentSerde +} + +// Required if the RootDirectory > Path specified does not exist. Specifies the +// POSIX IDs and permissions to apply to the access point's RootDirectory > Path . +// If the access point root directory does not exist, EFS creates it with these +// settings when a client connects to the access point. When specifying +// CreationInfo , you must include values for all properties. +// +// Amazon EFS creates a root directory only if you have provided the CreationInfo: +// OwnUid, OwnGID, and permissions for the directory. If you do not provide this +// information, Amazon EFS does not create the root directory. If the root +// directory does not exist, attempts to mount using the access point will fail. +// +// If you do not provide CreationInfo and the specified RootDirectory does not +// exist, attempts to mount the file system using the access point will fail. +type CreationInfo struct { + + // Specifies the POSIX group ID to apply to the RootDirectory . Accepts values from + // 0 to 2^32 (4294967295). + // + // This member is required. + OwnerGid *int64 + + // Specifies the POSIX user ID to apply to the RootDirectory . Accepts values from + // 0 to 2^32 (4294967295). + // + // This member is required. + OwnerUid *int64 + + // Specifies the POSIX permissions to apply to the RootDirectory , in the format of + // an octal number representing the file's mode bits. + // + // This member is required. + Permissions *string + + noSmithyDocumentSerde +} + +// Describes the destination file system in the replication configuration. +type Destination struct { + + // The ID of the destination Amazon EFS file system. + // + // This member is required. + FileSystemId *string + + // The Amazon Web Services Region in which the destination file system is located. + // + // This member is required. + Region *string + + // Describes the status of the replication configuration. For more information + // about replication status, see [Viewing replication details]in the Amazon EFS User Guide. + // + // [Viewing replication details]: https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html + // + // This member is required. + Status ReplicationStatus + + // The time when the most recent sync was successfully completed on the + // destination file system. Any changes to data on the source file system that + // occurred before this time have been successfully replicated to the destination + // file system. Any changes that occurred after this time might not be fully + // replicated. + LastReplicatedTimestamp *time.Time + + // ID of the Amazon Web Services account in which the destination file system + // resides. + OwnerId *string + + // Amazon Resource Name (ARN) of the IAM role in the source account that allows + // Amazon EFS to perform replication on its behalf. This is optional for + // same-account replication and required for cross-account replication. + RoleArn *string + + // Message that provides details about the PAUSED or ERRROR state of the + // replication destination configuration. For more information about replication + // status messages, see [Viewing replication details]in the Amazon EFS User Guide. + // + // [Viewing replication details]: https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html + StatusMessage *string + + noSmithyDocumentSerde +} + +// Describes the new or existing destination file system for the replication +// configuration. +// +// - If you want to replicate to a new file system, do not specify the File +// System ID for the destination file system. Amazon EFS creates a new, empty file +// system. For One Zone storage, specify the Availability Zone to create the file +// system in. To use an Key Management Service key other than the default KMS key, +// then specify it. For more information, see [Configuring replication to new Amazon EFS file system]in the Amazon EFS User Guide. +// +// After the file system is created, you cannot change the KMS key or the +// +// performance mode. +// +// - If you want to replicate to an existing file system that's in the same +// account as the source file system, then you need to provide the ID or Amazon +// Resource Name (ARN) of the file system to which to replicate. The file system's +// replication overwrite protection must be disabled. For more information, see [Replicating to an existing file system] +// in the Amazon EFS User Guide. +// +// - If you are replicating the file system to a file system that's in a +// different account than the source file system (cross-account replication), you +// need to provide the ARN for the file system and the IAM role that allows Amazon +// EFS to perform replication on the destination account. The file system's +// replication overwrite protection must be disabled. For more information, see [Replicating across Amazon Web Services accounts] +// in the Amazon EFS User Guide. +// +// [Configuring replication to new Amazon EFS file system]: https://docs.aws.amazon.com/efs/latest/ug/create-replication.html +// +// [Replicating across Amazon Web Services accounts]: https://docs.aws.amazon.com/efs/latest/ug/cross-account-replication.html +// [Replicating to an existing file system]: https://docs.aws.amazon.com/efs/latest/ug/efs-replication#replicate-existing-destination +type DestinationToCreate struct { + + // To create a file system that uses One Zone storage, specify the name of the + // Availability Zone in which to create the destination file system. + AvailabilityZoneName *string + + // The ID or ARN of the file system to use for the destination. For cross-account + // replication, this must be an ARN. The file system's replication overwrite + // replication must be disabled. If no ID or ARN is specified, then a new file + // system is created. + // + // When you initially configure replication to an existing file system, Amazon EFS + // writes data to or removes existing data from the destination file system to + // match data in the source file system. If you don't want to change data in the + // destination file system, then you should replicate to a new file system instead. + // For more information, see [https://docs.aws.amazon.com/efs/latest/ug/create-replication.html]. + // + // [https://docs.aws.amazon.com/efs/latest/ug/create-replication.html]: https://docs.aws.amazon.com/efs/latest/ug/create-replication.html + FileSystemId *string + + // Specify the Key Management Service (KMS) key that you want to use to encrypt + // the destination file system. If you do not specify a KMS key, Amazon EFS uses + // your default KMS key for Amazon EFS, /aws/elasticfilesystem . This ID can be in + // one of the following formats: + // + // - Key ID - The unique identifier of the key, for example + // 1234abcd-12ab-34cd-56ef-1234567890ab . + // + // - ARN - The ARN for the key, for example + // arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab . + // + // - Key alias - A previously created display name for a key, for example + // alias/projectKey1 . + // + // - Key alias ARN - The ARN for a key alias, for example + // arn:aws:kms:us-west-2:444455556666:alias/projectKey1 . + KmsKeyId *string + + // To create a file system that uses Regional storage, specify the Amazon Web + // Services Region in which to create the destination file system. The Region must + // be enabled for the Amazon Web Services account that owns the source file system. + // For more information, see [Managing Amazon Web Services Regions]in the Amazon Web Services General Reference + // Reference Guide. + // + // [Managing Amazon Web Services Regions]: https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable + Region *string + + // Amazon Resource Name (ARN) of the IAM role in the source account that allows + // Amazon EFS to perform replication on its behalf. This is optional for + // same-account replication and required for cross-account replication. + RoleArn *string + + noSmithyDocumentSerde +} + +// A description of the file system. +type FileSystemDescription struct { + + // The time that the file system was created, in seconds (since + // 1970-01-01T00:00:00Z). + // + // This member is required. + CreationTime *time.Time + + // The opaque string specified in the request. + // + // This member is required. + CreationToken *string + + // The ID of the file system, assigned by Amazon EFS. + // + // This member is required. + FileSystemId *string + + // The lifecycle phase of the file system. + // + // This member is required. + LifeCycleState LifeCycleState + + // The current number of mount targets that the file system has. For more + // information, see CreateMountTarget. + // + // This member is required. + NumberOfMountTargets int32 + + // The Amazon Web Services account that created the file system. + // + // This member is required. + OwnerId *string + + // The performance mode of the file system. + // + // This member is required. + PerformanceMode PerformanceMode + + // The latest known metered size (in bytes) of data stored in the file system, in + // its Value field, and the time at which that size was determined in its Timestamp + // field. The Timestamp value is the integer number of seconds since + // 1970-01-01T00:00:00Z. The SizeInBytes value doesn't represent the size of a + // consistent snapshot of the file system, but it is eventually consistent when + // there are no writes to the file system. That is, SizeInBytes represents actual + // size only if the file system is not modified for a period longer than a couple + // of hours. Otherwise, the value is not the exact size that the file system was at + // any point in time. + // + // This member is required. + SizeInBytes *FileSystemSize + + // The tags associated with the file system, presented as an array of Tag objects. + // + // This member is required. + Tags []Tag + + // The unique and consistent identifier of the Availability Zone in which the file + // system is located, and is valid only for One Zone file systems. For example, + // use1-az1 is an Availability Zone ID for the us-east-1 Amazon Web Services + // Region, and it has the same location in every Amazon Web Services account. + AvailabilityZoneId *string + + // Describes the Amazon Web Services Availability Zone in which the file system is + // located, and is valid only for One Zone file systems. For more information, see [Using EFS storage classes] + // in the Amazon EFS User Guide. + // + // [Using EFS storage classes]: https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html + AvailabilityZoneName *string + + // A Boolean value that, if true, indicates that the file system is encrypted. + Encrypted *bool + + // The Amazon Resource Name (ARN) for the EFS file system, in the format + // arn:aws:elasticfilesystem:region:account-id:file-system/file-system-id . + // Example with sample data: + // arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567 + FileSystemArn *string + + // Describes the protection on the file system. + FileSystemProtection *FileSystemProtectionDescription + + // The ID of an KMS key used to protect the encrypted file system. + KmsKeyId *string + + // You can add tags to a file system, including a Name tag. For more information, + // see CreateFileSystem. If the file system has a Name tag, Amazon EFS returns the value in this + // field. + Name *string + + // The amount of provisioned throughput, measured in MiBps, for the file system. + // Valid for file systems using ThroughputMode set to provisioned . + ProvisionedThroughputInMibps *float64 + + // Displays the file system's throughput mode. For more information, see [Throughput modes] in the + // Amazon EFS User Guide. + // + // [Throughput modes]: https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes + ThroughputMode ThroughputMode + + noSmithyDocumentSerde +} + +// Describes the protection on a file system. +type FileSystemProtectionDescription struct { + + // The status of the file system's replication overwrite protection. + // + // - ENABLED – The file system cannot be used as the destination file system in a + // replication configuration. The file system is writeable. Replication overwrite + // protection is ENABLED by default. + // + // - DISABLED – The file system can be used as the destination file system in a + // replication configuration. The file system is read-only and can only be modified + // by EFS replication. + // + // - REPLICATING – The file system is being used as the destination file system + // in a replication configuration. The file system is read-only and is modified + // only by EFS replication. + // + // If the replication configuration is deleted, the file system's replication + // overwrite protection is re-enabled, the file system becomes writeable. + ReplicationOverwriteProtection ReplicationOverwriteProtection + + noSmithyDocumentSerde +} + +// The latest known metered size (in bytes) of data stored in the file system, in +// its Value field, and the time at which that size was determined in its Timestamp +// field. The value doesn't represent the size of a consistent snapshot of the file +// system, but it is eventually consistent when there are no writes to the file +// system. That is, the value represents the actual size only if the file system is +// not modified for a period longer than a couple of hours. Otherwise, the value is +// not necessarily the exact size the file system was at any instant in time. +type FileSystemSize struct { + + // The latest known metered size (in bytes) of data stored in the file system. + // + // This member is required. + Value int64 + + // The time at which the size of data, returned in the Value field, was + // determined. The value is the integer number of seconds since + // 1970-01-01T00:00:00Z. + Timestamp *time.Time + + // The latest known metered size (in bytes) of data stored in the Archive storage + // class. + ValueInArchive *int64 + + // The latest known metered size (in bytes) of data stored in the Infrequent + // Access storage class. + ValueInIA *int64 + + // The latest known metered size (in bytes) of data stored in the Standard storage + // class. + ValueInStandard *int64 + + noSmithyDocumentSerde +} + +// Describes a policy used by lifecycle management that specifies when to +// transition files into and out of storage classes. For more information, see [Managing file system storage]. +// +// When using the put-lifecycle-configuration CLI command or the +// PutLifecycleConfiguration API action, Amazon EFS requires that each +// LifecyclePolicy object have only a single transition. This means that in a +// request body, LifecyclePolicies must be structured as an array of +// LifecyclePolicy objects, one object for each transition. For more information, +// see the request examples in PutLifecycleConfiguration. +// +// [Managing file system storage]: https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html +type LifecyclePolicy struct { + + // The number of days after files were last accessed in primary storage (the + // Standard storage class) at which to move them to Archive storage. Metadata + // operations such as listing the contents of a directory don't count as file + // access events. + TransitionToArchive TransitionToArchiveRules + + // The number of days after files were last accessed in primary storage (the + // Standard storage class) at which to move them to Infrequent Access (IA) storage. + // Metadata operations such as listing the contents of a directory don't count as + // file access events. + TransitionToIA TransitionToIARules + + // Whether to move files back to primary (Standard) storage after they are + // accessed in IA or Archive storage. Metadata operations such as listing the + // contents of a directory don't count as file access events. + TransitionToPrimaryStorageClass TransitionToPrimaryStorageClassRules + + noSmithyDocumentSerde +} + +// Provides a description of a mount target. +type MountTargetDescription struct { + + // The ID of the file system for which the mount target is intended. + // + // This member is required. + FileSystemId *string + + // Lifecycle state of the mount target. + // + // This member is required. + LifeCycleState LifeCycleState + + // System-assigned mount target ID. + // + // This member is required. + MountTargetId *string + + // The ID of the mount target's subnet. + // + // This member is required. + SubnetId *string + + // The unique and consistent identifier of the Availability Zone that the mount + // target resides in. For example, use1-az1 is an AZ ID for the us-east-1 Region + // and it has the same location in every Amazon Web Services account. + AvailabilityZoneId *string + + // The name of the Availability Zone in which the mount target is located. + // Availability Zones are independently mapped to names for each Amazon Web + // Services account. For example, the Availability Zone us-east-1a for your Amazon + // Web Services account might not be the same location as us-east-1a for another + // Amazon Web Services account. + AvailabilityZoneName *string + + // Address at which the file system can be mounted by using the mount target. + IpAddress *string + + // The IPv6 address for the mount target. + Ipv6Address *string + + // The ID of the network interface that Amazon EFS created when it created the + // mount target. + NetworkInterfaceId *string + + // Amazon Web Services account ID that owns the resource. + OwnerId *string + + // The virtual private cloud (VPC) ID that the mount target is configured in. + VpcId *string + + noSmithyDocumentSerde +} + +// The full POSIX identity, including the user ID, group ID, and any secondary +// group IDs, on the access point that is used for all file system operations +// performed by NFS clients using the access point. +type PosixUser struct { + + // The POSIX group ID used for all file system operations using this access point. + // + // This member is required. + Gid *int64 + + // The POSIX user ID used for all file system operations using this access point. + // + // This member is required. + Uid *int64 + + // Secondary POSIX group IDs used for all file system operations using this access + // point. + SecondaryGids []int64 + + noSmithyDocumentSerde +} + +// Describes the replication configuration for a specific file system. +type ReplicationConfigurationDescription struct { + + // Describes when the replication configuration was created. + // + // This member is required. + CreationTime *time.Time + + // An array of destination objects. Only one destination object is supported. + // + // This member is required. + Destinations []Destination + + // The Amazon Resource Name (ARN) of the original source EFS file system in the + // replication configuration. + // + // This member is required. + OriginalSourceFileSystemArn *string + + // The Amazon Resource Name (ARN) of the current source file system in the + // replication configuration. + // + // This member is required. + SourceFileSystemArn *string + + // The ID of the source Amazon EFS file system that is being replicated. + // + // This member is required. + SourceFileSystemId *string + + // The Amazon Web Services Region in which the source EFS file system is located. + // + // This member is required. + SourceFileSystemRegion *string + + // ID of the Amazon Web Services account in which the source file system resides. + SourceFileSystemOwnerId *string + + noSmithyDocumentSerde +} + +// Describes the resource type and its ID preference for the user's Amazon Web +// Services account, in the current Amazon Web Services Region. +type ResourceIdPreference struct { + + // Identifies the EFS resource ID preference, either LONG_ID (17 characters) or + // SHORT_ID (8 characters). + ResourceIdType ResourceIdType + + // Identifies the Amazon EFS resources to which the ID preference setting applies, + // FILE_SYSTEM and MOUNT_TARGET . + Resources []Resource + + noSmithyDocumentSerde +} + +// Specifies the directory on the Amazon EFS file system that the access point +// provides access to. The access point exposes the specified file system path as +// the root directory of your file system to applications using the access point. +// NFS clients using the access point can only access data in the access point's +// RootDirectory and its subdirectories. +type RootDirectory struct { + + // (Optional) Specifies the POSIX IDs and permissions to apply to the access + // point's RootDirectory . If the RootDirectory > Path specified does not exist, + // EFS creates the root directory using the CreationInfo settings when a client + // connects to an access point. When specifying the CreationInfo , you must provide + // values for all properties. + // + // If you do not provide CreationInfo and the specified RootDirectory > Path does + // not exist, attempts to mount the file system using the access point will fail. + CreationInfo *CreationInfo + + // Specifies the path on the EFS file system to expose as the root directory to + // NFS clients using the access point to access the EFS file system. A path can + // have up to four subdirectories. If the specified path does not exist, you are + // required to provide the CreationInfo . + Path *string + + noSmithyDocumentSerde +} + +// A tag is a key-value pair. Allowed characters are letters, white space, and +// numbers that can be represented in UTF-8, and the following characters: + - = . +// _ : / . +type Tag struct { + + // The tag key (String). The key can't start with aws: . + // + // This member is required. + Key *string + + // The value of the tag key. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + +type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/vendor/github.com/aws/aws-sdk-go-v2/service/efs/validators.go b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/validators.go new file mode 100644 index 0000000000..73dfdb2dc3 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/validators.go @@ -0,0 +1,1193 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package efs + +import ( + "context" + "fmt" + "github.com/aws/aws-sdk-go-v2/service/efs/types" + smithy "github.com/aws/smithy-go" + "github.com/aws/smithy-go/middleware" +) + +type validateOpCreateAccessPoint struct { +} + +func (*validateOpCreateAccessPoint) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateAccessPoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateAccessPointInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateAccessPointInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateFileSystem struct { +} + +func (*validateOpCreateFileSystem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateFileSystem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateFileSystemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateFileSystemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateMountTarget struct { +} + +func (*validateOpCreateMountTarget) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateMountTarget) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateMountTargetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateMountTargetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateReplicationConfiguration struct { +} + +func (*validateOpCreateReplicationConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateReplicationConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateReplicationConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateReplicationConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpCreateTags struct { +} + +func (*validateOpCreateTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteAccessPoint struct { +} + +func (*validateOpDeleteAccessPoint) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteAccessPoint) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteAccessPointInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteAccessPointInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFileSystem struct { +} + +func (*validateOpDeleteFileSystem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFileSystem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFileSystemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFileSystemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteFileSystemPolicy struct { +} + +func (*validateOpDeleteFileSystemPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteFileSystemPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteFileSystemPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteFileSystemPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteMountTarget struct { +} + +func (*validateOpDeleteMountTarget) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteMountTarget) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteMountTargetInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteMountTargetInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteReplicationConfiguration struct { +} + +func (*validateOpDeleteReplicationConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteReplicationConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteReplicationConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteReplicationConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteTags struct { +} + +func (*validateOpDeleteTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeBackupPolicy struct { +} + +func (*validateOpDescribeBackupPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeBackupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeBackupPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeBackupPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeFileSystemPolicy struct { +} + +func (*validateOpDescribeFileSystemPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeFileSystemPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeFileSystemPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeFileSystemPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeLifecycleConfiguration struct { +} + +func (*validateOpDescribeLifecycleConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeLifecycleConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeLifecycleConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeLifecycleConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeMountTargetSecurityGroups struct { +} + +func (*validateOpDescribeMountTargetSecurityGroups) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeMountTargetSecurityGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeMountTargetSecurityGroupsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeMountTargetSecurityGroupsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeTags struct { +} + +func (*validateOpDescribeTags) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeTagsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeTagsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpModifyMountTargetSecurityGroups struct { +} + +func (*validateOpModifyMountTargetSecurityGroups) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpModifyMountTargetSecurityGroups) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ModifyMountTargetSecurityGroupsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpModifyMountTargetSecurityGroupsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutAccountPreferences struct { +} + +func (*validateOpPutAccountPreferences) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutAccountPreferences) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutAccountPreferencesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutAccountPreferencesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutBackupPolicy struct { +} + +func (*validateOpPutBackupPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutBackupPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutBackupPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutBackupPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutFileSystemPolicy struct { +} + +func (*validateOpPutFileSystemPolicy) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutFileSystemPolicy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutFileSystemPolicyInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutFileSystemPolicyInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpPutLifecycleConfiguration struct { +} + +func (*validateOpPutLifecycleConfiguration) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutLifecycleConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutLifecycleConfigurationInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutLifecycleConfigurationInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFileSystem struct { +} + +func (*validateOpUpdateFileSystem) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFileSystem) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFileSystemInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFileSystemInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateFileSystemProtection struct { +} + +func (*validateOpUpdateFileSystemProtection) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateFileSystemProtection) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateFileSystemProtectionInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateFileSystemProtectionInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpCreateAccessPointValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAccessPoint{}, middleware.After) +} + +func addOpCreateFileSystemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateFileSystem{}, middleware.After) +} + +func addOpCreateMountTargetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateMountTarget{}, middleware.After) +} + +func addOpCreateReplicationConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateReplicationConfiguration{}, middleware.After) +} + +func addOpCreateTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateTags{}, middleware.After) +} + +func addOpDeleteAccessPointValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAccessPoint{}, middleware.After) +} + +func addOpDeleteFileSystemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFileSystem{}, middleware.After) +} + +func addOpDeleteFileSystemPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteFileSystemPolicy{}, middleware.After) +} + +func addOpDeleteMountTargetValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteMountTarget{}, middleware.After) +} + +func addOpDeleteReplicationConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteReplicationConfiguration{}, middleware.After) +} + +func addOpDeleteTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteTags{}, middleware.After) +} + +func addOpDescribeBackupPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeBackupPolicy{}, middleware.After) +} + +func addOpDescribeFileSystemPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeFileSystemPolicy{}, middleware.After) +} + +func addOpDescribeLifecycleConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeLifecycleConfiguration{}, middleware.After) +} + +func addOpDescribeMountTargetSecurityGroupsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeMountTargetSecurityGroups{}, middleware.After) +} + +func addOpDescribeTagsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeTags{}, middleware.After) +} + +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + +func addOpModifyMountTargetSecurityGroupsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpModifyMountTargetSecurityGroups{}, middleware.After) +} + +func addOpPutAccountPreferencesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutAccountPreferences{}, middleware.After) +} + +func addOpPutBackupPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutBackupPolicy{}, middleware.After) +} + +func addOpPutFileSystemPolicyValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutFileSystemPolicy{}, middleware.After) +} + +func addOpPutLifecycleConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutLifecycleConfiguration{}, middleware.After) +} + +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + +func addOpUpdateFileSystemValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFileSystem{}, middleware.After) +} + +func addOpUpdateFileSystemProtectionValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateFileSystemProtection{}, middleware.After) +} + +func validateBackupPolicy(v *types.BackupPolicy) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "BackupPolicy"} + if len(v.Status) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Status")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateCreationInfo(v *types.CreationInfo) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreationInfo"} + if v.OwnerUid == nil { + invalidParams.Add(smithy.NewErrParamRequired("OwnerUid")) + } + if v.OwnerGid == nil { + invalidParams.Add(smithy.NewErrParamRequired("OwnerGid")) + } + if v.Permissions == nil { + invalidParams.Add(smithy.NewErrParamRequired("Permissions")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validatePosixUser(v *types.PosixUser) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PosixUser"} + if v.Uid == nil { + invalidParams.Add(smithy.NewErrParamRequired("Uid")) + } + if v.Gid == nil { + invalidParams.Add(smithy.NewErrParamRequired("Gid")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRootDirectory(v *types.RootDirectory) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RootDirectory"} + if v.CreationInfo != nil { + if err := validateCreationInfo(v.CreationInfo); err != nil { + invalidParams.AddNested("CreationInfo", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTag(v *types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tag"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTags(v []types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tags"} + for i := range v { + if err := validateTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateAccessPointInput(v *CreateAccessPointInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateAccessPointInput"} + if v.ClientToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("ClientToken")) + } + if v.Tags != nil { + if err := validateTags(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if v.PosixUser != nil { + if err := validatePosixUser(v.PosixUser); err != nil { + invalidParams.AddNested("PosixUser", err.(smithy.InvalidParamsError)) + } + } + if v.RootDirectory != nil { + if err := validateRootDirectory(v.RootDirectory); err != nil { + invalidParams.AddNested("RootDirectory", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateFileSystemInput(v *CreateFileSystemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateFileSystemInput"} + if v.CreationToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("CreationToken")) + } + if v.Tags != nil { + if err := validateTags(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateMountTargetInput(v *CreateMountTargetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateMountTargetInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if v.SubnetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SubnetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateReplicationConfigurationInput(v *CreateReplicationConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateReplicationConfigurationInput"} + if v.SourceFileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceFileSystemId")) + } + if v.Destinations == nil { + invalidParams.Add(smithy.NewErrParamRequired("Destinations")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpCreateTagsInput(v *CreateTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateTagsInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else if v.Tags != nil { + if err := validateTags(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteAccessPointInput(v *DeleteAccessPointInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAccessPointInput"} + if v.AccessPointId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccessPointId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFileSystemInput(v *DeleteFileSystemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFileSystemInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteFileSystemPolicyInput(v *DeleteFileSystemPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteFileSystemPolicyInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteMountTargetInput(v *DeleteMountTargetInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteMountTargetInput"} + if v.MountTargetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MountTargetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteReplicationConfigurationInput(v *DeleteReplicationConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteReplicationConfigurationInput"} + if v.SourceFileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceFileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteTagsInput(v *DeleteTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteTagsInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeBackupPolicyInput(v *DescribeBackupPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeBackupPolicyInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeFileSystemPolicyInput(v *DescribeFileSystemPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeFileSystemPolicyInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeLifecycleConfigurationInput(v *DescribeLifecycleConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeLifecycleConfigurationInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeMountTargetSecurityGroupsInput(v *DescribeMountTargetSecurityGroupsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeMountTargetSecurityGroupsInput"} + if v.MountTargetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MountTargetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeTagsInput(v *DescribeTagsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeTagsInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpModifyMountTargetSecurityGroupsInput(v *ModifyMountTargetSecurityGroupsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ModifyMountTargetSecurityGroupsInput"} + if v.MountTargetId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MountTargetId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutAccountPreferencesInput(v *PutAccountPreferencesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutAccountPreferencesInput"} + if len(v.ResourceIdType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ResourceIdType")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutBackupPolicyInput(v *PutBackupPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutBackupPolicyInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if v.BackupPolicy == nil { + invalidParams.Add(smithy.NewErrParamRequired("BackupPolicy")) + } else if v.BackupPolicy != nil { + if err := validateBackupPolicy(v.BackupPolicy); err != nil { + invalidParams.AddNested("BackupPolicy", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutFileSystemPolicyInput(v *PutFileSystemPolicyInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutFileSystemPolicyInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if v.Policy == nil { + invalidParams.Add(smithy.NewErrParamRequired("Policy")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpPutLifecycleConfigurationInput(v *PutLifecycleConfigurationInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutLifecycleConfigurationInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if v.LifecyclePolicies == nil { + invalidParams.Add(smithy.NewErrParamRequired("LifecyclePolicies")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else if v.Tags != nil { + if err := validateTags(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceId")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFileSystemInput(v *UpdateFileSystemInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFileSystemInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateFileSystemProtectionInput(v *UpdateFileSystemProtectionInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateFileSystemProtectionInput"} + if v.FileSystemId == nil { + invalidParams.Add(smithy.NewErrParamRequired("FileSystemId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go b/vendor/github.com/aws/aws-sdk-go/service/efs/api.go deleted file mode 100644 index 4ded1692a2..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/api.go +++ /dev/null @@ -1,11468 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package efs - -import ( - "fmt" - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -const opCreateAccessPoint = "CreateAccessPoint" - -// CreateAccessPointRequest generates a "aws/request.Request" representing the -// client's request for the CreateAccessPoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateAccessPoint for more information on using the CreateAccessPoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateAccessPointRequest method. -// req, resp := client.CreateAccessPointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateAccessPoint -func (c *EFS) CreateAccessPointRequest(input *CreateAccessPointInput) (req *request.Request, output *CreateAccessPointOutput) { - op := &request.Operation{ - Name: opCreateAccessPoint, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/access-points", - } - - if input == nil { - input = &CreateAccessPointInput{} - } - - output = &CreateAccessPointOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateAccessPoint API operation for Amazon Elastic File System. -// -// Creates an EFS access point. An access point is an application-specific view -// into an EFS file system that applies an operating system user and group, -// and a file system path, to any file system request made through the access -// point. The operating system user and group override any identity information -// provided by the NFS client. The file system path is exposed as the access -// point's root directory. Applications using the access point can only access -// data in the application's own directory and any subdirectories. To learn -// more, see Mounting a file system using EFS access points (https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html). -// -// If multiple requests to create access points on the same file system are -// sent in quick succession, and the file system is near the limit of 1,000 -// access points, you may experience a throttling response for these requests. -// This is to ensure that the file system does not exceed the stated access -// point limit. -// -// This operation requires permissions for the elasticfilesystem:CreateAccessPoint -// action. -// -// Access points can be tagged on creation. If tags are specified in the creation -// action, IAM performs additional authorization on the elasticfilesystem:TagResource -// action to verify if users have permissions to create tags. Therefore, you -// must grant explicit permissions to use the elasticfilesystem:TagResource -// action. For more information, see Granting permissions to tag resources during -// creation (https://docs.aws.amazon.com/efs/latest/ug/using-tags-efs.html#supported-iam-actions-tagging.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation CreateAccessPoint for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - AccessPointAlreadyExists -// Returned if the access point that you are trying to create already exists, -// with the creation token you provided in the request. -// -// - IncorrectFileSystemLifeCycleState -// Returned if the file system's lifecycle state is not "available". -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - AccessPointLimitExceeded -// Returned if the Amazon Web Services account has already created the maximum -// number of access points allowed per file system. For more informaton, see -// https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region -// (https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region). -// -// - ThrottlingException -// Returned when the CreateAccessPoint API action is called too quickly and -// the number of Access Points on the file system is nearing the limit of 120 -// (https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateAccessPoint -func (c *EFS) CreateAccessPoint(input *CreateAccessPointInput) (*CreateAccessPointOutput, error) { - req, out := c.CreateAccessPointRequest(input) - return out, req.Send() -} - -// CreateAccessPointWithContext is the same as CreateAccessPoint with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAccessPoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) CreateAccessPointWithContext(ctx aws.Context, input *CreateAccessPointInput, opts ...request.Option) (*CreateAccessPointOutput, error) { - req, out := c.CreateAccessPointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateFileSystem = "CreateFileSystem" - -// CreateFileSystemRequest generates a "aws/request.Request" representing the -// client's request for the CreateFileSystem operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateFileSystem for more information on using the CreateFileSystem -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateFileSystemRequest method. -// req, resp := client.CreateFileSystemRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystemRequest(input *CreateFileSystemInput) (req *request.Request, output *FileSystemDescription) { - op := &request.Operation{ - Name: opCreateFileSystem, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/file-systems", - } - - if input == nil { - input = &CreateFileSystemInput{} - } - - output = &FileSystemDescription{} - req = c.newRequest(op, input, output) - return -} - -// CreateFileSystem API operation for Amazon Elastic File System. -// -// Creates a new, empty file system. The operation requires a creation token -// in the request that Amazon EFS uses to ensure idempotent creation (calling -// the operation with same creation token has no effect). If a file system does -// not currently exist that is owned by the caller's Amazon Web Services account -// with the specified creation token, this operation does the following: -// -// - Creates a new, empty file system. The file system will have an Amazon -// EFS assigned ID, and an initial lifecycle state creating. -// -// - Returns with the description of the created file system. -// -// Otherwise, this operation returns a FileSystemAlreadyExists error with the -// ID of the existing file system. -// -// For basic use cases, you can use a randomly generated UUID for the creation -// token. -// -// The idempotent operation allows you to retry a CreateFileSystem call without -// risk of creating an extra file system. This can happen when an initial call -// fails in a way that leaves it uncertain whether or not a file system was -// actually created. An example might be that a transport level timeout occurred -// or your connection was reset. As long as you use the same creation token, -// if the initial call had succeeded in creating a file system, the client can -// learn of its existence from the FileSystemAlreadyExists error. -// -// For more information, see Creating a file system (https://docs.aws.amazon.com/efs/latest/ug/creating-using-create-fs.html#creating-using-create-fs-part1) -// in the Amazon EFS User Guide. -// -// The CreateFileSystem call returns while the file system's lifecycle state -// is still creating. You can check the file system creation status by calling -// the DescribeFileSystems operation, which among other things returns the file -// system state. -// -// This operation accepts an optional PerformanceMode parameter that you choose -// for your file system. We recommend generalPurpose performance mode for all -// file systems. File systems using the maxIO mode is a previous generation -// performance type that is designed for highly parallelized workloads that -// can tolerate higher latencies than the General Purpose mode. Max I/O mode -// is not supported for One Zone file systems or file systems that use Elastic -// throughput. -// -// Due to the higher per-operation latencies with Max I/O, we recommend using -// General Purpose performance mode for all file systems. -// -// The performance mode can't be changed after the file system has been created. -// For more information, see Amazon EFS performance modes (https://docs.aws.amazon.com/efs/latest/ug/performance.html#performancemodes.html). -// -// You can set the throughput mode for the file system using the ThroughputMode -// parameter. -// -// After the file system is fully created, Amazon EFS sets its lifecycle state -// to available, at which point you can create one or more mount targets for -// the file system in your VPC. For more information, see CreateMountTarget. -// You mount your Amazon EFS file system on an EC2 instances in your VPC by -// using the mount target. For more information, see Amazon EFS: How it Works -// (https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html). -// -// This operation requires permissions for the elasticfilesystem:CreateFileSystem -// action. -// -// File systems can be tagged on creation. If tags are specified in the creation -// action, IAM performs additional authorization on the elasticfilesystem:TagResource -// action to verify if users have permissions to create tags. Therefore, you -// must grant explicit permissions to use the elasticfilesystem:TagResource -// action. For more information, see Granting permissions to tag resources during -// creation (https://docs.aws.amazon.com/efs/latest/ug/using-tags-efs.html#supported-iam-actions-tagging.html). -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation CreateFileSystem for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemAlreadyExists -// Returned if the file system you are trying to create already exists, with -// the creation token you provided. -// -// - FileSystemLimitExceeded -// Returned if the Amazon Web Services account has already created the maximum -// number of file systems allowed per account. -// -// - InsufficientThroughputCapacity -// Returned if there's not enough capacity to provision additional throughput. -// This value might be returned when you try to create a file system in provisioned -// throughput mode, when you attempt to increase the provisioned throughput -// of an existing file system, or when you attempt to change an existing file -// system from Bursting Throughput to Provisioned Throughput mode. Try again -// later. -// -// - ThroughputLimitExceeded -// Returned if the throughput mode or amount of provisioned throughput can't -// be changed because the throughput limit of 1024 MiB/s has been reached. -// -// - UnsupportedAvailabilityZone -// Returned if the requested Amazon EFS functionality is not available in the -// specified Availability Zone. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateFileSystem -func (c *EFS) CreateFileSystem(input *CreateFileSystemInput) (*FileSystemDescription, error) { - req, out := c.CreateFileSystemRequest(input) - return out, req.Send() -} - -// CreateFileSystemWithContext is the same as CreateFileSystem with the addition of -// the ability to pass a context and additional request options. -// -// See CreateFileSystem for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) CreateFileSystemWithContext(ctx aws.Context, input *CreateFileSystemInput, opts ...request.Option) (*FileSystemDescription, error) { - req, out := c.CreateFileSystemRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateMountTarget = "CreateMountTarget" - -// CreateMountTargetRequest generates a "aws/request.Request" representing the -// client's request for the CreateMountTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateMountTarget for more information on using the CreateMountTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateMountTargetRequest method. -// req, resp := client.CreateMountTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateMountTarget -func (c *EFS) CreateMountTargetRequest(input *CreateMountTargetInput) (req *request.Request, output *MountTargetDescription) { - op := &request.Operation{ - Name: opCreateMountTarget, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/mount-targets", - } - - if input == nil { - input = &CreateMountTargetInput{} - } - - output = &MountTargetDescription{} - req = c.newRequest(op, input, output) - return -} - -// CreateMountTarget API operation for Amazon Elastic File System. -// -// Creates a mount target for a file system. You can then mount the file system -// on EC2 instances by using the mount target. -// -// You can create one mount target in each Availability Zone in your VPC. All -// EC2 instances in a VPC within a given Availability Zone share a single mount -// target for a given file system. If you have multiple subnets in an Availability -// Zone, you create a mount target in one of the subnets. EC2 instances do not -// need to be in the same subnet as the mount target in order to access their -// file system. -// -// You can create only one mount target for a One Zone file system. You must -// create that mount target in the same Availability Zone in which the file -// system is located. Use the AvailabilityZoneName and AvailabiltyZoneId properties -// in the DescribeFileSystems response object to get this information. Use the -// subnetId associated with the file system's Availability Zone when creating -// the mount target. -// -// For more information, see Amazon EFS: How it Works (https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html). -// -// To create a mount target for a file system, the file system's lifecycle state -// must be available. For more information, see DescribeFileSystems. -// -// In the request, provide the following: -// -// - The file system ID for which you are creating the mount target. -// -// - A subnet ID, which determines the following: The VPC in which Amazon -// EFS creates the mount target The Availability Zone in which Amazon EFS -// creates the mount target The IP address range from which Amazon EFS selects -// the IP address of the mount target (if you don't specify an IP address -// in the request) -// -// After creating the mount target, Amazon EFS returns a response that includes, -// a MountTargetId and an IpAddress. You use this IP address when mounting the -// file system in an EC2 instance. You can also use the mount target's DNS name -// when mounting the file system. The EC2 instance on which you mount the file -// system by using the mount target can resolve the mount target's DNS name -// to its IP address. For more information, see How it Works: Implementation -// Overview (https://docs.aws.amazon.com/efs/latest/ug/how-it-works.html#how-it-works-implementation). -// -// Note that you can create mount targets for a file system in only one VPC, -// and there can be only one mount target per Availability Zone. That is, if -// the file system already has one or more mount targets created for it, the -// subnet specified in the request to add another mount target must meet the -// following requirements: -// -// - Must belong to the same VPC as the subnets of the existing mount targets -// -// - Must not be in the same Availability Zone as any of the subnets of the -// existing mount targets -// -// If the request satisfies the requirements, Amazon EFS does the following: -// -// - Creates a new mount target in the specified subnet. -// -// - Also creates a new network interface in the subnet as follows: If the -// request provides an IpAddress, Amazon EFS assigns that IP address to the -// network interface. Otherwise, Amazon EFS assigns a free address in the -// subnet (in the same way that the Amazon EC2 CreateNetworkInterface call -// does when a request does not specify a primary private IP address). If -// the request provides SecurityGroups, this network interface is associated -// with those security groups. Otherwise, it belongs to the default security -// group for the subnet's VPC. Assigns the description Mount target fsmt-id -// for file system fs-id where fsmt-id is the mount target ID, and fs-id -// is the FileSystemId. Sets the requesterManaged property of the network -// interface to true, and the requesterId value to EFS. Each Amazon EFS mount -// target has one corresponding requester-managed EC2 network interface. -// After the network interface is created, Amazon EFS sets the NetworkInterfaceId -// field in the mount target's description to the network interface ID, and -// the IpAddress field to its address. If network interface creation fails, -// the entire CreateMountTarget operation fails. -// -// The CreateMountTarget call returns only after creating the network interface, -// but while the mount target state is still creating, you can check the mount -// target creation status by calling the DescribeMountTargets operation, which -// among other things returns the mount target state. -// -// We recommend that you create a mount target in each of the Availability Zones. -// There are cost considerations for using a file system in an Availability -// Zone through a mount target created in another Availability Zone. For more -// information, see Amazon EFS (http://aws.amazon.com/efs/). In addition, by -// always using a mount target local to the instance's Availability Zone, you -// eliminate a partial failure scenario. If the Availability Zone in which your -// mount target is created goes down, then you can't access your file system -// through that mount target. -// -// This operation requires permissions for the following action on the file -// system: -// -// - elasticfilesystem:CreateMountTarget -// -// This operation also requires permissions for the following Amazon EC2 actions: -// -// - ec2:DescribeSubnets -// -// - ec2:DescribeNetworkInterfaces -// -// - ec2:CreateNetworkInterface -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation CreateMountTarget for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - IncorrectFileSystemLifeCycleState -// Returned if the file system's lifecycle state is not "available". -// -// - MountTargetConflict -// Returned if the mount target would violate one of the specified restrictions -// based on the file system's existing mount targets. -// -// - SubnetNotFound -// Returned if there is no subnet with ID SubnetId provided in the request. -// -// - NoFreeAddressesInSubnet -// Returned if IpAddress was not specified in the request and there are no free -// IP addresses in the subnet. -// -// - IpAddressInUse -// Returned if the request specified an IpAddress that is already in use in -// the subnet. -// -// - NetworkInterfaceLimitExceeded -// The calling account has reached the limit for elastic network interfaces -// for the specific Amazon Web Services Region. Either delete some network interfaces -// or request that the account quota be raised. For more information, see Amazon -// VPC Quotas (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) -// in the Amazon VPC User Guide (see the Network interfaces per Region entry -// in the Network interfaces table). -// -// - SecurityGroupLimitExceeded -// Returned if the size of SecurityGroups specified in the request is greater -// than five. -// -// - SecurityGroupNotFound -// Returned if one of the specified security groups doesn't exist in the subnet's -// virtual private cloud (VPC). -// -// - UnsupportedAvailabilityZone -// Returned if the requested Amazon EFS functionality is not available in the -// specified Availability Zone. -// -// - AvailabilityZonesMismatch -// Returned if the Availability Zone that was specified for a mount target is -// different from the Availability Zone that was specified for One Zone storage. -// For more information, see Regional and One Zone storage redundancy (https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateMountTarget -func (c *EFS) CreateMountTarget(input *CreateMountTargetInput) (*MountTargetDescription, error) { - req, out := c.CreateMountTargetRequest(input) - return out, req.Send() -} - -// CreateMountTargetWithContext is the same as CreateMountTarget with the addition of -// the ability to pass a context and additional request options. -// -// See CreateMountTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) CreateMountTargetWithContext(ctx aws.Context, input *CreateMountTargetInput, opts ...request.Option) (*MountTargetDescription, error) { - req, out := c.CreateMountTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateReplicationConfiguration = "CreateReplicationConfiguration" - -// CreateReplicationConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the CreateReplicationConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateReplicationConfiguration for more information on using the CreateReplicationConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateReplicationConfigurationRequest method. -// req, resp := client.CreateReplicationConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateReplicationConfiguration -func (c *EFS) CreateReplicationConfigurationRequest(input *CreateReplicationConfigurationInput) (req *request.Request, output *CreateReplicationConfigurationOutput) { - op := &request.Operation{ - Name: opCreateReplicationConfiguration, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration", - } - - if input == nil { - input = &CreateReplicationConfigurationInput{} - } - - output = &CreateReplicationConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateReplicationConfiguration API operation for Amazon Elastic File System. -// -// Creates a replication configuration that replicates an existing EFS file -// system to a new, read-only file system. For more information, see Amazon -// EFS replication (https://docs.aws.amazon.com/efs/latest/ug/efs-replication.html) -// in the Amazon EFS User Guide. The replication configuration specifies the -// following: -// -// - Source file system – The EFS file system that you want replicated. -// The source file system cannot be a destination file system in an existing -// replication configuration. -// -// - Amazon Web Services Region – The Amazon Web Services Region in which -// the destination file system is created. Amazon EFS replication is available -// in all Amazon Web Services Regions in which EFS is available. The Region -// must be enabled. For more information, see Managing Amazon Web Services -// Regions (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable) -// in the Amazon Web Services General Reference Reference Guide. -// -// - Destination file system configuration – The configuration of the destination -// file system to which the source file system will be replicated. There -// can only be one destination file system in a replication configuration. -// Parameters for the replication configuration include: File system ID – -// The ID of the destination file system for the replication. If no ID is -// provided, then EFS creates a new file system with the default settings. -// For existing file systems, the file system's replication overwrite protection -// must be disabled. For more information, see Replicating to an existing -// file system (https://docs.aws.amazon.com/efs/latest/ug/efs-replication#replicate-existing-destination). -// Availability Zone – If you want the destination file system to use One -// Zone storage, you must specify the Availability Zone to create the file -// system in. For more information, see EFS file system types (https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html) -// in the Amazon EFS User Guide. Encryption – All destination file systems -// are created with encryption at rest enabled. You can specify the Key Management -// Service (KMS) key that is used to encrypt the destination file system. -// If you don't specify a KMS key, your service-managed KMS key for Amazon -// EFS is used. After the file system is created, you cannot change the KMS -// key. -// -// After the file system is created, you cannot change the KMS key. -// -// For new destination file systems, the following properties are set by default: -// -// - Performance mode - The destination file system's performance mode matches -// that of the source file system, unless the destination file system uses -// EFS One Zone storage. In that case, the General Purpose performance mode -// is used. The performance mode cannot be changed. -// -// - Throughput mode - The destination file system's throughput mode matches -// that of the source file system. After the file system is created, you -// can modify the throughput mode. -// -// - Lifecycle management – Lifecycle management is not enabled on the -// destination file system. After the destination file system is created, -// you can enable lifecycle management. -// -// - Automatic backups – Automatic daily backups are enabled on the destination -// file system. After the file system is created, you can change this setting. -// -// For more information, see Amazon EFS replication (https://docs.aws.amazon.com/efs/latest/ug/efs-replication.html) -// in the Amazon EFS User Guide. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation CreateReplicationConfiguration for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - IncorrectFileSystemLifeCycleState -// Returned if the file system's lifecycle state is not "available". -// -// - ValidationException -// Returned if the Backup service is not available in the Amazon Web Services -// Region in which the request was made. -// -// - ReplicationNotFound -// Returned if the specified file system does not have a replication configuration. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - UnsupportedAvailabilityZone -// Returned if the requested Amazon EFS functionality is not available in the -// specified Availability Zone. -// -// - FileSystemLimitExceeded -// Returned if the Amazon Web Services account has already created the maximum -// number of file systems allowed per account. -// -// - InsufficientThroughputCapacity -// Returned if there's not enough capacity to provision additional throughput. -// This value might be returned when you try to create a file system in provisioned -// throughput mode, when you attempt to increase the provisioned throughput -// of an existing file system, or when you attempt to change an existing file -// system from Bursting Throughput to Provisioned Throughput mode. Try again -// later. -// -// - ThroughputLimitExceeded -// Returned if the throughput mode or amount of provisioned throughput can't -// be changed because the throughput limit of 1024 MiB/s has been reached. -// -// - ConflictException -// Returned if the source file system in a replication is encrypted but the -// destination file system is unencrypted. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateReplicationConfiguration -func (c *EFS) CreateReplicationConfiguration(input *CreateReplicationConfigurationInput) (*CreateReplicationConfigurationOutput, error) { - req, out := c.CreateReplicationConfigurationRequest(input) - return out, req.Send() -} - -// CreateReplicationConfigurationWithContext is the same as CreateReplicationConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See CreateReplicationConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) CreateReplicationConfigurationWithContext(ctx aws.Context, input *CreateReplicationConfigurationInput, opts ...request.Option) (*CreateReplicationConfigurationOutput, error) { - req, out := c.CreateReplicationConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTags = "CreateTags" - -// CreateTagsRequest generates a "aws/request.Request" representing the -// client's request for the CreateTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See CreateTags for more information on using the CreateTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the CreateTagsRequest method. -// req, resp := client.CreateTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags -// -// Deprecated: Use TagResource. -func (c *EFS) CreateTagsRequest(input *CreateTagsInput) (req *request.Request, output *CreateTagsOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, CreateTags, has been deprecated") - } - op := &request.Operation{ - Name: opCreateTags, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/create-tags/{FileSystemId}", - } - - if input == nil { - input = &CreateTagsInput{} - } - - output = &CreateTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateTags API operation for Amazon Elastic File System. -// -// DEPRECATED - CreateTags is deprecated and not maintained. To create tags -// for EFS resources, use the API action. -// -// Creates or overwrites tags associated with a file system. Each tag is a key-value -// pair. If a tag key specified in the request already exists on the file system, -// this operation overwrites its value with the value provided in the request. -// If you add the Name tag to your file system, Amazon EFS returns it in the -// response to the DescribeFileSystems operation. -// -// This operation requires permission for the elasticfilesystem:CreateTags action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation CreateTags for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/CreateTags -// -// Deprecated: Use TagResource. -func (c *EFS) CreateTags(input *CreateTagsInput) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - return out, req.Send() -} - -// CreateTagsWithContext is the same as CreateTags with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: Use TagResource. -func (c *EFS) CreateTagsWithContext(ctx aws.Context, input *CreateTagsInput, opts ...request.Option) (*CreateTagsOutput, error) { - req, out := c.CreateTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteAccessPoint = "DeleteAccessPoint" - -// DeleteAccessPointRequest generates a "aws/request.Request" representing the -// client's request for the DeleteAccessPoint operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteAccessPoint for more information on using the DeleteAccessPoint -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteAccessPointRequest method. -// req, resp := client.DeleteAccessPointRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteAccessPoint -func (c *EFS) DeleteAccessPointRequest(input *DeleteAccessPointInput) (req *request.Request, output *DeleteAccessPointOutput) { - op := &request.Operation{ - Name: opDeleteAccessPoint, - HTTPMethod: "DELETE", - HTTPPath: "/2015-02-01/access-points/{AccessPointId}", - } - - if input == nil { - input = &DeleteAccessPointInput{} - } - - output = &DeleteAccessPointOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteAccessPoint API operation for Amazon Elastic File System. -// -// Deletes the specified access point. After deletion is complete, new clients -// can no longer connect to the access points. Clients connected to the access -// point at the time of deletion will continue to function until they terminate -// their connection. -// -// This operation requires permissions for the elasticfilesystem:DeleteAccessPoint -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DeleteAccessPoint for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - AccessPointNotFound -// Returned if the specified AccessPointId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteAccessPoint -func (c *EFS) DeleteAccessPoint(input *DeleteAccessPointInput) (*DeleteAccessPointOutput, error) { - req, out := c.DeleteAccessPointRequest(input) - return out, req.Send() -} - -// DeleteAccessPointWithContext is the same as DeleteAccessPoint with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteAccessPoint for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DeleteAccessPointWithContext(ctx aws.Context, input *DeleteAccessPointInput, opts ...request.Option) (*DeleteAccessPointOutput, error) { - req, out := c.DeleteAccessPointRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFileSystem = "DeleteFileSystem" - -// DeleteFileSystemRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFileSystem operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFileSystem for more information on using the DeleteFileSystem -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteFileSystemRequest method. -// req, resp := client.DeleteFileSystemRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystem -func (c *EFS) DeleteFileSystemRequest(input *DeleteFileSystemInput) (req *request.Request, output *DeleteFileSystemOutput) { - op := &request.Operation{ - Name: opDeleteFileSystem, - HTTPMethod: "DELETE", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}", - } - - if input == nil { - input = &DeleteFileSystemInput{} - } - - output = &DeleteFileSystemOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFileSystem API operation for Amazon Elastic File System. -// -// Deletes a file system, permanently severing access to its contents. Upon -// return, the file system no longer exists and you can't access any contents -// of the deleted file system. -// -// You need to manually delete mount targets attached to a file system before -// you can delete an EFS file system. This step is performed for you when you -// use the Amazon Web Services console to delete a file system. -// -// You cannot delete a file system that is part of an EFS Replication configuration. -// You need to delete the replication configuration first. -// -// You can't delete a file system that is in use. That is, if the file system -// has any mount targets, you must first delete them. For more information, -// see DescribeMountTargets and DeleteMountTarget. -// -// The DeleteFileSystem call returns while the file system state is still deleting. -// You can check the file system deletion status by calling the DescribeFileSystems -// operation, which returns a list of file systems in your account. If you pass -// file system ID or creation token for the deleted file system, the DescribeFileSystems -// returns a 404 FileSystemNotFound error. -// -// This operation requires permissions for the elasticfilesystem:DeleteFileSystem -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DeleteFileSystem for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - FileSystemInUse -// Returned if a file system has mount targets. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystem -func (c *EFS) DeleteFileSystem(input *DeleteFileSystemInput) (*DeleteFileSystemOutput, error) { - req, out := c.DeleteFileSystemRequest(input) - return out, req.Send() -} - -// DeleteFileSystemWithContext is the same as DeleteFileSystem with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFileSystem for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DeleteFileSystemWithContext(ctx aws.Context, input *DeleteFileSystemInput, opts ...request.Option) (*DeleteFileSystemOutput, error) { - req, out := c.DeleteFileSystemRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteFileSystemPolicy = "DeleteFileSystemPolicy" - -// DeleteFileSystemPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteFileSystemPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteFileSystemPolicy for more information on using the DeleteFileSystemPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteFileSystemPolicyRequest method. -// req, resp := client.DeleteFileSystemPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystemPolicy -func (c *EFS) DeleteFileSystemPolicyRequest(input *DeleteFileSystemPolicyInput) (req *request.Request, output *DeleteFileSystemPolicyOutput) { - op := &request.Operation{ - Name: opDeleteFileSystemPolicy, - HTTPMethod: "DELETE", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/policy", - } - - if input == nil { - input = &DeleteFileSystemPolicyInput{} - } - - output = &DeleteFileSystemPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteFileSystemPolicy API operation for Amazon Elastic File System. -// -// Deletes the FileSystemPolicy for the specified file system. The default FileSystemPolicy -// goes into effect once the existing policy is deleted. For more information -// about the default file system policy, see Using Resource-based Policies with -// EFS (https://docs.aws.amazon.com/efs/latest/ug/res-based-policies-efs.html). -// -// This operation requires permissions for the elasticfilesystem:DeleteFileSystemPolicy -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DeleteFileSystemPolicy for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - IncorrectFileSystemLifeCycleState -// Returned if the file system's lifecycle state is not "available". -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteFileSystemPolicy -func (c *EFS) DeleteFileSystemPolicy(input *DeleteFileSystemPolicyInput) (*DeleteFileSystemPolicyOutput, error) { - req, out := c.DeleteFileSystemPolicyRequest(input) - return out, req.Send() -} - -// DeleteFileSystemPolicyWithContext is the same as DeleteFileSystemPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteFileSystemPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DeleteFileSystemPolicyWithContext(ctx aws.Context, input *DeleteFileSystemPolicyInput, opts ...request.Option) (*DeleteFileSystemPolicyOutput, error) { - req, out := c.DeleteFileSystemPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteMountTarget = "DeleteMountTarget" - -// DeleteMountTargetRequest generates a "aws/request.Request" representing the -// client's request for the DeleteMountTarget operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteMountTarget for more information on using the DeleteMountTarget -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteMountTargetRequest method. -// req, resp := client.DeleteMountTargetRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTarget -func (c *EFS) DeleteMountTargetRequest(input *DeleteMountTargetInput) (req *request.Request, output *DeleteMountTargetOutput) { - op := &request.Operation{ - Name: opDeleteMountTarget, - HTTPMethod: "DELETE", - HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}", - } - - if input == nil { - input = &DeleteMountTargetInput{} - } - - output = &DeleteMountTargetOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteMountTarget API operation for Amazon Elastic File System. -// -// Deletes the specified mount target. -// -// This operation forcibly breaks any mounts of the file system by using the -// mount target that is being deleted, which might disrupt instances or applications -// using those mounts. To avoid applications getting cut off abruptly, you might -// consider unmounting any mounts of the mount target, if feasible. The operation -// also deletes the associated network interface. Uncommitted writes might be -// lost, but breaking a mount target using this operation does not corrupt the -// file system itself. The file system you created remains. You can mount an -// EC2 instance in your VPC by using another mount target. -// -// This operation requires permissions for the following action on the file -// system: -// -// - elasticfilesystem:DeleteMountTarget -// -// The DeleteMountTarget call returns while the mount target state is still -// deleting. You can check the mount target deletion by calling the DescribeMountTargets -// operation, which returns a list of mount target descriptions for the given -// file system. -// -// The operation also requires permissions for the following Amazon EC2 action -// on the mount target's network interface: -// -// - ec2:DeleteNetworkInterface -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DeleteMountTarget for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - DependencyTimeout -// The service timed out trying to fulfill the request, and the client should -// try the call again. -// -// - MountTargetNotFound -// Returned if there is no mount target with the specified ID found in the caller's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteMountTarget -func (c *EFS) DeleteMountTarget(input *DeleteMountTargetInput) (*DeleteMountTargetOutput, error) { - req, out := c.DeleteMountTargetRequest(input) - return out, req.Send() -} - -// DeleteMountTargetWithContext is the same as DeleteMountTarget with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteMountTarget for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DeleteMountTargetWithContext(ctx aws.Context, input *DeleteMountTargetInput, opts ...request.Option) (*DeleteMountTargetOutput, error) { - req, out := c.DeleteMountTargetRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteReplicationConfiguration = "DeleteReplicationConfiguration" - -// DeleteReplicationConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteReplicationConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteReplicationConfiguration for more information on using the DeleteReplicationConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteReplicationConfigurationRequest method. -// req, resp := client.DeleteReplicationConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteReplicationConfiguration -func (c *EFS) DeleteReplicationConfigurationRequest(input *DeleteReplicationConfigurationInput) (req *request.Request, output *DeleteReplicationConfigurationOutput) { - op := &request.Operation{ - Name: opDeleteReplicationConfiguration, - HTTPMethod: "DELETE", - HTTPPath: "/2015-02-01/file-systems/{SourceFileSystemId}/replication-configuration", - } - - if input == nil { - input = &DeleteReplicationConfigurationInput{} - } - - output = &DeleteReplicationConfigurationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteReplicationConfiguration API operation for Amazon Elastic File System. -// -// Deletes a replication configuration. Deleting a replication configuration -// ends the replication process. After a replication configuration is deleted, -// the destination file system becomes Writeable and its replication overwrite -// protection is re-enabled. For more information, see Delete a replication -// configuration (https://docs.aws.amazon.com/efs/latest/ug/delete-replications.html). -// -// This operation requires permissions for the elasticfilesystem:DeleteReplicationConfiguration -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DeleteReplicationConfiguration for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - ReplicationNotFound -// Returned if the specified file system does not have a replication configuration. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteReplicationConfiguration -func (c *EFS) DeleteReplicationConfiguration(input *DeleteReplicationConfigurationInput) (*DeleteReplicationConfigurationOutput, error) { - req, out := c.DeleteReplicationConfigurationRequest(input) - return out, req.Send() -} - -// DeleteReplicationConfigurationWithContext is the same as DeleteReplicationConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteReplicationConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DeleteReplicationConfigurationWithContext(ctx aws.Context, input *DeleteReplicationConfigurationInput, opts ...request.Option) (*DeleteReplicationConfigurationOutput, error) { - req, out := c.DeleteReplicationConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTags = "DeleteTags" - -// DeleteTagsRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DeleteTags for more information on using the DeleteTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DeleteTagsRequest method. -// req, resp := client.DeleteTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags -// -// Deprecated: Use UntagResource. -func (c *EFS) DeleteTagsRequest(input *DeleteTagsInput) (req *request.Request, output *DeleteTagsOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, DeleteTags, has been deprecated") - } - op := &request.Operation{ - Name: opDeleteTags, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/delete-tags/{FileSystemId}", - } - - if input == nil { - input = &DeleteTagsInput{} - } - - output = &DeleteTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTags API operation for Amazon Elastic File System. -// -// DEPRECATED - DeleteTags is deprecated and not maintained. To remove tags -// from EFS resources, use the API action. -// -// Deletes the specified tags from a file system. If the DeleteTags request -// includes a tag key that doesn't exist, Amazon EFS ignores it and doesn't -// cause an error. For more information about tags and related restrictions, -// see Tag restrictions (https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html) -// in the Billing and Cost Management User Guide. -// -// This operation requires permissions for the elasticfilesystem:DeleteTags -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DeleteTags for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DeleteTags -// -// Deprecated: Use UntagResource. -func (c *EFS) DeleteTags(input *DeleteTagsInput) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - return out, req.Send() -} - -// DeleteTagsWithContext is the same as DeleteTags with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: Use UntagResource. -func (c *EFS) DeleteTagsWithContext(ctx aws.Context, input *DeleteTagsInput, opts ...request.Option) (*DeleteTagsOutput, error) { - req, out := c.DeleteTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccessPoints = "DescribeAccessPoints" - -// DescribeAccessPointsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccessPoints operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccessPoints for more information on using the DescribeAccessPoints -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeAccessPointsRequest method. -// req, resp := client.DescribeAccessPointsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeAccessPoints -func (c *EFS) DescribeAccessPointsRequest(input *DescribeAccessPointsInput) (req *request.Request, output *DescribeAccessPointsOutput) { - op := &request.Operation{ - Name: opDescribeAccessPoints, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/access-points", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeAccessPointsInput{} - } - - output = &DescribeAccessPointsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccessPoints API operation for Amazon Elastic File System. -// -// Returns the description of a specific Amazon EFS access point if the AccessPointId -// is provided. If you provide an EFS FileSystemId, it returns descriptions -// of all access points for that file system. You can provide either an AccessPointId -// or a FileSystemId in the request, but not both. -// -// This operation requires permissions for the elasticfilesystem:DescribeAccessPoints -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeAccessPoints for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - AccessPointNotFound -// Returned if the specified AccessPointId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeAccessPoints -func (c *EFS) DescribeAccessPoints(input *DescribeAccessPointsInput) (*DescribeAccessPointsOutput, error) { - req, out := c.DescribeAccessPointsRequest(input) - return out, req.Send() -} - -// DescribeAccessPointsWithContext is the same as DescribeAccessPoints with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccessPoints for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeAccessPointsWithContext(ctx aws.Context, input *DescribeAccessPointsInput, opts ...request.Option) (*DescribeAccessPointsOutput, error) { - req, out := c.DescribeAccessPointsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeAccessPointsPages iterates over the pages of a DescribeAccessPoints operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeAccessPoints method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeAccessPoints operation. -// pageNum := 0 -// err := client.DescribeAccessPointsPages(params, -// func(page *efs.DescribeAccessPointsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *EFS) DescribeAccessPointsPages(input *DescribeAccessPointsInput, fn func(*DescribeAccessPointsOutput, bool) bool) error { - return c.DescribeAccessPointsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeAccessPointsPagesWithContext same as DescribeAccessPointsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeAccessPointsPagesWithContext(ctx aws.Context, input *DescribeAccessPointsInput, fn func(*DescribeAccessPointsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeAccessPointsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeAccessPointsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeAccessPointsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeAccountPreferences = "DescribeAccountPreferences" - -// DescribeAccountPreferencesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountPreferences operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeAccountPreferences for more information on using the DescribeAccountPreferences -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeAccountPreferencesRequest method. -// req, resp := client.DescribeAccountPreferencesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeAccountPreferences -func (c *EFS) DescribeAccountPreferencesRequest(input *DescribeAccountPreferencesInput) (req *request.Request, output *DescribeAccountPreferencesOutput) { - op := &request.Operation{ - Name: opDescribeAccountPreferences, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/account-preferences", - } - - if input == nil { - input = &DescribeAccountPreferencesInput{} - } - - output = &DescribeAccountPreferencesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountPreferences API operation for Amazon Elastic File System. -// -// Returns the account preferences settings for the Amazon Web Services account -// associated with the user making the request, in the current Amazon Web Services -// Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeAccountPreferences for usage and error information. -// -// Returned Error Types: -// - InternalServerError -// Returned if an error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeAccountPreferences -func (c *EFS) DescribeAccountPreferences(input *DescribeAccountPreferencesInput) (*DescribeAccountPreferencesOutput, error) { - req, out := c.DescribeAccountPreferencesRequest(input) - return out, req.Send() -} - -// DescribeAccountPreferencesWithContext is the same as DescribeAccountPreferences with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountPreferences for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeAccountPreferencesWithContext(ctx aws.Context, input *DescribeAccountPreferencesInput, opts ...request.Option) (*DescribeAccountPreferencesOutput, error) { - req, out := c.DescribeAccountPreferencesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeBackupPolicy = "DescribeBackupPolicy" - -// DescribeBackupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DescribeBackupPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeBackupPolicy for more information on using the DescribeBackupPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeBackupPolicyRequest method. -// req, resp := client.DescribeBackupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeBackupPolicy -func (c *EFS) DescribeBackupPolicyRequest(input *DescribeBackupPolicyInput) (req *request.Request, output *DescribeBackupPolicyOutput) { - op := &request.Operation{ - Name: opDescribeBackupPolicy, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/backup-policy", - } - - if input == nil { - input = &DescribeBackupPolicyInput{} - } - - output = &DescribeBackupPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeBackupPolicy API operation for Amazon Elastic File System. -// -// Returns the backup policy for the specified EFS file system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeBackupPolicy for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - PolicyNotFound -// Returned if the default file system policy is in effect for the EFS file -// system specified. -// -// - ValidationException -// Returned if the Backup service is not available in the Amazon Web Services -// Region in which the request was made. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeBackupPolicy -func (c *EFS) DescribeBackupPolicy(input *DescribeBackupPolicyInput) (*DescribeBackupPolicyOutput, error) { - req, out := c.DescribeBackupPolicyRequest(input) - return out, req.Send() -} - -// DescribeBackupPolicyWithContext is the same as DescribeBackupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeBackupPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeBackupPolicyWithContext(ctx aws.Context, input *DescribeBackupPolicyInput, opts ...request.Option) (*DescribeBackupPolicyOutput, error) { - req, out := c.DescribeBackupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFileSystemPolicy = "DescribeFileSystemPolicy" - -// DescribeFileSystemPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFileSystemPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFileSystemPolicy for more information on using the DescribeFileSystemPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeFileSystemPolicyRequest method. -// req, resp := client.DescribeFileSystemPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystemPolicy -func (c *EFS) DescribeFileSystemPolicyRequest(input *DescribeFileSystemPolicyInput) (req *request.Request, output *DescribeFileSystemPolicyOutput) { - op := &request.Operation{ - Name: opDescribeFileSystemPolicy, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/policy", - } - - if input == nil { - input = &DescribeFileSystemPolicyInput{} - } - - output = &DescribeFileSystemPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFileSystemPolicy API operation for Amazon Elastic File System. -// -// Returns the FileSystemPolicy for the specified EFS file system. -// -// This operation requires permissions for the elasticfilesystem:DescribeFileSystemPolicy -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeFileSystemPolicy for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - PolicyNotFound -// Returned if the default file system policy is in effect for the EFS file -// system specified. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystemPolicy -func (c *EFS) DescribeFileSystemPolicy(input *DescribeFileSystemPolicyInput) (*DescribeFileSystemPolicyOutput, error) { - req, out := c.DescribeFileSystemPolicyRequest(input) - return out, req.Send() -} - -// DescribeFileSystemPolicyWithContext is the same as DescribeFileSystemPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFileSystemPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeFileSystemPolicyWithContext(ctx aws.Context, input *DescribeFileSystemPolicyInput, opts ...request.Option) (*DescribeFileSystemPolicyOutput, error) { - req, out := c.DescribeFileSystemPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeFileSystems = "DescribeFileSystems" - -// DescribeFileSystemsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeFileSystems operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeFileSystems for more information on using the DescribeFileSystems -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeFileSystemsRequest method. -// req, resp := client.DescribeFileSystemsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems -func (c *EFS) DescribeFileSystemsRequest(input *DescribeFileSystemsInput) (req *request.Request, output *DescribeFileSystemsOutput) { - op := &request.Operation{ - Name: opDescribeFileSystems, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/file-systems", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeFileSystemsInput{} - } - - output = &DescribeFileSystemsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeFileSystems API operation for Amazon Elastic File System. -// -// Returns the description of a specific Amazon EFS file system if either the -// file system CreationToken or the FileSystemId is provided. Otherwise, it -// returns descriptions of all file systems owned by the caller's Amazon Web -// Services account in the Amazon Web Services Region of the endpoint that you're -// calling. -// -// When retrieving all file system descriptions, you can optionally specify -// the MaxItems parameter to limit the number of descriptions in a response. -// This number is automatically set to 100. If more file system descriptions -// remain, Amazon EFS returns a NextMarker, an opaque token, in the response. -// In this case, you should send a subsequent request with the Marker request -// parameter set to the value of NextMarker. -// -// To retrieve a list of your file system descriptions, this operation is used -// in an iterative process, where DescribeFileSystems is called first without -// the Marker and then the operation continues to call it with the Marker parameter -// set to the value of the NextMarker from the previous response until the response -// has no NextMarker. -// -// The order of file systems returned in the response of one DescribeFileSystems -// call and the order of file systems returned across the responses of a multi-call -// iteration is unspecified. -// -// This operation requires permissions for the elasticfilesystem:DescribeFileSystems -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeFileSystems for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeFileSystems -func (c *EFS) DescribeFileSystems(input *DescribeFileSystemsInput) (*DescribeFileSystemsOutput, error) { - req, out := c.DescribeFileSystemsRequest(input) - return out, req.Send() -} - -// DescribeFileSystemsWithContext is the same as DescribeFileSystems with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeFileSystems for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeFileSystemsWithContext(ctx aws.Context, input *DescribeFileSystemsInput, opts ...request.Option) (*DescribeFileSystemsOutput, error) { - req, out := c.DescribeFileSystemsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeFileSystemsPages iterates over the pages of a DescribeFileSystems operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeFileSystems method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeFileSystems operation. -// pageNum := 0 -// err := client.DescribeFileSystemsPages(params, -// func(page *efs.DescribeFileSystemsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *EFS) DescribeFileSystemsPages(input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool) error { - return c.DescribeFileSystemsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeFileSystemsPagesWithContext same as DescribeFileSystemsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeFileSystemsPagesWithContext(ctx aws.Context, input *DescribeFileSystemsInput, fn func(*DescribeFileSystemsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeFileSystemsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeFileSystemsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeFileSystemsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeLifecycleConfiguration = "DescribeLifecycleConfiguration" - -// DescribeLifecycleConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLifecycleConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeLifecycleConfiguration for more information on using the DescribeLifecycleConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeLifecycleConfigurationRequest method. -// req, resp := client.DescribeLifecycleConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeLifecycleConfiguration -func (c *EFS) DescribeLifecycleConfigurationRequest(input *DescribeLifecycleConfigurationInput) (req *request.Request, output *DescribeLifecycleConfigurationOutput) { - op := &request.Operation{ - Name: opDescribeLifecycleConfiguration, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration", - } - - if input == nil { - input = &DescribeLifecycleConfigurationInput{} - } - - output = &DescribeLifecycleConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLifecycleConfiguration API operation for Amazon Elastic File System. -// -// Returns the current LifecycleConfiguration object for the specified Amazon -// EFS file system. Lifecycle management uses the LifecycleConfiguration object -// to identify when to move files between storage classes. For a file system -// without a LifecycleConfiguration object, the call returns an empty array -// in the response. -// -// This operation requires permissions for the elasticfilesystem:DescribeLifecycleConfiguration -// operation. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeLifecycleConfiguration for usage and error information. -// -// Returned Error Types: -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeLifecycleConfiguration -func (c *EFS) DescribeLifecycleConfiguration(input *DescribeLifecycleConfigurationInput) (*DescribeLifecycleConfigurationOutput, error) { - req, out := c.DescribeLifecycleConfigurationRequest(input) - return out, req.Send() -} - -// DescribeLifecycleConfigurationWithContext is the same as DescribeLifecycleConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLifecycleConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeLifecycleConfigurationWithContext(ctx aws.Context, input *DescribeLifecycleConfigurationInput, opts ...request.Option) (*DescribeLifecycleConfigurationOutput, error) { - req, out := c.DescribeLifecycleConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMountTargetSecurityGroups = "DescribeMountTargetSecurityGroups" - -// DescribeMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMountTargetSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMountTargetSecurityGroups for more information on using the DescribeMountTargetSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeMountTargetSecurityGroupsRequest method. -// req, resp := client.DescribeMountTargetSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroups -func (c *EFS) DescribeMountTargetSecurityGroupsRequest(input *DescribeMountTargetSecurityGroupsInput) (req *request.Request, output *DescribeMountTargetSecurityGroupsOutput) { - op := &request.Operation{ - Name: opDescribeMountTargetSecurityGroups, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups", - } - - if input == nil { - input = &DescribeMountTargetSecurityGroupsInput{} - } - - output = &DescribeMountTargetSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMountTargetSecurityGroups API operation for Amazon Elastic File System. -// -// Returns the security groups currently in effect for a mount target. This -// operation requires that the network interface of the mount target has been -// created and the lifecycle state of the mount target is not deleted. -// -// This operation requires permissions for the following actions: -// -// - elasticfilesystem:DescribeMountTargetSecurityGroups action on the mount -// target's file system. -// -// - ec2:DescribeNetworkInterfaceAttribute action on the mount target's network -// interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeMountTargetSecurityGroups for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - MountTargetNotFound -// Returned if there is no mount target with the specified ID found in the caller's -// Amazon Web Services account. -// -// - IncorrectMountTargetState -// Returned if the mount target is not in the correct state for the operation. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargetSecurityGroups -func (c *EFS) DescribeMountTargetSecurityGroups(input *DescribeMountTargetSecurityGroupsInput) (*DescribeMountTargetSecurityGroupsOutput, error) { - req, out := c.DescribeMountTargetSecurityGroupsRequest(input) - return out, req.Send() -} - -// DescribeMountTargetSecurityGroupsWithContext is the same as DescribeMountTargetSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMountTargetSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeMountTargetSecurityGroupsWithContext(ctx aws.Context, input *DescribeMountTargetSecurityGroupsInput, opts ...request.Option) (*DescribeMountTargetSecurityGroupsOutput, error) { - req, out := c.DescribeMountTargetSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeMountTargets = "DescribeMountTargets" - -// DescribeMountTargetsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeMountTargets operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeMountTargets for more information on using the DescribeMountTargets -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeMountTargetsRequest method. -// req, resp := client.DescribeMountTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargets -func (c *EFS) DescribeMountTargetsRequest(input *DescribeMountTargetsInput) (req *request.Request, output *DescribeMountTargetsOutput) { - op := &request.Operation{ - Name: opDescribeMountTargets, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/mount-targets", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeMountTargetsInput{} - } - - output = &DescribeMountTargetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeMountTargets API operation for Amazon Elastic File System. -// -// Returns the descriptions of all the current mount targets, or a specific -// mount target, for a file system. When requesting all of the current mount -// targets, the order of mount targets returned in the response is unspecified. -// -// This operation requires permissions for the elasticfilesystem:DescribeMountTargets -// action, on either the file system ID that you specify in FileSystemId, or -// on the file system of the mount target that you specify in MountTargetId. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeMountTargets for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - MountTargetNotFound -// Returned if there is no mount target with the specified ID found in the caller's -// Amazon Web Services account. -// -// - AccessPointNotFound -// Returned if the specified AccessPointId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeMountTargets -func (c *EFS) DescribeMountTargets(input *DescribeMountTargetsInput) (*DescribeMountTargetsOutput, error) { - req, out := c.DescribeMountTargetsRequest(input) - return out, req.Send() -} - -// DescribeMountTargetsWithContext is the same as DescribeMountTargets with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeMountTargets for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeMountTargetsWithContext(ctx aws.Context, input *DescribeMountTargetsInput, opts ...request.Option) (*DescribeMountTargetsOutput, error) { - req, out := c.DescribeMountTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeMountTargetsPages iterates over the pages of a DescribeMountTargets operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeMountTargets method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeMountTargets operation. -// pageNum := 0 -// err := client.DescribeMountTargetsPages(params, -// func(page *efs.DescribeMountTargetsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *EFS) DescribeMountTargetsPages(input *DescribeMountTargetsInput, fn func(*DescribeMountTargetsOutput, bool) bool) error { - return c.DescribeMountTargetsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeMountTargetsPagesWithContext same as DescribeMountTargetsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeMountTargetsPagesWithContext(ctx aws.Context, input *DescribeMountTargetsInput, fn func(*DescribeMountTargetsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeMountTargetsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeMountTargetsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeMountTargetsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeReplicationConfigurations = "DescribeReplicationConfigurations" - -// DescribeReplicationConfigurationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReplicationConfigurations operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReplicationConfigurations for more information on using the DescribeReplicationConfigurations -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeReplicationConfigurationsRequest method. -// req, resp := client.DescribeReplicationConfigurationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeReplicationConfigurations -func (c *EFS) DescribeReplicationConfigurationsRequest(input *DescribeReplicationConfigurationsInput) (req *request.Request, output *DescribeReplicationConfigurationsOutput) { - op := &request.Operation{ - Name: opDescribeReplicationConfigurations, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/file-systems/replication-configurations", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeReplicationConfigurationsInput{} - } - - output = &DescribeReplicationConfigurationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReplicationConfigurations API operation for Amazon Elastic File System. -// -// Retrieves the replication configuration for a specific file system. If a -// file system is not specified, all of the replication configurations for the -// Amazon Web Services account in an Amazon Web Services Region are retrieved. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeReplicationConfigurations for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - ReplicationNotFound -// Returned if the specified file system does not have a replication configuration. -// -// - ValidationException -// Returned if the Backup service is not available in the Amazon Web Services -// Region in which the request was made. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeReplicationConfigurations -func (c *EFS) DescribeReplicationConfigurations(input *DescribeReplicationConfigurationsInput) (*DescribeReplicationConfigurationsOutput, error) { - req, out := c.DescribeReplicationConfigurationsRequest(input) - return out, req.Send() -} - -// DescribeReplicationConfigurationsWithContext is the same as DescribeReplicationConfigurations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReplicationConfigurations for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeReplicationConfigurationsWithContext(ctx aws.Context, input *DescribeReplicationConfigurationsInput, opts ...request.Option) (*DescribeReplicationConfigurationsOutput, error) { - req, out := c.DescribeReplicationConfigurationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeReplicationConfigurationsPages iterates over the pages of a DescribeReplicationConfigurations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeReplicationConfigurations method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeReplicationConfigurations operation. -// pageNum := 0 -// err := client.DescribeReplicationConfigurationsPages(params, -// func(page *efs.DescribeReplicationConfigurationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *EFS) DescribeReplicationConfigurationsPages(input *DescribeReplicationConfigurationsInput, fn func(*DescribeReplicationConfigurationsOutput, bool) bool) error { - return c.DescribeReplicationConfigurationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeReplicationConfigurationsPagesWithContext same as DescribeReplicationConfigurationsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) DescribeReplicationConfigurationsPagesWithContext(ctx aws.Context, input *DescribeReplicationConfigurationsInput, fn func(*DescribeReplicationConfigurationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeReplicationConfigurationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeReplicationConfigurationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeReplicationConfigurationsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeTags = "DescribeTags" - -// DescribeTagsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTags operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeTags for more information on using the DescribeTags -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeTagsRequest method. -// req, resp := client.DescribeTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags -// -// Deprecated: Use ListTagsForResource. -func (c *EFS) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - if c.Client.Config.Logger != nil { - c.Client.Config.Logger.Log("This operation, DescribeTags, has been deprecated") - } - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/tags/{FileSystemId}/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "MaxItems", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Amazon Elastic File System. -// -// DEPRECATED - The DescribeTags action is deprecated and not maintained. To -// view tags associated with EFS resources, use the ListTagsForResource API -// action. -// -// Returns the tags associated with a file system. The order of tags returned -// in the response of one DescribeTags call and the order of tags returned across -// the responses of a multiple-call iteration (when using pagination) is unspecified. -// -// This operation requires permissions for the elasticfilesystem:DescribeTags -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation DescribeTags for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/DescribeTags -// -// Deprecated: Use ListTagsForResource. -func (c *EFS) DescribeTags(input *DescribeTagsInput) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - return out, req.Send() -} - -// DescribeTagsWithContext is the same as DescribeTags with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTags for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: Use ListTagsForResource. -func (c *EFS) DescribeTagsWithContext(ctx aws.Context, input *DescribeTagsInput, opts ...request.Option) (*DescribeTagsOutput, error) { - req, out := c.DescribeTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTagsPages iterates over the pages of a DescribeTags operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTags method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a DescribeTags operation. -// pageNum := 0 -// err := client.DescribeTagsPages(params, -// func(page *efs.DescribeTagsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -// -// Deprecated: Use ListTagsForResource. -func (c *EFS) DescribeTagsPages(input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool) error { - return c.DescribeTagsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTagsPagesWithContext same as DescribeTagsPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -// -// Deprecated: Use ListTagsForResource. -func (c *EFS) DescribeTagsPagesWithContext(ctx aws.Context, input *DescribeTagsInput, fn func(*DescribeTagsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTagsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTagsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeTagsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opListTagsForResource = "ListTagsForResource" - -// ListTagsForResourceRequest generates a "aws/request.Request" representing the -// client's request for the ListTagsForResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ListTagsForResource for more information on using the ListTagsForResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ListTagsForResourceRequest method. -// req, resp := client.ListTagsForResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ListTagsForResource -func (c *EFS) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { - op := &request.Operation{ - Name: opListTagsForResource, - HTTPMethod: "GET", - HTTPPath: "/2015-02-01/resource-tags/{ResourceId}", - Paginator: &request.Paginator{ - InputTokens: []string{"NextToken"}, - OutputTokens: []string{"NextToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &ListTagsForResourceInput{} - } - - output = &ListTagsForResourceOutput{} - req = c.newRequest(op, input, output) - return -} - -// ListTagsForResource API operation for Amazon Elastic File System. -// -// Lists all tags for a top-level EFS resource. You must provide the ID of the -// resource that you want to retrieve the tags for. -// -// This operation requires permissions for the elasticfilesystem:DescribeAccessPoints -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation ListTagsForResource for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - AccessPointNotFound -// Returned if the specified AccessPointId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ListTagsForResource -func (c *EFS) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) - return out, req.Send() -} - -// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of -// the ability to pass a context and additional request options. -// -// See ListTagsForResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { - req, out := c.ListTagsForResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// ListTagsForResourcePages iterates over the pages of a ListTagsForResource operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See ListTagsForResource method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a ListTagsForResource operation. -// pageNum := 0 -// err := client.ListTagsForResourcePages(params, -// func(page *efs.ListTagsForResourceOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *EFS) ListTagsForResourcePages(input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool) error { - return c.ListTagsForResourcePagesWithContext(aws.BackgroundContext(), input, fn) -} - -// ListTagsForResourcePagesWithContext same as ListTagsForResourcePages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) ListTagsForResourcePagesWithContext(ctx aws.Context, input *ListTagsForResourceInput, fn func(*ListTagsForResourceOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *ListTagsForResourceInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.ListTagsForResourceRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*ListTagsForResourceOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opModifyMountTargetSecurityGroups = "ModifyMountTargetSecurityGroups" - -// ModifyMountTargetSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the ModifyMountTargetSecurityGroups operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See ModifyMountTargetSecurityGroups for more information on using the ModifyMountTargetSecurityGroups -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the ModifyMountTargetSecurityGroupsRequest method. -// req, resp := client.ModifyMountTargetSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups -func (c *EFS) ModifyMountTargetSecurityGroupsRequest(input *ModifyMountTargetSecurityGroupsInput) (req *request.Request, output *ModifyMountTargetSecurityGroupsOutput) { - op := &request.Operation{ - Name: opModifyMountTargetSecurityGroups, - HTTPMethod: "PUT", - HTTPPath: "/2015-02-01/mount-targets/{MountTargetId}/security-groups", - } - - if input == nil { - input = &ModifyMountTargetSecurityGroupsInput{} - } - - output = &ModifyMountTargetSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// ModifyMountTargetSecurityGroups API operation for Amazon Elastic File System. -// -// Modifies the set of security groups in effect for a mount target. -// -// When you create a mount target, Amazon EFS also creates a new network interface. -// For more information, see CreateMountTarget. This operation replaces the -// security groups in effect for the network interface associated with a mount -// target, with the SecurityGroups provided in the request. This operation requires -// that the network interface of the mount target has been created and the lifecycle -// state of the mount target is not deleted. -// -// The operation requires permissions for the following actions: -// -// - elasticfilesystem:ModifyMountTargetSecurityGroups action on the mount -// target's file system. -// -// - ec2:ModifyNetworkInterfaceAttribute action on the mount target's network -// interface. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation ModifyMountTargetSecurityGroups for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - MountTargetNotFound -// Returned if there is no mount target with the specified ID found in the caller's -// Amazon Web Services account. -// -// - IncorrectMountTargetState -// Returned if the mount target is not in the correct state for the operation. -// -// - SecurityGroupLimitExceeded -// Returned if the size of SecurityGroups specified in the request is greater -// than five. -// -// - SecurityGroupNotFound -// Returned if one of the specified security groups doesn't exist in the subnet's -// virtual private cloud (VPC). -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/ModifyMountTargetSecurityGroups -func (c *EFS) ModifyMountTargetSecurityGroups(input *ModifyMountTargetSecurityGroupsInput) (*ModifyMountTargetSecurityGroupsOutput, error) { - req, out := c.ModifyMountTargetSecurityGroupsRequest(input) - return out, req.Send() -} - -// ModifyMountTargetSecurityGroupsWithContext is the same as ModifyMountTargetSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyMountTargetSecurityGroups for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) ModifyMountTargetSecurityGroupsWithContext(ctx aws.Context, input *ModifyMountTargetSecurityGroupsInput, opts ...request.Option) (*ModifyMountTargetSecurityGroupsOutput, error) { - req, out := c.ModifyMountTargetSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutAccountPreferences = "PutAccountPreferences" - -// PutAccountPreferencesRequest generates a "aws/request.Request" representing the -// client's request for the PutAccountPreferences operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutAccountPreferences for more information on using the PutAccountPreferences -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutAccountPreferencesRequest method. -// req, resp := client.PutAccountPreferencesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutAccountPreferences -func (c *EFS) PutAccountPreferencesRequest(input *PutAccountPreferencesInput) (req *request.Request, output *PutAccountPreferencesOutput) { - op := &request.Operation{ - Name: opPutAccountPreferences, - HTTPMethod: "PUT", - HTTPPath: "/2015-02-01/account-preferences", - } - - if input == nil { - input = &PutAccountPreferencesInput{} - } - - output = &PutAccountPreferencesOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutAccountPreferences API operation for Amazon Elastic File System. -// -// Use this operation to set the account preference in the current Amazon Web -// Services Region to use long 17 character (63 bit) or short 8 character (32 -// bit) resource IDs for new EFS file system and mount target resources. All -// existing resource IDs are not affected by any changes you make. You can set -// the ID preference during the opt-in period as EFS transitions to long resource -// IDs. For more information, see Managing Amazon EFS resource IDs (https://docs.aws.amazon.com/efs/latest/ug/manage-efs-resource-ids.html). -// -// Starting in October, 2021, you will receive an error if you try to set the -// account preference to use the short 8 character format resource ID. Contact -// Amazon Web Services support if you receive an error and must use short IDs -// for file system and mount target resources. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation PutAccountPreferences for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutAccountPreferences -func (c *EFS) PutAccountPreferences(input *PutAccountPreferencesInput) (*PutAccountPreferencesOutput, error) { - req, out := c.PutAccountPreferencesRequest(input) - return out, req.Send() -} - -// PutAccountPreferencesWithContext is the same as PutAccountPreferences with the addition of -// the ability to pass a context and additional request options. -// -// See PutAccountPreferences for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) PutAccountPreferencesWithContext(ctx aws.Context, input *PutAccountPreferencesInput, opts ...request.Option) (*PutAccountPreferencesOutput, error) { - req, out := c.PutAccountPreferencesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutBackupPolicy = "PutBackupPolicy" - -// PutBackupPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutBackupPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutBackupPolicy for more information on using the PutBackupPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutBackupPolicyRequest method. -// req, resp := client.PutBackupPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutBackupPolicy -func (c *EFS) PutBackupPolicyRequest(input *PutBackupPolicyInput) (req *request.Request, output *PutBackupPolicyOutput) { - op := &request.Operation{ - Name: opPutBackupPolicy, - HTTPMethod: "PUT", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/backup-policy", - } - - if input == nil { - input = &PutBackupPolicyInput{} - } - - output = &PutBackupPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutBackupPolicy API operation for Amazon Elastic File System. -// -// Updates the file system's backup policy. Use this action to start or stop -// automatic backups of the file system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation PutBackupPolicy for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - IncorrectFileSystemLifeCycleState -// Returned if the file system's lifecycle state is not "available". -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - ValidationException -// Returned if the Backup service is not available in the Amazon Web Services -// Region in which the request was made. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutBackupPolicy -func (c *EFS) PutBackupPolicy(input *PutBackupPolicyInput) (*PutBackupPolicyOutput, error) { - req, out := c.PutBackupPolicyRequest(input) - return out, req.Send() -} - -// PutBackupPolicyWithContext is the same as PutBackupPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutBackupPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) PutBackupPolicyWithContext(ctx aws.Context, input *PutBackupPolicyInput, opts ...request.Option) (*PutBackupPolicyOutput, error) { - req, out := c.PutBackupPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutFileSystemPolicy = "PutFileSystemPolicy" - -// PutFileSystemPolicyRequest generates a "aws/request.Request" representing the -// client's request for the PutFileSystemPolicy operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutFileSystemPolicy for more information on using the PutFileSystemPolicy -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutFileSystemPolicyRequest method. -// req, resp := client.PutFileSystemPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutFileSystemPolicy -func (c *EFS) PutFileSystemPolicyRequest(input *PutFileSystemPolicyInput) (req *request.Request, output *PutFileSystemPolicyOutput) { - op := &request.Operation{ - Name: opPutFileSystemPolicy, - HTTPMethod: "PUT", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/policy", - } - - if input == nil { - input = &PutFileSystemPolicyInput{} - } - - output = &PutFileSystemPolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutFileSystemPolicy API operation for Amazon Elastic File System. -// -// Applies an Amazon EFS FileSystemPolicy to an Amazon EFS file system. A file -// system policy is an IAM resource-based policy and can contain multiple policy -// statements. A file system always has exactly one file system policy, which -// can be the default policy or an explicit policy set or updated using this -// API operation. EFS file system policies have a 20,000 character limit. When -// an explicit policy is set, it overrides the default policy. For more information -// about the default file system policy, see Default EFS File System Policy -// (https://docs.aws.amazon.com/efs/latest/ug/iam-access-control-nfs-efs.html#default-filesystempolicy). -// -// EFS file system policies have a 20,000 character limit. -// -// This operation requires permissions for the elasticfilesystem:PutFileSystemPolicy -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation PutFileSystemPolicy for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - InvalidPolicyException -// Returned if the FileSystemPolicy is malformed or contains an error such as -// a parameter value that is not valid or a missing required parameter. Returned -// in the case of a policy lockout safety check error. -// -// - IncorrectFileSystemLifeCycleState -// Returned if the file system's lifecycle state is not "available". -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutFileSystemPolicy -func (c *EFS) PutFileSystemPolicy(input *PutFileSystemPolicyInput) (*PutFileSystemPolicyOutput, error) { - req, out := c.PutFileSystemPolicyRequest(input) - return out, req.Send() -} - -// PutFileSystemPolicyWithContext is the same as PutFileSystemPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See PutFileSystemPolicy for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) PutFileSystemPolicyWithContext(ctx aws.Context, input *PutFileSystemPolicyInput, opts ...request.Option) (*PutFileSystemPolicyOutput, error) { - req, out := c.PutFileSystemPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opPutLifecycleConfiguration = "PutLifecycleConfiguration" - -// PutLifecycleConfigurationRequest generates a "aws/request.Request" representing the -// client's request for the PutLifecycleConfiguration operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See PutLifecycleConfiguration for more information on using the PutLifecycleConfiguration -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the PutLifecycleConfigurationRequest method. -// req, resp := client.PutLifecycleConfigurationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutLifecycleConfiguration -func (c *EFS) PutLifecycleConfigurationRequest(input *PutLifecycleConfigurationInput) (req *request.Request, output *PutLifecycleConfigurationOutput) { - op := &request.Operation{ - Name: opPutLifecycleConfiguration, - HTTPMethod: "PUT", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/lifecycle-configuration", - } - - if input == nil { - input = &PutLifecycleConfigurationInput{} - } - - output = &PutLifecycleConfigurationOutput{} - req = c.newRequest(op, input, output) - return -} - -// PutLifecycleConfiguration API operation for Amazon Elastic File System. -// -// Use this action to manage storage for your file system. A LifecycleConfiguration -// consists of one or more LifecyclePolicy objects that define the following: -// -// - TransitionToIA – When to move files in the file system from primary -// storage (Standard storage class) into the Infrequent Access (IA) storage. -// -// - TransitionToArchive – When to move files in the file system from their -// current storage class (either IA or Standard storage) into the Archive -// storage. File systems cannot transition into Archive storage before transitioning -// into IA storage. Therefore, TransitionToArchive must either not be set -// or must be later than TransitionToIA. The Archive storage class is available -// only for file systems that use the Elastic Throughput mode and the General -// Purpose Performance mode. -// -// - TransitionToPrimaryStorageClass – Whether to move files in the file -// system back to primary storage (Standard storage class) after they are -// accessed in IA or Archive storage. -// -// For more information, see Managing file system storage (https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html). -// -// Each Amazon EFS file system supports one lifecycle configuration, which applies -// to all files in the file system. If a LifecycleConfiguration object already -// exists for the specified file system, a PutLifecycleConfiguration call modifies -// the existing configuration. A PutLifecycleConfiguration call with an empty -// LifecyclePolicies array in the request body deletes any existing LifecycleConfiguration. -// In the request, specify the following: -// -// - The ID for the file system for which you are enabling, disabling, or -// modifying Lifecycle management. -// -// - A LifecyclePolicies array of LifecyclePolicy objects that define when -// to move files to IA storage, to Archive storage, and back to primary storage. -// Amazon EFS requires that each LifecyclePolicy object have only have a -// single transition, so the LifecyclePolicies array needs to be structured -// with separate LifecyclePolicy objects. See the example requests in the -// following section for more information. -// -// This operation requires permissions for the elasticfilesystem:PutLifecycleConfiguration -// operation. -// -// To apply a LifecycleConfiguration object to an encrypted file system, you -// need the same Key Management Service permissions as when you created the -// encrypted file system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation PutLifecycleConfiguration for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - IncorrectFileSystemLifeCycleState -// Returned if the file system's lifecycle state is not "available". -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/PutLifecycleConfiguration -func (c *EFS) PutLifecycleConfiguration(input *PutLifecycleConfigurationInput) (*PutLifecycleConfigurationOutput, error) { - req, out := c.PutLifecycleConfigurationRequest(input) - return out, req.Send() -} - -// PutLifecycleConfigurationWithContext is the same as PutLifecycleConfiguration with the addition of -// the ability to pass a context and additional request options. -// -// See PutLifecycleConfiguration for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) PutLifecycleConfigurationWithContext(ctx aws.Context, input *PutLifecycleConfigurationInput, opts ...request.Option) (*PutLifecycleConfigurationOutput, error) { - req, out := c.PutLifecycleConfigurationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagResource = "TagResource" - -// TagResourceRequest generates a "aws/request.Request" representing the -// client's request for the TagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagResource for more information on using the TagResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagResourceRequest method. -// req, resp := client.TagResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/TagResource -func (c *EFS) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { - op := &request.Operation{ - Name: opTagResource, - HTTPMethod: "POST", - HTTPPath: "/2015-02-01/resource-tags/{ResourceId}", - } - - if input == nil { - input = &TagResourceInput{} - } - - output = &TagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// TagResource API operation for Amazon Elastic File System. -// -// Creates a tag for an EFS resource. You can create tags for EFS file systems -// and access points using this API operation. -// -// This operation requires permissions for the elasticfilesystem:TagResource -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation TagResource for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - AccessPointNotFound -// Returned if the specified AccessPointId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/TagResource -func (c *EFS) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - return out, req.Send() -} - -// TagResourceWithContext is the same as TagResource with the addition of -// the ability to pass a context and additional request options. -// -// See TagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { - req, out := c.TagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagResource = "UntagResource" - -// UntagResourceRequest generates a "aws/request.Request" representing the -// client's request for the UntagResource operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagResource for more information on using the UntagResource -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagResourceRequest method. -// req, resp := client.UntagResourceRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UntagResource -func (c *EFS) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { - op := &request.Operation{ - Name: opUntagResource, - HTTPMethod: "DELETE", - HTTPPath: "/2015-02-01/resource-tags/{ResourceId}", - } - - if input == nil { - input = &UntagResourceInput{} - } - - output = &UntagResourceOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// UntagResource API operation for Amazon Elastic File System. -// -// Removes tags from an EFS resource. You can remove tags from EFS file systems -// and access points using this API operation. -// -// This operation requires permissions for the elasticfilesystem:UntagResource -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation UntagResource for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - AccessPointNotFound -// Returned if the specified AccessPointId value doesn't exist in the requester's -// Amazon Web Services account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UntagResource -func (c *EFS) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - return out, req.Send() -} - -// UntagResourceWithContext is the same as UntagResource with the addition of -// the ability to pass a context and additional request options. -// -// See UntagResource for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { - req, out := c.UntagResourceRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFileSystem = "UpdateFileSystem" - -// UpdateFileSystemRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFileSystem operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFileSystem for more information on using the UpdateFileSystem -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateFileSystemRequest method. -// req, resp := client.UpdateFileSystemRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem -func (c *EFS) UpdateFileSystemRequest(input *UpdateFileSystemInput) (req *request.Request, output *UpdateFileSystemOutput) { - op := &request.Operation{ - Name: opUpdateFileSystem, - HTTPMethod: "PUT", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}", - } - - if input == nil { - input = &UpdateFileSystemInput{} - } - - output = &UpdateFileSystemOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFileSystem API operation for Amazon Elastic File System. -// -// Updates the throughput mode or the amount of provisioned throughput of an -// existing file system. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation UpdateFileSystem for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - IncorrectFileSystemLifeCycleState -// Returned if the file system's lifecycle state is not "available". -// -// - InsufficientThroughputCapacity -// Returned if there's not enough capacity to provision additional throughput. -// This value might be returned when you try to create a file system in provisioned -// throughput mode, when you attempt to increase the provisioned throughput -// of an existing file system, or when you attempt to change an existing file -// system from Bursting Throughput to Provisioned Throughput mode. Try again -// later. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - ThroughputLimitExceeded -// Returned if the throughput mode or amount of provisioned throughput can't -// be changed because the throughput limit of 1024 MiB/s has been reached. -// -// - TooManyRequests -// Returned if you don’t wait at least 24 hours before either changing the -// throughput mode, or decreasing the Provisioned Throughput value. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystem -func (c *EFS) UpdateFileSystem(input *UpdateFileSystemInput) (*UpdateFileSystemOutput, error) { - req, out := c.UpdateFileSystemRequest(input) - return out, req.Send() -} - -// UpdateFileSystemWithContext is the same as UpdateFileSystem with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFileSystem for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) UpdateFileSystemWithContext(ctx aws.Context, input *UpdateFileSystemInput, opts ...request.Option) (*UpdateFileSystemOutput, error) { - req, out := c.UpdateFileSystemRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUpdateFileSystemProtection = "UpdateFileSystemProtection" - -// UpdateFileSystemProtectionRequest generates a "aws/request.Request" representing the -// client's request for the UpdateFileSystemProtection operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UpdateFileSystemProtection for more information on using the UpdateFileSystemProtection -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UpdateFileSystemProtectionRequest method. -// req, resp := client.UpdateFileSystemProtectionRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystemProtection -func (c *EFS) UpdateFileSystemProtectionRequest(input *UpdateFileSystemProtectionInput) (req *request.Request, output *UpdateFileSystemProtectionOutput) { - op := &request.Operation{ - Name: opUpdateFileSystemProtection, - HTTPMethod: "PUT", - HTTPPath: "/2015-02-01/file-systems/{FileSystemId}/protection", - } - - if input == nil { - input = &UpdateFileSystemProtectionInput{} - } - - output = &UpdateFileSystemProtectionOutput{} - req = c.newRequest(op, input, output) - return -} - -// UpdateFileSystemProtection API operation for Amazon Elastic File System. -// -// Updates protection on the file system. -// -// This operation requires permissions for the elasticfilesystem:UpdateFileSystemProtection -// action. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for Amazon Elastic File System's -// API operation UpdateFileSystemProtection for usage and error information. -// -// Returned Error Types: -// -// - BadRequest -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -// -// - FileSystemNotFound -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -// -// - IncorrectFileSystemLifeCycleState -// Returned if the file system's lifecycle state is not "available". -// -// - InsufficientThroughputCapacity -// Returned if there's not enough capacity to provision additional throughput. -// This value might be returned when you try to create a file system in provisioned -// throughput mode, when you attempt to increase the provisioned throughput -// of an existing file system, or when you attempt to change an existing file -// system from Bursting Throughput to Provisioned Throughput mode. Try again -// later. -// -// - InternalServerError -// Returned if an error occurred on the server side. -// -// - ThroughputLimitExceeded -// Returned if the throughput mode or amount of provisioned throughput can't -// be changed because the throughput limit of 1024 MiB/s has been reached. -// -// - ReplicationAlreadyExists -// Returned if the file system is already included in a replication configuration.> -// -// - TooManyRequests -// Returned if you don’t wait at least 24 hours before either changing the -// throughput mode, or decreasing the Provisioned Throughput value. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01/UpdateFileSystemProtection -func (c *EFS) UpdateFileSystemProtection(input *UpdateFileSystemProtectionInput) (*UpdateFileSystemProtectionOutput, error) { - req, out := c.UpdateFileSystemProtectionRequest(input) - return out, req.Send() -} - -// UpdateFileSystemProtectionWithContext is the same as UpdateFileSystemProtection with the addition of -// the ability to pass a context and additional request options. -// -// See UpdateFileSystemProtection for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *EFS) UpdateFileSystemProtectionWithContext(ctx aws.Context, input *UpdateFileSystemProtectionInput, opts ...request.Option) (*UpdateFileSystemProtectionOutput, error) { - req, out := c.UpdateFileSystemProtectionRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Returned if the access point that you are trying to create already exists, -// with the creation token you provided in the request. -type AccessPointAlreadyExists struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // AccessPointId is a required field - AccessPointId *string `type:"string" required:"true"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessPointAlreadyExists) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessPointAlreadyExists) GoString() string { - return s.String() -} - -func newErrorAccessPointAlreadyExists(v protocol.ResponseMetadata) error { - return &AccessPointAlreadyExists{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *AccessPointAlreadyExists) Code() string { - return "AccessPointAlreadyExists" -} - -// Message returns the exception's message. -func (s *AccessPointAlreadyExists) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *AccessPointAlreadyExists) OrigErr() error { - return nil -} - -func (s *AccessPointAlreadyExists) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *AccessPointAlreadyExists) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *AccessPointAlreadyExists) RequestID() string { - return s.RespMetadata.RequestID -} - -// Provides a description of an EFS file system access point. -type AccessPointDescription struct { - _ struct{} `type:"structure"` - - // The unique Amazon Resource Name (ARN) associated with the access point. - AccessPointArn *string `type:"string"` - - // The ID of the access point, assigned by Amazon EFS. - AccessPointId *string `type:"string"` - - // The opaque string specified in the request to ensure idempotent creation. - ClientToken *string `min:"1" type:"string"` - - // The ID of the EFS file system that the access point applies to. - FileSystemId *string `type:"string"` - - // Identifies the lifecycle phase of the access point. - LifeCycleState *string `type:"string" enum:"LifeCycleState"` - - // The name of the access point. This is the value of the Name tag. - Name *string `type:"string"` - - // Identifies the Amazon Web Services account that owns the access point resource. - OwnerId *string `type:"string"` - - // The full POSIX identity, including the user ID, group ID, and secondary group - // IDs on the access point that is used for all file operations by NFS clients - // using the access point. - PosixUser *PosixUser `type:"structure"` - - // The directory on the EFS file system that the access point exposes as the - // root directory to NFS clients using the access point. - RootDirectory *RootDirectory `type:"structure"` - - // The tags associated with the access point, presented as an array of Tag objects. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessPointDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessPointDescription) GoString() string { - return s.String() -} - -// SetAccessPointArn sets the AccessPointArn field's value. -func (s *AccessPointDescription) SetAccessPointArn(v string) *AccessPointDescription { - s.AccessPointArn = &v - return s -} - -// SetAccessPointId sets the AccessPointId field's value. -func (s *AccessPointDescription) SetAccessPointId(v string) *AccessPointDescription { - s.AccessPointId = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *AccessPointDescription) SetClientToken(v string) *AccessPointDescription { - s.ClientToken = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *AccessPointDescription) SetFileSystemId(v string) *AccessPointDescription { - s.FileSystemId = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *AccessPointDescription) SetLifeCycleState(v string) *AccessPointDescription { - s.LifeCycleState = &v - return s -} - -// SetName sets the Name field's value. -func (s *AccessPointDescription) SetName(v string) *AccessPointDescription { - s.Name = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *AccessPointDescription) SetOwnerId(v string) *AccessPointDescription { - s.OwnerId = &v - return s -} - -// SetPosixUser sets the PosixUser field's value. -func (s *AccessPointDescription) SetPosixUser(v *PosixUser) *AccessPointDescription { - s.PosixUser = v - return s -} - -// SetRootDirectory sets the RootDirectory field's value. -func (s *AccessPointDescription) SetRootDirectory(v *RootDirectory) *AccessPointDescription { - s.RootDirectory = v - return s -} - -// SetTags sets the Tags field's value. -func (s *AccessPointDescription) SetTags(v []*Tag) *AccessPointDescription { - s.Tags = v - return s -} - -// Returned if the Amazon Web Services account has already created the maximum -// number of access points allowed per file system. For more informaton, see -// https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region -// (https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region). -type AccessPointLimitExceeded struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessPointLimitExceeded) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessPointLimitExceeded) GoString() string { - return s.String() -} - -func newErrorAccessPointLimitExceeded(v protocol.ResponseMetadata) error { - return &AccessPointLimitExceeded{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *AccessPointLimitExceeded) Code() string { - return "AccessPointLimitExceeded" -} - -// Message returns the exception's message. -func (s *AccessPointLimitExceeded) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *AccessPointLimitExceeded) OrigErr() error { - return nil -} - -func (s *AccessPointLimitExceeded) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *AccessPointLimitExceeded) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *AccessPointLimitExceeded) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the specified AccessPointId value doesn't exist in the requester's -// Amazon Web Services account. -type AccessPointNotFound struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessPointNotFound) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AccessPointNotFound) GoString() string { - return s.String() -} - -func newErrorAccessPointNotFound(v protocol.ResponseMetadata) error { - return &AccessPointNotFound{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *AccessPointNotFound) Code() string { - return "AccessPointNotFound" -} - -// Message returns the exception's message. -func (s *AccessPointNotFound) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *AccessPointNotFound) OrigErr() error { - return nil -} - -func (s *AccessPointNotFound) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *AccessPointNotFound) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *AccessPointNotFound) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the Availability Zone that was specified for a mount target is -// different from the Availability Zone that was specified for One Zone storage. -// For more information, see Regional and One Zone storage redundancy (https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html). -type AvailabilityZonesMismatch struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - ErrorCode *string `min:"1" type:"string"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AvailabilityZonesMismatch) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s AvailabilityZonesMismatch) GoString() string { - return s.String() -} - -func newErrorAvailabilityZonesMismatch(v protocol.ResponseMetadata) error { - return &AvailabilityZonesMismatch{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *AvailabilityZonesMismatch) Code() string { - return "AvailabilityZonesMismatch" -} - -// Message returns the exception's message. -func (s *AvailabilityZonesMismatch) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *AvailabilityZonesMismatch) OrigErr() error { - return nil -} - -func (s *AvailabilityZonesMismatch) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *AvailabilityZonesMismatch) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *AvailabilityZonesMismatch) RequestID() string { - return s.RespMetadata.RequestID -} - -// The backup policy for the file system used to create automatic daily backups. -// If status has a value of ENABLED, the file system is being automatically -// backed up. For more information, see Automatic backups (https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups). -type BackupPolicy struct { - _ struct{} `type:"structure"` - - // Describes the status of the file system's backup policy. - // - // * ENABLED – EFS is automatically backing up the file system. - // - // * ENABLING – EFS is turning on automatic backups for the file system. - // - // * DISABLED – Automatic back ups are turned off for the file system. - // - // * DISABLING – EFS is turning off automatic backups for the file system. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"Status"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s BackupPolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s BackupPolicy) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *BackupPolicy) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "BackupPolicy"} - if s.Status == nil { - invalidParams.Add(request.NewErrParamRequired("Status")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetStatus sets the Status field's value. -func (s *BackupPolicy) SetStatus(v string) *BackupPolicy { - s.Status = &v - return s -} - -// Returned if the request is malformed or contains an error such as an invalid -// parameter value or a missing required parameter. -type BadRequest struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s BadRequest) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s BadRequest) GoString() string { - return s.String() -} - -func newErrorBadRequest(v protocol.ResponseMetadata) error { - return &BadRequest{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *BadRequest) Code() string { - return "BadRequest" -} - -// Message returns the exception's message. -func (s *BadRequest) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *BadRequest) OrigErr() error { - return nil -} - -func (s *BadRequest) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *BadRequest) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *BadRequest) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the source file system in a replication is encrypted but the -// destination file system is unencrypted. -type ConflictException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - ErrorCode *string `min:"1" type:"string"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConflictException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConflictException) GoString() string { - return s.String() -} - -func newErrorConflictException(v protocol.ResponseMetadata) error { - return &ConflictException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ConflictException) Code() string { - return "ConflictException" -} - -// Message returns the exception's message. -func (s *ConflictException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ConflictException) OrigErr() error { - return nil -} - -func (s *ConflictException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ConflictException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ConflictException) RequestID() string { - return s.RespMetadata.RequestID -} - -type CreateAccessPointInput struct { - _ struct{} `type:"structure"` - - // A string of up to 64 ASCII characters that Amazon EFS uses to ensure idempotent - // creation. - ClientToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // The ID of the EFS file system that the access point provides access to. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // The operating system user and group applied to all file system requests made - // using the access point. - PosixUser *PosixUser `type:"structure"` - - // Specifies the directory on the EFS file system that the access point exposes - // as the root directory of your file system to NFS clients using the access - // point. The clients using the access point can only access the root directory - // and below. If the RootDirectory > Path specified does not exist, Amazon EFS - // creates it and applies the CreationInfo settings when a client connects to - // an access point. When specifying a RootDirectory, you must provide the Path, - // and the CreationInfo. - // - // Amazon EFS creates a root directory only if you have provided the CreationInfo: - // OwnUid, OwnGID, and permissions for the directory. If you do not provide - // this information, Amazon EFS does not create the root directory. If the root - // directory does not exist, attempts to mount using the access point will fail. - RootDirectory *RootDirectory `type:"structure"` - - // Creates tags associated with the access point. Each tag is a key-value pair, - // each key must be unique. For more information, see Tagging Amazon Web Services - // resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) - // in the Amazon Web Services General Reference Guide. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessPointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessPointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAccessPointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAccessPointInput"} - if s.ClientToken != nil && len(*s.ClientToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ClientToken", 1)) - } - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.PosixUser != nil { - if err := s.PosixUser.Validate(); err != nil { - invalidParams.AddNested("PosixUser", err.(request.ErrInvalidParams)) - } - } - if s.RootDirectory != nil { - if err := s.RootDirectory.Validate(); err != nil { - invalidParams.AddNested("RootDirectory", err.(request.ErrInvalidParams)) - } - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateAccessPointInput) SetClientToken(v string) *CreateAccessPointInput { - s.ClientToken = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *CreateAccessPointInput) SetFileSystemId(v string) *CreateAccessPointInput { - s.FileSystemId = &v - return s -} - -// SetPosixUser sets the PosixUser field's value. -func (s *CreateAccessPointInput) SetPosixUser(v *PosixUser) *CreateAccessPointInput { - s.PosixUser = v - return s -} - -// SetRootDirectory sets the RootDirectory field's value. -func (s *CreateAccessPointInput) SetRootDirectory(v *RootDirectory) *CreateAccessPointInput { - s.RootDirectory = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateAccessPointInput) SetTags(v []*Tag) *CreateAccessPointInput { - s.Tags = v - return s -} - -// Provides a description of an EFS file system access point. -type CreateAccessPointOutput struct { - _ struct{} `type:"structure"` - - // The unique Amazon Resource Name (ARN) associated with the access point. - AccessPointArn *string `type:"string"` - - // The ID of the access point, assigned by Amazon EFS. - AccessPointId *string `type:"string"` - - // The opaque string specified in the request to ensure idempotent creation. - ClientToken *string `min:"1" type:"string"` - - // The ID of the EFS file system that the access point applies to. - FileSystemId *string `type:"string"` - - // Identifies the lifecycle phase of the access point. - LifeCycleState *string `type:"string" enum:"LifeCycleState"` - - // The name of the access point. This is the value of the Name tag. - Name *string `type:"string"` - - // Identifies the Amazon Web Services account that owns the access point resource. - OwnerId *string `type:"string"` - - // The full POSIX identity, including the user ID, group ID, and secondary group - // IDs on the access point that is used for all file operations by NFS clients - // using the access point. - PosixUser *PosixUser `type:"structure"` - - // The directory on the EFS file system that the access point exposes as the - // root directory to NFS clients using the access point. - RootDirectory *RootDirectory `type:"structure"` - - // The tags associated with the access point, presented as an array of Tag objects. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessPointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateAccessPointOutput) GoString() string { - return s.String() -} - -// SetAccessPointArn sets the AccessPointArn field's value. -func (s *CreateAccessPointOutput) SetAccessPointArn(v string) *CreateAccessPointOutput { - s.AccessPointArn = &v - return s -} - -// SetAccessPointId sets the AccessPointId field's value. -func (s *CreateAccessPointOutput) SetAccessPointId(v string) *CreateAccessPointOutput { - s.AccessPointId = &v - return s -} - -// SetClientToken sets the ClientToken field's value. -func (s *CreateAccessPointOutput) SetClientToken(v string) *CreateAccessPointOutput { - s.ClientToken = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *CreateAccessPointOutput) SetFileSystemId(v string) *CreateAccessPointOutput { - s.FileSystemId = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *CreateAccessPointOutput) SetLifeCycleState(v string) *CreateAccessPointOutput { - s.LifeCycleState = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateAccessPointOutput) SetName(v string) *CreateAccessPointOutput { - s.Name = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *CreateAccessPointOutput) SetOwnerId(v string) *CreateAccessPointOutput { - s.OwnerId = &v - return s -} - -// SetPosixUser sets the PosixUser field's value. -func (s *CreateAccessPointOutput) SetPosixUser(v *PosixUser) *CreateAccessPointOutput { - s.PosixUser = v - return s -} - -// SetRootDirectory sets the RootDirectory field's value. -func (s *CreateAccessPointOutput) SetRootDirectory(v *RootDirectory) *CreateAccessPointOutput { - s.RootDirectory = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateAccessPointOutput) SetTags(v []*Tag) *CreateAccessPointOutput { - s.Tags = v - return s -} - -type CreateFileSystemInput struct { - _ struct{} `type:"structure"` - - // Used to create a One Zone file system. It specifies the Amazon Web Services - // Availability Zone in which to create the file system. Use the format us-east-1a - // to specify the Availability Zone. For more information about One Zone file - // systems, see Using EFS storage classes (https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html) - // in the Amazon EFS User Guide. - // - // One Zone file systems are not available in all Availability Zones in Amazon - // Web Services Regions where Amazon EFS is available. - AvailabilityZoneName *string `min:"1" type:"string"` - - // Specifies whether automatic backups are enabled on the file system that you - // are creating. Set the value to true to enable automatic backups. If you are - // creating a One Zone file system, automatic backups are enabled by default. - // For more information, see Automatic backups (https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#automatic-backups) - // in the Amazon EFS User Guide. - // - // Default is false. However, if you specify an AvailabilityZoneName, the default - // is true. - // - // Backup is not available in all Amazon Web Services Regions where Amazon EFS - // is available. - Backup *bool `type:"boolean"` - - // A string of up to 64 ASCII characters. Amazon EFS uses this to ensure idempotent - // creation. - CreationToken *string `min:"1" type:"string" idempotencyToken:"true"` - - // A Boolean value that, if true, creates an encrypted file system. When creating - // an encrypted file system, you have the option of specifying an existing Key - // Management Service key (KMS key). If you don't specify a KMS key, then the - // default KMS key for Amazon EFS, /aws/elasticfilesystem, is used to protect - // the encrypted file system. - Encrypted *bool `type:"boolean"` - - // The ID of the KMS key that you want to use to protect the encrypted file - // system. This parameter is required only if you want to use a non-default - // KMS key. If this parameter is not specified, the default KMS key for Amazon - // EFS is used. You can specify a KMS key ID using the following formats: - // - // * Key ID - A unique identifier of the key, for example 1234abcd-12ab-34cd-56ef-1234567890ab. - // - // * ARN - An Amazon Resource Name (ARN) for the key, for example arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - // - // * Key alias - A previously created display name for a key, for example - // alias/projectKey1. - // - // * Key alias ARN - An ARN for a key alias, for example arn:aws:kms:us-west-2:444455556666:alias/projectKey1. - // - // If you use KmsKeyId, you must set the CreateFileSystemRequest$Encrypted parameter - // to true. - // - // EFS accepts only symmetric KMS keys. You cannot use asymmetric KMS keys with - // Amazon EFS file systems. - KmsKeyId *string `type:"string"` - - // The Performance mode of the file system. We recommend generalPurpose performance - // mode for all file systems. File systems using the maxIO performance mode - // can scale to higher levels of aggregate throughput and operations per second - // with a tradeoff of slightly higher latencies for most file operations. The - // performance mode can't be changed after the file system has been created. - // The maxIO mode is not supported on One Zone file systems. - // - // Due to the higher per-operation latencies with Max I/O, we recommend using - // General Purpose performance mode for all file systems. - // - // Default is generalPurpose. - PerformanceMode *string `type:"string" enum:"PerformanceMode"` - - // The throughput, measured in mebibytes per second (MiBps), that you want to - // provision for a file system that you're creating. Required if ThroughputMode - // is set to provisioned. Valid values are 1-3414 MiBps, with the upper limit - // depending on Region. To increase this limit, contact Amazon Web Services - // Support. For more information, see Amazon EFS quotas that you can increase - // (https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) in the - // Amazon EFS User Guide. - ProvisionedThroughputInMibps *float64 `min:"1" type:"double"` - - // Use to create one or more tags associated with the file system. Each tag - // is a user-defined key-value pair. Name your file system on creation by including - // a "Key":"Name","Value":"{value}" key-value pair. Each key must be unique. - // For more information, see Tagging Amazon Web Services resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) - // in the Amazon Web Services General Reference Guide. - Tags []*Tag `type:"list"` - - // Specifies the throughput mode for the file system. The mode can be bursting, - // provisioned, or elastic. If you set ThroughputMode to provisioned, you must - // also set a value for ProvisionedThroughputInMibps. After you create the file - // system, you can decrease your file system's Provisioned throughput or change - // between the throughput modes, with certain time restrictions. For more information, - // see Specifying throughput with provisioned mode (https://docs.aws.amazon.com/efs/latest/ug/performance.html#provisioned-throughput) - // in the Amazon EFS User Guide. - // - // Default is bursting. - ThroughputMode *string `type:"string" enum:"ThroughputMode"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFileSystemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateFileSystemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateFileSystemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateFileSystemInput"} - if s.AvailabilityZoneName != nil && len(*s.AvailabilityZoneName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AvailabilityZoneName", 1)) - } - if s.CreationToken != nil && len(*s.CreationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1)) - } - if s.ProvisionedThroughputInMibps != nil && *s.ProvisionedThroughputInMibps < 1 { - invalidParams.Add(request.NewErrParamMinValue("ProvisionedThroughputInMibps", 1)) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZoneName sets the AvailabilityZoneName field's value. -func (s *CreateFileSystemInput) SetAvailabilityZoneName(v string) *CreateFileSystemInput { - s.AvailabilityZoneName = &v - return s -} - -// SetBackup sets the Backup field's value. -func (s *CreateFileSystemInput) SetBackup(v bool) *CreateFileSystemInput { - s.Backup = &v - return s -} - -// SetCreationToken sets the CreationToken field's value. -func (s *CreateFileSystemInput) SetCreationToken(v string) *CreateFileSystemInput { - s.CreationToken = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *CreateFileSystemInput) SetEncrypted(v bool) *CreateFileSystemInput { - s.Encrypted = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *CreateFileSystemInput) SetKmsKeyId(v string) *CreateFileSystemInput { - s.KmsKeyId = &v - return s -} - -// SetPerformanceMode sets the PerformanceMode field's value. -func (s *CreateFileSystemInput) SetPerformanceMode(v string) *CreateFileSystemInput { - s.PerformanceMode = &v - return s -} - -// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. -func (s *CreateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *CreateFileSystemInput { - s.ProvisionedThroughputInMibps = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateFileSystemInput) SetTags(v []*Tag) *CreateFileSystemInput { - s.Tags = v - return s -} - -// SetThroughputMode sets the ThroughputMode field's value. -func (s *CreateFileSystemInput) SetThroughputMode(v string) *CreateFileSystemInput { - s.ThroughputMode = &v - return s -} - -type CreateMountTargetInput struct { - _ struct{} `type:"structure"` - - // The ID of the file system for which to create the mount target. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // Valid IPv4 address within the address range of the specified subnet. - IpAddress *string `min:"7" type:"string"` - - // Up to five VPC security group IDs, of the form sg-xxxxxxxx. These must be - // for the same VPC as subnet specified. - SecurityGroups []*string `type:"list"` - - // The ID of the subnet to add the mount target in. For One Zone file systems, - // use the subnet that is associated with the file system's Availability Zone. - // - // SubnetId is a required field - SubnetId *string `min:"15" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateMountTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateMountTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateMountTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateMountTargetInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.IpAddress != nil && len(*s.IpAddress) < 7 { - invalidParams.Add(request.NewErrParamMinLen("IpAddress", 7)) - } - if s.SubnetId == nil { - invalidParams.Add(request.NewErrParamRequired("SubnetId")) - } - if s.SubnetId != nil && len(*s.SubnetId) < 15 { - invalidParams.Add(request.NewErrParamMinLen("SubnetId", 15)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *CreateMountTargetInput) SetFileSystemId(v string) *CreateMountTargetInput { - s.FileSystemId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *CreateMountTargetInput) SetIpAddress(v string) *CreateMountTargetInput { - s.IpAddress = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CreateMountTargetInput) SetSecurityGroups(v []*string) *CreateMountTargetInput { - s.SecurityGroups = v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *CreateMountTargetInput) SetSubnetId(v string) *CreateMountTargetInput { - s.SubnetId = &v - return s -} - -type CreateReplicationConfigurationInput struct { - _ struct{} `type:"structure"` - - // An array of destination configuration objects. Only one destination configuration - // object is supported. - // - // Destinations is a required field - Destinations []*DestinationToCreate `type:"list" required:"true"` - - // Specifies the Amazon EFS file system that you want to replicate. This file - // system cannot already be a source or destination file system in another replication - // configuration. - // - // SourceFileSystemId is a required field - SourceFileSystemId *string `location:"uri" locationName:"SourceFileSystemId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateReplicationConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateReplicationConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateReplicationConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateReplicationConfigurationInput"} - if s.Destinations == nil { - invalidParams.Add(request.NewErrParamRequired("Destinations")) - } - if s.SourceFileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceFileSystemId")) - } - if s.SourceFileSystemId != nil && len(*s.SourceFileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceFileSystemId", 1)) - } - if s.Destinations != nil { - for i, v := range s.Destinations { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Destinations", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetDestinations sets the Destinations field's value. -func (s *CreateReplicationConfigurationInput) SetDestinations(v []*DestinationToCreate) *CreateReplicationConfigurationInput { - s.Destinations = v - return s -} - -// SetSourceFileSystemId sets the SourceFileSystemId field's value. -func (s *CreateReplicationConfigurationInput) SetSourceFileSystemId(v string) *CreateReplicationConfigurationInput { - s.SourceFileSystemId = &v - return s -} - -// Describes the replication configuration for a specific file system. -type CreateReplicationConfigurationOutput struct { - _ struct{} `type:"structure"` - - // Describes when the replication configuration was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // An array of destination objects. Only one destination object is supported. - // - // Destinations is a required field - Destinations []*Destination `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the original source EFS file system in - // the replication configuration. - // - // OriginalSourceFileSystemArn is a required field - OriginalSourceFileSystemArn *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the current source file system in the replication - // configuration. - // - // SourceFileSystemArn is a required field - SourceFileSystemArn *string `type:"string" required:"true"` - - // The ID of the source Amazon EFS file system that is being replicated. - // - // SourceFileSystemId is a required field - SourceFileSystemId *string `type:"string" required:"true"` - - // The Amazon Web Services Region in which the source EFS file system is located. - // - // SourceFileSystemRegion is a required field - SourceFileSystemRegion *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateReplicationConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateReplicationConfigurationOutput) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *CreateReplicationConfigurationOutput) SetCreationTime(v time.Time) *CreateReplicationConfigurationOutput { - s.CreationTime = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *CreateReplicationConfigurationOutput) SetDestinations(v []*Destination) *CreateReplicationConfigurationOutput { - s.Destinations = v - return s -} - -// SetOriginalSourceFileSystemArn sets the OriginalSourceFileSystemArn field's value. -func (s *CreateReplicationConfigurationOutput) SetOriginalSourceFileSystemArn(v string) *CreateReplicationConfigurationOutput { - s.OriginalSourceFileSystemArn = &v - return s -} - -// SetSourceFileSystemArn sets the SourceFileSystemArn field's value. -func (s *CreateReplicationConfigurationOutput) SetSourceFileSystemArn(v string) *CreateReplicationConfigurationOutput { - s.SourceFileSystemArn = &v - return s -} - -// SetSourceFileSystemId sets the SourceFileSystemId field's value. -func (s *CreateReplicationConfigurationOutput) SetSourceFileSystemId(v string) *CreateReplicationConfigurationOutput { - s.SourceFileSystemId = &v - return s -} - -// SetSourceFileSystemRegion sets the SourceFileSystemRegion field's value. -func (s *CreateReplicationConfigurationOutput) SetSourceFileSystemRegion(v string) *CreateReplicationConfigurationOutput { - s.SourceFileSystemRegion = &v - return s -} - -type CreateTagsInput struct { - _ struct{} `type:"structure"` - - // The ID of the file system whose tags you want to modify (String). This operation - // modifies the tags only, not the file system. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // An array of Tag objects to add. Each Tag object is a key-value pair. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTagsInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *CreateTagsInput) SetFileSystemId(v string) *CreateTagsInput { - s.FileSystemId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTagsInput) SetTags(v []*Tag) *CreateTagsInput { - s.Tags = v - return s -} - -type CreateTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreateTagsOutput) GoString() string { - return s.String() -} - -// Required if the RootDirectory > Path specified does not exist. Specifies -// the POSIX IDs and permissions to apply to the access point's RootDirectory -// > Path. If the access point root directory does not exist, EFS creates it -// with these settings when a client connects to the access point. When specifying -// CreationInfo, you must include values for all properties. -// -// Amazon EFS creates a root directory only if you have provided the CreationInfo: -// OwnUid, OwnGID, and permissions for the directory. If you do not provide -// this information, Amazon EFS does not create the root directory. If the root -// directory does not exist, attempts to mount using the access point will fail. -// -// If you do not provide CreationInfo and the specified RootDirectory does not -// exist, attempts to mount the file system using the access point will fail. -type CreationInfo struct { - _ struct{} `type:"structure"` - - // Specifies the POSIX group ID to apply to the RootDirectory. Accepts values - // from 0 to 2^32 (4294967295). - // - // OwnerGid is a required field - OwnerGid *int64 `type:"long" required:"true"` - - // Specifies the POSIX user ID to apply to the RootDirectory. Accepts values - // from 0 to 2^32 (4294967295). - // - // OwnerUid is a required field - OwnerUid *int64 `type:"long" required:"true"` - - // Specifies the POSIX permissions to apply to the RootDirectory, in the format - // of an octal number representing the file's mode bits. - // - // Permissions is a required field - Permissions *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreationInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s CreationInfo) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreationInfo) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreationInfo"} - if s.OwnerGid == nil { - invalidParams.Add(request.NewErrParamRequired("OwnerGid")) - } - if s.OwnerUid == nil { - invalidParams.Add(request.NewErrParamRequired("OwnerUid")) - } - if s.Permissions == nil { - invalidParams.Add(request.NewErrParamRequired("Permissions")) - } - if s.Permissions != nil && len(*s.Permissions) < 3 { - invalidParams.Add(request.NewErrParamMinLen("Permissions", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetOwnerGid sets the OwnerGid field's value. -func (s *CreationInfo) SetOwnerGid(v int64) *CreationInfo { - s.OwnerGid = &v - return s -} - -// SetOwnerUid sets the OwnerUid field's value. -func (s *CreationInfo) SetOwnerUid(v int64) *CreationInfo { - s.OwnerUid = &v - return s -} - -// SetPermissions sets the Permissions field's value. -func (s *CreationInfo) SetPermissions(v string) *CreationInfo { - s.Permissions = &v - return s -} - -type DeleteAccessPointInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // The ID of the access point that you want to delete. - // - // AccessPointId is a required field - AccessPointId *string `location:"uri" locationName:"AccessPointId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessPointInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessPointInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteAccessPointInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteAccessPointInput"} - if s.AccessPointId == nil { - invalidParams.Add(request.NewErrParamRequired("AccessPointId")) - } - if s.AccessPointId != nil && len(*s.AccessPointId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AccessPointId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessPointId sets the AccessPointId field's value. -func (s *DeleteAccessPointInput) SetAccessPointId(v string) *DeleteAccessPointInput { - s.AccessPointId = &v - return s -} - -type DeleteAccessPointOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessPointOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteAccessPointOutput) GoString() string { - return s.String() -} - -type DeleteFileSystemInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // The ID of the file system you want to delete. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFileSystemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFileSystemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFileSystemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DeleteFileSystemInput) SetFileSystemId(v string) *DeleteFileSystemInput { - s.FileSystemId = &v - return s -} - -type DeleteFileSystemOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFileSystemOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFileSystemOutput) GoString() string { - return s.String() -} - -type DeleteFileSystemPolicyInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // Specifies the EFS file system for which to delete the FileSystemPolicy. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFileSystemPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFileSystemPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteFileSystemPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteFileSystemPolicyInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DeleteFileSystemPolicyInput) SetFileSystemId(v string) *DeleteFileSystemPolicyInput { - s.FileSystemId = &v - return s -} - -type DeleteFileSystemPolicyOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFileSystemPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteFileSystemPolicyOutput) GoString() string { - return s.String() -} - -type DeleteMountTargetInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // The ID of the mount target to delete (String). - // - // MountTargetId is a required field - MountTargetId *string `location:"uri" locationName:"MountTargetId" min:"13" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteMountTargetInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteMountTargetInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteMountTargetInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteMountTargetInput"} - if s.MountTargetId == nil { - invalidParams.Add(request.NewErrParamRequired("MountTargetId")) - } - if s.MountTargetId != nil && len(*s.MountTargetId) < 13 { - invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 13)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *DeleteMountTargetInput) SetMountTargetId(v string) *DeleteMountTargetInput { - s.MountTargetId = &v - return s -} - -type DeleteMountTargetOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteMountTargetOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteMountTargetOutput) GoString() string { - return s.String() -} - -type DeleteReplicationConfigurationInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // The ID of the source file system in the replication configuration. - // - // SourceFileSystemId is a required field - SourceFileSystemId *string `location:"uri" locationName:"SourceFileSystemId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteReplicationConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteReplicationConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteReplicationConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteReplicationConfigurationInput"} - if s.SourceFileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("SourceFileSystemId")) - } - if s.SourceFileSystemId != nil && len(*s.SourceFileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("SourceFileSystemId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetSourceFileSystemId sets the SourceFileSystemId field's value. -func (s *DeleteReplicationConfigurationInput) SetSourceFileSystemId(v string) *DeleteReplicationConfigurationInput { - s.SourceFileSystemId = &v - return s -} - -type DeleteReplicationConfigurationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteReplicationConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteReplicationConfigurationOutput) GoString() string { - return s.String() -} - -type DeleteTagsInput struct { - _ struct{} `type:"structure"` - - // The ID of the file system whose tags you want to delete (String). - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // A list of tag keys to delete. - // - // TagKeys is a required field - TagKeys []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTagsInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.TagKeys != nil && len(s.TagKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DeleteTagsInput) SetFileSystemId(v string) *DeleteTagsInput { - s.FileSystemId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *DeleteTagsInput) SetTagKeys(v []*string) *DeleteTagsInput { - s.TagKeys = v - return s -} - -type DeleteTagsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DeleteTagsOutput) GoString() string { - return s.String() -} - -// The service timed out trying to fulfill the request, and the client should -// try the call again. -type DependencyTimeout struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DependencyTimeout) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DependencyTimeout) GoString() string { - return s.String() -} - -func newErrorDependencyTimeout(v protocol.ResponseMetadata) error { - return &DependencyTimeout{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *DependencyTimeout) Code() string { - return "DependencyTimeout" -} - -// Message returns the exception's message. -func (s *DependencyTimeout) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *DependencyTimeout) OrigErr() error { - return nil -} - -func (s *DependencyTimeout) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *DependencyTimeout) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *DependencyTimeout) RequestID() string { - return s.RespMetadata.RequestID -} - -type DescribeAccessPointsInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // (Optional) Specifies an EFS access point to describe in the response; mutually - // exclusive with FileSystemId. - AccessPointId *string `location:"querystring" locationName:"AccessPointId" type:"string"` - - // (Optional) If you provide a FileSystemId, EFS returns all access points for - // that file system; mutually exclusive with AccessPointId. - FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"` - - // (Optional) When retrieving all access points for a file system, you can optionally - // specify the MaxItems parameter to limit the number of objects returned in - // a response. The default value is 100. - MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` - - // NextToken is present if the response is paginated. You can use NextMarker - // in the subsequent request to fetch the next page of access point descriptions. - NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeAccessPointsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeAccessPointsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccessPointsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccessPointsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessPointId sets the AccessPointId field's value. -func (s *DescribeAccessPointsInput) SetAccessPointId(v string) *DescribeAccessPointsInput { - s.AccessPointId = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeAccessPointsInput) SetFileSystemId(v string) *DescribeAccessPointsInput { - s.FileSystemId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeAccessPointsInput) SetMaxResults(v int64) *DescribeAccessPointsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAccessPointsInput) SetNextToken(v string) *DescribeAccessPointsInput { - s.NextToken = &v - return s -} - -type DescribeAccessPointsOutput struct { - _ struct{} `type:"structure"` - - // An array of access point descriptions. - AccessPoints []*AccessPointDescription `type:"list"` - - // Present if there are more access points than returned in the response. You - // can use the NextMarker in the subsequent request to fetch the additional - // descriptions. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeAccessPointsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeAccessPointsOutput) GoString() string { - return s.String() -} - -// SetAccessPoints sets the AccessPoints field's value. -func (s *DescribeAccessPointsOutput) SetAccessPoints(v []*AccessPointDescription) *DescribeAccessPointsOutput { - s.AccessPoints = v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAccessPointsOutput) SetNextToken(v string) *DescribeAccessPointsOutput { - s.NextToken = &v - return s -} - -type DescribeAccountPreferencesInput struct { - _ struct{} `type:"structure"` - - // (Optional) When retrieving account preferences, you can optionally specify - // the MaxItems parameter to limit the number of objects returned in a response. - // The default value is 100. - MaxResults *int64 `min:"1" type:"integer"` - - // (Optional) You can use NextToken in a subsequent request to fetch the next - // page of Amazon Web Services account preferences if the response payload was - // paginated. - NextToken *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeAccountPreferencesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeAccountPreferencesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountPreferencesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountPreferencesInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeAccountPreferencesInput) SetMaxResults(v int64) *DescribeAccountPreferencesInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAccountPreferencesInput) SetNextToken(v string) *DescribeAccountPreferencesInput { - s.NextToken = &v - return s -} - -type DescribeAccountPreferencesOutput struct { - _ struct{} `type:"structure"` - - // Present if there are more records than returned in the response. You can - // use the NextToken in the subsequent request to fetch the additional descriptions. - NextToken *string `min:"1" type:"string"` - - // Describes the resource ID preference setting for the Amazon Web Services - // account associated with the user making the request, in the current Amazon - // Web Services Region. - ResourceIdPreference *ResourceIdPreference `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeAccountPreferencesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeAccountPreferencesOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeAccountPreferencesOutput) SetNextToken(v string) *DescribeAccountPreferencesOutput { - s.NextToken = &v - return s -} - -// SetResourceIdPreference sets the ResourceIdPreference field's value. -func (s *DescribeAccountPreferencesOutput) SetResourceIdPreference(v *ResourceIdPreference) *DescribeAccountPreferencesOutput { - s.ResourceIdPreference = v - return s -} - -type DescribeBackupPolicyInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // Specifies which EFS file system for which to retrieve the BackupPolicy. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeBackupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeBackupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeBackupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeBackupPolicyInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeBackupPolicyInput) SetFileSystemId(v string) *DescribeBackupPolicyInput { - s.FileSystemId = &v - return s -} - -type DescribeBackupPolicyOutput struct { - _ struct{} `type:"structure"` - - // Describes the file system's backup policy, indicating whether automatic backups - // are turned on or off. - BackupPolicy *BackupPolicy `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeBackupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeBackupPolicyOutput) GoString() string { - return s.String() -} - -// SetBackupPolicy sets the BackupPolicy field's value. -func (s *DescribeBackupPolicyOutput) SetBackupPolicy(v *BackupPolicy) *DescribeBackupPolicyOutput { - s.BackupPolicy = v - return s -} - -type DescribeFileSystemPolicyInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // Specifies which EFS file system to retrieve the FileSystemPolicy for. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFileSystemPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFileSystemPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFileSystemPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemPolicyInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeFileSystemPolicyInput) SetFileSystemId(v string) *DescribeFileSystemPolicyInput { - s.FileSystemId = &v - return s -} - -type DescribeFileSystemPolicyOutput struct { - _ struct{} `type:"structure"` - - // Specifies the EFS file system to which the FileSystemPolicy applies. - FileSystemId *string `type:"string"` - - // The JSON formatted FileSystemPolicy for the EFS file system. - Policy *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFileSystemPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFileSystemPolicyOutput) GoString() string { - return s.String() -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeFileSystemPolicyOutput) SetFileSystemId(v string) *DescribeFileSystemPolicyOutput { - s.FileSystemId = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *DescribeFileSystemPolicyOutput) SetPolicy(v string) *DescribeFileSystemPolicyOutput { - s.Policy = &v - return s -} - -type DescribeFileSystemsInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // (Optional) Restricts the list to the file system with this creation token - // (String). You specify a creation token when you create an Amazon EFS file - // system. - CreationToken *string `location:"querystring" locationName:"CreationToken" min:"1" type:"string"` - - // (Optional) ID of the file system whose description you want to retrieve (String). - FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"` - - // (Optional) Opaque pagination token returned from a previous DescribeFileSystems - // operation (String). If present, specifies to continue the list from where - // the returning call had left off. - Marker *string `location:"querystring" locationName:"Marker" min:"1" type:"string"` - - // (Optional) Specifies the maximum number of file systems to return in the - // response (integer). This number is automatically set to 100. The response - // is paginated at 100 per page if you have more than 100 file systems. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFileSystemsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFileSystemsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeFileSystemsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeFileSystemsInput"} - if s.CreationToken != nil && len(*s.CreationToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("CreationToken", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationToken sets the CreationToken field's value. -func (s *DescribeFileSystemsInput) SetCreationToken(v string) *DescribeFileSystemsInput { - s.CreationToken = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeFileSystemsInput) SetFileSystemId(v string) *DescribeFileSystemsInput { - s.FileSystemId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeFileSystemsInput) SetMarker(v string) *DescribeFileSystemsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DescribeFileSystemsInput) SetMaxItems(v int64) *DescribeFileSystemsInput { - s.MaxItems = &v - return s -} - -type DescribeFileSystemsOutput struct { - _ struct{} `type:"structure"` - - // An array of file system descriptions. - FileSystems []*FileSystemDescription `type:"list"` - - // Present if provided by caller in the request (String). - Marker *string `min:"1" type:"string"` - - // Present if there are more file systems than returned in the response (String). - // You can use the NextMarker in the subsequent request to fetch the descriptions. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFileSystemsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeFileSystemsOutput) GoString() string { - return s.String() -} - -// SetFileSystems sets the FileSystems field's value. -func (s *DescribeFileSystemsOutput) SetFileSystems(v []*FileSystemDescription) *DescribeFileSystemsOutput { - s.FileSystems = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeFileSystemsOutput) SetMarker(v string) *DescribeFileSystemsOutput { - s.Marker = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeFileSystemsOutput) SetNextMarker(v string) *DescribeFileSystemsOutput { - s.NextMarker = &v - return s -} - -type DescribeLifecycleConfigurationInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // The ID of the file system whose LifecycleConfiguration object you want to - // retrieve (String). - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeLifecycleConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeLifecycleConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLifecycleConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLifecycleConfigurationInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeLifecycleConfigurationInput) SetFileSystemId(v string) *DescribeLifecycleConfigurationInput { - s.FileSystemId = &v - return s -} - -type DescribeLifecycleConfigurationOutput struct { - _ struct{} `type:"structure"` - - // An array of lifecycle management policies. EFS supports a maximum of one - // policy per file system. - LifecyclePolicies []*LifecyclePolicy `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeLifecycleConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeLifecycleConfigurationOutput) GoString() string { - return s.String() -} - -// SetLifecyclePolicies sets the LifecyclePolicies field's value. -func (s *DescribeLifecycleConfigurationOutput) SetLifecyclePolicies(v []*LifecyclePolicy) *DescribeLifecycleConfigurationOutput { - s.LifecyclePolicies = v - return s -} - -type DescribeMountTargetSecurityGroupsInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // The ID of the mount target whose security groups you want to retrieve. - // - // MountTargetId is a required field - MountTargetId *string `location:"uri" locationName:"MountTargetId" min:"13" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeMountTargetSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeMountTargetSecurityGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMountTargetSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetSecurityGroupsInput"} - if s.MountTargetId == nil { - invalidParams.Add(request.NewErrParamRequired("MountTargetId")) - } - if s.MountTargetId != nil && len(*s.MountTargetId) < 13 { - invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 13)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *DescribeMountTargetSecurityGroupsInput) SetMountTargetId(v string) *DescribeMountTargetSecurityGroupsInput { - s.MountTargetId = &v - return s -} - -type DescribeMountTargetSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // An array of security groups. - // - // SecurityGroups is a required field - SecurityGroups []*string `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeMountTargetSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeMountTargetSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *DescribeMountTargetSecurityGroupsOutput) SetSecurityGroups(v []*string) *DescribeMountTargetSecurityGroupsOutput { - s.SecurityGroups = v - return s -} - -type DescribeMountTargetsInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // (Optional) The ID of the access point whose mount targets that you want to - // list. It must be included in your request if a FileSystemId or MountTargetId - // is not included in your request. Accepts either an access point ID or ARN - // as input. - AccessPointId *string `location:"querystring" locationName:"AccessPointId" type:"string"` - - // (Optional) ID of the file system whose mount targets you want to list (String). - // It must be included in your request if an AccessPointId or MountTargetId - // is not included. Accepts either a file system ID or ARN as input. - FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"` - - // (Optional) Opaque pagination token returned from a previous DescribeMountTargets - // operation (String). If present, it specifies to continue the list from where - // the previous returning call left off. - Marker *string `location:"querystring" locationName:"Marker" min:"1" type:"string"` - - // (Optional) Maximum number of mount targets to return in the response. Currently, - // this number is automatically set to 10, and other values are ignored. The - // response is paginated at 100 per page if you have more than 100 mount targets. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` - - // (Optional) ID of the mount target that you want to have described (String). - // It must be included in your request if FileSystemId is not included. Accepts - // either a mount target ID or ARN as input. - MountTargetId *string `location:"querystring" locationName:"MountTargetId" min:"13" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeMountTargetsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeMountTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeMountTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeMountTargetsInput"} - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - if s.MountTargetId != nil && len(*s.MountTargetId) < 13 { - invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 13)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessPointId sets the AccessPointId field's value. -func (s *DescribeMountTargetsInput) SetAccessPointId(v string) *DescribeMountTargetsInput { - s.AccessPointId = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeMountTargetsInput) SetFileSystemId(v string) *DescribeMountTargetsInput { - s.FileSystemId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeMountTargetsInput) SetMarker(v string) *DescribeMountTargetsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DescribeMountTargetsInput) SetMaxItems(v int64) *DescribeMountTargetsInput { - s.MaxItems = &v - return s -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *DescribeMountTargetsInput) SetMountTargetId(v string) *DescribeMountTargetsInput { - s.MountTargetId = &v - return s -} - -type DescribeMountTargetsOutput struct { - _ struct{} `type:"structure"` - - // If the request included the Marker, the response returns that value in this - // field. - Marker *string `min:"1" type:"string"` - - // Returns the file system's mount targets as an array of MountTargetDescription - // objects. - MountTargets []*MountTargetDescription `type:"list"` - - // If a value is present, there are more mount targets to return. In a subsequent - // request, you can provide Marker in your request with this value to retrieve - // the next set of mount targets. - NextMarker *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeMountTargetsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeMountTargetsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeMountTargetsOutput) SetMarker(v string) *DescribeMountTargetsOutput { - s.Marker = &v - return s -} - -// SetMountTargets sets the MountTargets field's value. -func (s *DescribeMountTargetsOutput) SetMountTargets(v []*MountTargetDescription) *DescribeMountTargetsOutput { - s.MountTargets = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeMountTargetsOutput) SetNextMarker(v string) *DescribeMountTargetsOutput { - s.NextMarker = &v - return s -} - -type DescribeReplicationConfigurationsInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // You can retrieve the replication configuration for a specific file system - // by providing its file system ID. - FileSystemId *string `location:"querystring" locationName:"FileSystemId" type:"string"` - - // (Optional) To limit the number of objects returned in a response, you can - // specify the MaxItems parameter. The default value is 100. - MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` - - // NextToken is present if the response is paginated. You can use NextToken - // in a subsequent request to fetch the next page of output. - NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeReplicationConfigurationsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeReplicationConfigurationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeReplicationConfigurationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeReplicationConfigurationsInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeReplicationConfigurationsInput) SetFileSystemId(v string) *DescribeReplicationConfigurationsInput { - s.FileSystemId = &v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *DescribeReplicationConfigurationsInput) SetMaxResults(v int64) *DescribeReplicationConfigurationsInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReplicationConfigurationsInput) SetNextToken(v string) *DescribeReplicationConfigurationsInput { - s.NextToken = &v - return s -} - -type DescribeReplicationConfigurationsOutput struct { - _ struct{} `type:"structure"` - - // You can use the NextToken from the previous response in a subsequent request - // to fetch the additional descriptions. - NextToken *string `min:"1" type:"string"` - - // The collection of replication configurations that is returned. - Replications []*ReplicationConfigurationDescription `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeReplicationConfigurationsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeReplicationConfigurationsOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *DescribeReplicationConfigurationsOutput) SetNextToken(v string) *DescribeReplicationConfigurationsOutput { - s.NextToken = &v - return s -} - -// SetReplications sets the Replications field's value. -func (s *DescribeReplicationConfigurationsOutput) SetReplications(v []*ReplicationConfigurationDescription) *DescribeReplicationConfigurationsOutput { - s.Replications = v - return s -} - -type DescribeTagsInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // The ID of the file system whose tag set you want to retrieve. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // (Optional) An opaque pagination token returned from a previous DescribeTags - // operation (String). If present, it specifies to continue the list from where - // the previous call left off. - Marker *string `location:"querystring" locationName:"Marker" min:"1" type:"string"` - - // (Optional) The maximum number of file system tags to return in the response. - // Currently, this number is automatically set to 100, and other values are - // ignored. The response is paginated at 100 per page if you have more than - // 100 tags. - MaxItems *int64 `location:"querystring" locationName:"MaxItems" min:"1" type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeTagsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTagsInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.Marker != nil && len(*s.Marker) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Marker", 1)) - } - if s.MaxItems != nil && *s.MaxItems < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxItems", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DescribeTagsInput) SetFileSystemId(v string) *DescribeTagsInput { - s.FileSystemId = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTagsInput) SetMarker(v string) *DescribeTagsInput { - s.Marker = &v - return s -} - -// SetMaxItems sets the MaxItems field's value. -func (s *DescribeTagsInput) SetMaxItems(v int64) *DescribeTagsInput { - s.MaxItems = &v - return s -} - -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // If the request included a Marker, the response returns that value in this - // field. - Marker *string `min:"1" type:"string"` - - // If a value is present, there are more tags to return. In a subsequent request, - // you can provide the value of NextMarker as the value of the Marker parameter - // in your next request to retrieve the next set of tags. - NextMarker *string `min:"1" type:"string"` - - // Returns tags associated with the file system as an array of Tag objects. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeTagsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeTagsOutput) GoString() string { - return s.String() -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTagsOutput) SetMarker(v string) *DescribeTagsOutput { - s.Marker = &v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeTagsOutput) SetNextMarker(v string) *DescribeTagsOutput { - s.NextMarker = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *DescribeTagsOutput) SetTags(v []*Tag) *DescribeTagsOutput { - s.Tags = v - return s -} - -// Describes the destination file system in the replication configuration. -type Destination struct { - _ struct{} `type:"structure"` - - // The ID of the destination Amazon EFS file system. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // The time when the most recent sync was successfully completed on the destination - // file system. Any changes to data on the source file system that occurred - // before this time have been successfully replicated to the destination file - // system. Any changes that occurred after this time might not be fully replicated. - LastReplicatedTimestamp *time.Time `type:"timestamp"` - - // The Amazon Web Services Region in which the destination file system is located. - // - // Region is a required field - Region *string `min:"1" type:"string" required:"true"` - - // Describes the status of the destination EFS file system. - // - // * The Paused state occurs as a result of opting out of the source or destination - // Region after the replication configuration was created. To resume replication - // for the file system, you need to again opt in to the Amazon Web Services - // Region. For more information, see Managing Amazon Web Services Regions - // (https://docs.aws.amazon.com/general/latest/gr/rande-manage.html#rande-manage-enable) - // in the Amazon Web Services General Reference Guide. - // - // * The Error state occurs when either the source or the destination file - // system (or both) is in a failed state and is unrecoverable. For more information, - // see Monitoring replication status (https://docs.aws.amazon.com/efs/latest/ug/awsbackup.html#restoring-backup-efsmonitoring-replication-status.html) - // in the Amazon EFS User Guide. You must delete the replication configuration, - // and then restore the most recent backup of the failed file system (either - // the source or the destination) to a new file system. - // - // Status is a required field - Status *string `type:"string" required:"true" enum:"ReplicationStatus"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Destination) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Destination) GoString() string { - return s.String() -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *Destination) SetFileSystemId(v string) *Destination { - s.FileSystemId = &v - return s -} - -// SetLastReplicatedTimestamp sets the LastReplicatedTimestamp field's value. -func (s *Destination) SetLastReplicatedTimestamp(v time.Time) *Destination { - s.LastReplicatedTimestamp = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Destination) SetRegion(v string) *Destination { - s.Region = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *Destination) SetStatus(v string) *Destination { - s.Status = &v - return s -} - -// Describes the new or existing destination file system for the replication -// configuration. -type DestinationToCreate struct { - _ struct{} `type:"structure"` - - // To create a file system that uses One Zone storage, specify the name of the - // Availability Zone in which to create the destination file system. - AvailabilityZoneName *string `min:"1" type:"string"` - - // The ID of the file system to use for the destination. The file system's replication - // overwrite replication must be disabled. If you do not provide an ID, then - // EFS creates a new file system for the replication destination. - FileSystemId *string `type:"string"` - - // Specify the Key Management Service (KMS) key that you want to use to encrypt - // the destination file system. If you do not specify a KMS key, Amazon EFS - // uses your default KMS key for Amazon EFS, /aws/elasticfilesystem. This ID - // can be in one of the following formats: - // - // * Key ID - The unique identifier of the key, for example 1234abcd-12ab-34cd-56ef-1234567890ab. - // - // * ARN - The Amazon Resource Name (ARN) for the key, for example arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab. - // - // * Key alias - A previously created display name for a key, for example - // alias/projectKey1. - // - // * Key alias ARN - The ARN for a key alias, for example arn:aws:kms:us-west-2:444455556666:alias/projectKey1. - KmsKeyId *string `type:"string"` - - // To create a file system that uses Regional storage, specify the Amazon Web - // Services Region in which to create the destination file system. - Region *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DestinationToCreate) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DestinationToCreate) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DestinationToCreate) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DestinationToCreate"} - if s.AvailabilityZoneName != nil && len(*s.AvailabilityZoneName) < 1 { - invalidParams.Add(request.NewErrParamMinLen("AvailabilityZoneName", 1)) - } - if s.Region != nil && len(*s.Region) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Region", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZoneName sets the AvailabilityZoneName field's value. -func (s *DestinationToCreate) SetAvailabilityZoneName(v string) *DestinationToCreate { - s.AvailabilityZoneName = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *DestinationToCreate) SetFileSystemId(v string) *DestinationToCreate { - s.FileSystemId = &v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *DestinationToCreate) SetKmsKeyId(v string) *DestinationToCreate { - s.KmsKeyId = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *DestinationToCreate) SetRegion(v string) *DestinationToCreate { - s.Region = &v - return s -} - -// Returned if the file system you are trying to create already exists, with -// the creation token you provided. -type FileSystemAlreadyExists struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemAlreadyExists) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemAlreadyExists) GoString() string { - return s.String() -} - -func newErrorFileSystemAlreadyExists(v protocol.ResponseMetadata) error { - return &FileSystemAlreadyExists{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *FileSystemAlreadyExists) Code() string { - return "FileSystemAlreadyExists" -} - -// Message returns the exception's message. -func (s *FileSystemAlreadyExists) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *FileSystemAlreadyExists) OrigErr() error { - return nil -} - -func (s *FileSystemAlreadyExists) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *FileSystemAlreadyExists) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *FileSystemAlreadyExists) RequestID() string { - return s.RespMetadata.RequestID -} - -// A description of the file system. -type FileSystemDescription struct { - _ struct{} `type:"structure"` - - // The unique and consistent identifier of the Availability Zone in which the - // file system is located, and is valid only for One Zone file systems. For - // example, use1-az1 is an Availability Zone ID for the us-east-1 Amazon Web - // Services Region, and it has the same location in every Amazon Web Services - // account. - AvailabilityZoneId *string `type:"string"` - - // Describes the Amazon Web Services Availability Zone in which the file system - // is located, and is valid only for One Zone file systems. For more information, - // see Using EFS storage classes (https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html) - // in the Amazon EFS User Guide. - AvailabilityZoneName *string `min:"1" type:"string"` - - // The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The opaque string specified in the request. - // - // CreationToken is a required field - CreationToken *string `min:"1" type:"string" required:"true"` - - // A Boolean value that, if true, indicates that the file system is encrypted. - Encrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) for the EFS file system, in the format arn:aws:elasticfilesystem:region:account-id:file-system/file-system-id - // . Example with sample data: arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567 - FileSystemArn *string `type:"string"` - - // The ID of the file system, assigned by Amazon EFS. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // Describes the protection on the file system. - FileSystemProtection *FileSystemProtectionDescription `type:"structure"` - - // The ID of an KMS key used to protect the encrypted file system. - KmsKeyId *string `type:"string"` - - // The lifecycle phase of the file system. - // - // LifeCycleState is a required field - LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` - - // You can add tags to a file system, including a Name tag. For more information, - // see CreateFileSystem. If the file system has a Name tag, Amazon EFS returns - // the value in this field. - Name *string `type:"string"` - - // The current number of mount targets that the file system has. For more information, - // see CreateMountTarget. - // - // NumberOfMountTargets is a required field - NumberOfMountTargets *int64 `type:"integer" required:"true"` - - // The Amazon Web Services account that created the file system. - // - // OwnerId is a required field - OwnerId *string `type:"string" required:"true"` - - // The Performance mode of the file system. - // - // PerformanceMode is a required field - PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"` - - // The amount of provisioned throughput, measured in MiBps, for the file system. - // Valid for file systems using ThroughputMode set to provisioned. - ProvisionedThroughputInMibps *float64 `min:"1" type:"double"` - - // The latest known metered size (in bytes) of data stored in the file system, - // in its Value field, and the time at which that size was determined in its - // Timestamp field. The Timestamp value is the integer number of seconds since - // 1970-01-01T00:00:00Z. The SizeInBytes value doesn't represent the size of - // a consistent snapshot of the file system, but it is eventually consistent - // when there are no writes to the file system. That is, SizeInBytes represents - // actual size only if the file system is not modified for a period longer than - // a couple of hours. Otherwise, the value is not the exact size that the file - // system was at any point in time. - // - // SizeInBytes is a required field - SizeInBytes *FileSystemSize `type:"structure" required:"true"` - - // The tags associated with the file system, presented as an array of Tag objects. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` - - // Displays the file system's throughput mode. For more information, see Throughput - // modes (https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes) - // in the Amazon EFS User Guide. - ThroughputMode *string `type:"string" enum:"ThroughputMode"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemDescription) GoString() string { - return s.String() -} - -// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. -func (s *FileSystemDescription) SetAvailabilityZoneId(v string) *FileSystemDescription { - s.AvailabilityZoneId = &v - return s -} - -// SetAvailabilityZoneName sets the AvailabilityZoneName field's value. -func (s *FileSystemDescription) SetAvailabilityZoneName(v string) *FileSystemDescription { - s.AvailabilityZoneName = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *FileSystemDescription) SetCreationTime(v time.Time) *FileSystemDescription { - s.CreationTime = &v - return s -} - -// SetCreationToken sets the CreationToken field's value. -func (s *FileSystemDescription) SetCreationToken(v string) *FileSystemDescription { - s.CreationToken = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *FileSystemDescription) SetEncrypted(v bool) *FileSystemDescription { - s.Encrypted = &v - return s -} - -// SetFileSystemArn sets the FileSystemArn field's value. -func (s *FileSystemDescription) SetFileSystemArn(v string) *FileSystemDescription { - s.FileSystemArn = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *FileSystemDescription) SetFileSystemId(v string) *FileSystemDescription { - s.FileSystemId = &v - return s -} - -// SetFileSystemProtection sets the FileSystemProtection field's value. -func (s *FileSystemDescription) SetFileSystemProtection(v *FileSystemProtectionDescription) *FileSystemDescription { - s.FileSystemProtection = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *FileSystemDescription) SetKmsKeyId(v string) *FileSystemDescription { - s.KmsKeyId = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *FileSystemDescription) SetLifeCycleState(v string) *FileSystemDescription { - s.LifeCycleState = &v - return s -} - -// SetName sets the Name field's value. -func (s *FileSystemDescription) SetName(v string) *FileSystemDescription { - s.Name = &v - return s -} - -// SetNumberOfMountTargets sets the NumberOfMountTargets field's value. -func (s *FileSystemDescription) SetNumberOfMountTargets(v int64) *FileSystemDescription { - s.NumberOfMountTargets = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *FileSystemDescription) SetOwnerId(v string) *FileSystemDescription { - s.OwnerId = &v - return s -} - -// SetPerformanceMode sets the PerformanceMode field's value. -func (s *FileSystemDescription) SetPerformanceMode(v string) *FileSystemDescription { - s.PerformanceMode = &v - return s -} - -// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. -func (s *FileSystemDescription) SetProvisionedThroughputInMibps(v float64) *FileSystemDescription { - s.ProvisionedThroughputInMibps = &v - return s -} - -// SetSizeInBytes sets the SizeInBytes field's value. -func (s *FileSystemDescription) SetSizeInBytes(v *FileSystemSize) *FileSystemDescription { - s.SizeInBytes = v - return s -} - -// SetTags sets the Tags field's value. -func (s *FileSystemDescription) SetTags(v []*Tag) *FileSystemDescription { - s.Tags = v - return s -} - -// SetThroughputMode sets the ThroughputMode field's value. -func (s *FileSystemDescription) SetThroughputMode(v string) *FileSystemDescription { - s.ThroughputMode = &v - return s -} - -// Returned if a file system has mount targets. -type FileSystemInUse struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemInUse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemInUse) GoString() string { - return s.String() -} - -func newErrorFileSystemInUse(v protocol.ResponseMetadata) error { - return &FileSystemInUse{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *FileSystemInUse) Code() string { - return "FileSystemInUse" -} - -// Message returns the exception's message. -func (s *FileSystemInUse) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *FileSystemInUse) OrigErr() error { - return nil -} - -func (s *FileSystemInUse) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *FileSystemInUse) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *FileSystemInUse) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the Amazon Web Services account has already created the maximum -// number of file systems allowed per account. -type FileSystemLimitExceeded struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemLimitExceeded) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemLimitExceeded) GoString() string { - return s.String() -} - -func newErrorFileSystemLimitExceeded(v protocol.ResponseMetadata) error { - return &FileSystemLimitExceeded{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *FileSystemLimitExceeded) Code() string { - return "FileSystemLimitExceeded" -} - -// Message returns the exception's message. -func (s *FileSystemLimitExceeded) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *FileSystemLimitExceeded) OrigErr() error { - return nil -} - -func (s *FileSystemLimitExceeded) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *FileSystemLimitExceeded) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *FileSystemLimitExceeded) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the specified FileSystemId value doesn't exist in the requester's -// Amazon Web Services account. -type FileSystemNotFound struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemNotFound) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemNotFound) GoString() string { - return s.String() -} - -func newErrorFileSystemNotFound(v protocol.ResponseMetadata) error { - return &FileSystemNotFound{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *FileSystemNotFound) Code() string { - return "FileSystemNotFound" -} - -// Message returns the exception's message. -func (s *FileSystemNotFound) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *FileSystemNotFound) OrigErr() error { - return nil -} - -func (s *FileSystemNotFound) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *FileSystemNotFound) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *FileSystemNotFound) RequestID() string { - return s.RespMetadata.RequestID -} - -// Describes the protection on a file system. -type FileSystemProtectionDescription struct { - _ struct{} `type:"structure"` - - // The status of the file system's replication overwrite protection. - // - // * ENABLED – The file system cannot be used as the destination file system - // in a replication configuration. The file system is writeable. Replication - // overwrite protection is ENABLED by default. - // - // * DISABLED – The file system can be used as the destination file system - // in a replication configuration. The file system is read-only and can only - // be modified by EFS replication. - // - // * REPLICATING – The file system is being used as the destination file - // system in a replication configuration. The file system is read-only and - // is only modified only by EFS replication. - // - // If the replication configuration is deleted, the file system's replication - // overwrite protection is re-enabled, the file system becomes writeable. - ReplicationOverwriteProtection *string `type:"string" enum:"ReplicationOverwriteProtection"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemProtectionDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemProtectionDescription) GoString() string { - return s.String() -} - -// SetReplicationOverwriteProtection sets the ReplicationOverwriteProtection field's value. -func (s *FileSystemProtectionDescription) SetReplicationOverwriteProtection(v string) *FileSystemProtectionDescription { - s.ReplicationOverwriteProtection = &v - return s -} - -// The latest known metered size (in bytes) of data stored in the file system, -// in its Value field, and the time at which that size was determined in its -// Timestamp field. The value doesn't represent the size of a consistent snapshot -// of the file system, but it is eventually consistent when there are no writes -// to the file system. That is, the value represents the actual size only if -// the file system is not modified for a period longer than a couple of hours. -// Otherwise, the value is not necessarily the exact size the file system was -// at any instant in time. -type FileSystemSize struct { - _ struct{} `type:"structure"` - - // The time at which the size of data, returned in the Value field, was determined. - // The value is the integer number of seconds since 1970-01-01T00:00:00Z. - Timestamp *time.Time `type:"timestamp"` - - // The latest known metered size (in bytes) of data stored in the file system. - // - // Value is a required field - Value *int64 `type:"long" required:"true"` - - // The latest known metered size (in bytes) of data stored in the Archive storage - // class. - ValueInArchive *int64 `type:"long"` - - // The latest known metered size (in bytes) of data stored in the Infrequent - // Access storage class. - ValueInIA *int64 `type:"long"` - - // The latest known metered size (in bytes) of data stored in the Standard storage - // class. - ValueInStandard *int64 `type:"long"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemSize) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FileSystemSize) GoString() string { - return s.String() -} - -// SetTimestamp sets the Timestamp field's value. -func (s *FileSystemSize) SetTimestamp(v time.Time) *FileSystemSize { - s.Timestamp = &v - return s -} - -// SetValue sets the Value field's value. -func (s *FileSystemSize) SetValue(v int64) *FileSystemSize { - s.Value = &v - return s -} - -// SetValueInArchive sets the ValueInArchive field's value. -func (s *FileSystemSize) SetValueInArchive(v int64) *FileSystemSize { - s.ValueInArchive = &v - return s -} - -// SetValueInIA sets the ValueInIA field's value. -func (s *FileSystemSize) SetValueInIA(v int64) *FileSystemSize { - s.ValueInIA = &v - return s -} - -// SetValueInStandard sets the ValueInStandard field's value. -func (s *FileSystemSize) SetValueInStandard(v int64) *FileSystemSize { - s.ValueInStandard = &v - return s -} - -// Returned if the file system's lifecycle state is not "available". -type IncorrectFileSystemLifeCycleState struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IncorrectFileSystemLifeCycleState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IncorrectFileSystemLifeCycleState) GoString() string { - return s.String() -} - -func newErrorIncorrectFileSystemLifeCycleState(v protocol.ResponseMetadata) error { - return &IncorrectFileSystemLifeCycleState{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *IncorrectFileSystemLifeCycleState) Code() string { - return "IncorrectFileSystemLifeCycleState" -} - -// Message returns the exception's message. -func (s *IncorrectFileSystemLifeCycleState) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *IncorrectFileSystemLifeCycleState) OrigErr() error { - return nil -} - -func (s *IncorrectFileSystemLifeCycleState) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *IncorrectFileSystemLifeCycleState) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *IncorrectFileSystemLifeCycleState) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the mount target is not in the correct state for the operation. -type IncorrectMountTargetState struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IncorrectMountTargetState) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IncorrectMountTargetState) GoString() string { - return s.String() -} - -func newErrorIncorrectMountTargetState(v protocol.ResponseMetadata) error { - return &IncorrectMountTargetState{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *IncorrectMountTargetState) Code() string { - return "IncorrectMountTargetState" -} - -// Message returns the exception's message. -func (s *IncorrectMountTargetState) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *IncorrectMountTargetState) OrigErr() error { - return nil -} - -func (s *IncorrectMountTargetState) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *IncorrectMountTargetState) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *IncorrectMountTargetState) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if there's not enough capacity to provision additional throughput. -// This value might be returned when you try to create a file system in provisioned -// throughput mode, when you attempt to increase the provisioned throughput -// of an existing file system, or when you attempt to change an existing file -// system from Bursting Throughput to Provisioned Throughput mode. Try again -// later. -type InsufficientThroughputCapacity struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InsufficientThroughputCapacity) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InsufficientThroughputCapacity) GoString() string { - return s.String() -} - -func newErrorInsufficientThroughputCapacity(v protocol.ResponseMetadata) error { - return &InsufficientThroughputCapacity{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *InsufficientThroughputCapacity) Code() string { - return "InsufficientThroughputCapacity" -} - -// Message returns the exception's message. -func (s *InsufficientThroughputCapacity) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *InsufficientThroughputCapacity) OrigErr() error { - return nil -} - -func (s *InsufficientThroughputCapacity) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *InsufficientThroughputCapacity) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *InsufficientThroughputCapacity) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if an error occurred on the server side. -type InternalServerError struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InternalServerError) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InternalServerError) GoString() string { - return s.String() -} - -func newErrorInternalServerError(v protocol.ResponseMetadata) error { - return &InternalServerError{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *InternalServerError) Code() string { - return "InternalServerError" -} - -// Message returns the exception's message. -func (s *InternalServerError) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *InternalServerError) OrigErr() error { - return nil -} - -func (s *InternalServerError) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *InternalServerError) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *InternalServerError) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the FileSystemPolicy is malformed or contains an error such as -// a parameter value that is not valid or a missing required parameter. Returned -// in the case of a policy lockout safety check error. -type InvalidPolicyException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - ErrorCode *string `min:"1" type:"string"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InvalidPolicyException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InvalidPolicyException) GoString() string { - return s.String() -} - -func newErrorInvalidPolicyException(v protocol.ResponseMetadata) error { - return &InvalidPolicyException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *InvalidPolicyException) Code() string { - return "InvalidPolicyException" -} - -// Message returns the exception's message. -func (s *InvalidPolicyException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *InvalidPolicyException) OrigErr() error { - return nil -} - -func (s *InvalidPolicyException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *InvalidPolicyException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *InvalidPolicyException) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the request specified an IpAddress that is already in use in -// the subnet. -type IpAddressInUse struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IpAddressInUse) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s IpAddressInUse) GoString() string { - return s.String() -} - -func newErrorIpAddressInUse(v protocol.ResponseMetadata) error { - return &IpAddressInUse{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *IpAddressInUse) Code() string { - return "IpAddressInUse" -} - -// Message returns the exception's message. -func (s *IpAddressInUse) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *IpAddressInUse) OrigErr() error { - return nil -} - -func (s *IpAddressInUse) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *IpAddressInUse) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *IpAddressInUse) RequestID() string { - return s.RespMetadata.RequestID -} - -// Describes a policy used by Lifecycle management that specifies when to transition -// files into and out of storage classes. For more information, see Managing -// file system storage (https://docs.aws.amazon.com/efs/latest/ug/lifecycle-management-efs.html). -// -// When using the put-lifecycle-configuration CLI command or the PutLifecycleConfiguration -// API action, Amazon EFS requires that each LifecyclePolicy object have only -// a single transition. This means that in a request body, LifecyclePolicies -// must be structured as an array of LifecyclePolicy objects, one object for -// each transition. For more information, see the request examples in PutLifecycleConfiguration. -type LifecyclePolicy struct { - _ struct{} `type:"structure"` - - // The number of days after files were last accessed in primary storage (the - // Standard storage class) files at which to move them to Archive storage. Metadata - // operations such as listing the contents of a directory don't count as file - // access events. - TransitionToArchive *string `type:"string" enum:"TransitionToArchiveRules"` - - // The number of days after files were last accessed in primary storage (the - // Standard storage class) at which to move them to Infrequent Access (IA) storage. - // Metadata operations such as listing the contents of a directory don't count - // as file access events. - TransitionToIA *string `type:"string" enum:"TransitionToIARules"` - - // Whether to move files back to primary (Standard) storage after they are accessed - // in IA or Archive storage. Metadata operations such as listing the contents - // of a directory don't count as file access events. - TransitionToPrimaryStorageClass *string `type:"string" enum:"TransitionToPrimaryStorageClassRules"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LifecyclePolicy) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s LifecyclePolicy) GoString() string { - return s.String() -} - -// SetTransitionToArchive sets the TransitionToArchive field's value. -func (s *LifecyclePolicy) SetTransitionToArchive(v string) *LifecyclePolicy { - s.TransitionToArchive = &v - return s -} - -// SetTransitionToIA sets the TransitionToIA field's value. -func (s *LifecyclePolicy) SetTransitionToIA(v string) *LifecyclePolicy { - s.TransitionToIA = &v - return s -} - -// SetTransitionToPrimaryStorageClass sets the TransitionToPrimaryStorageClass field's value. -func (s *LifecyclePolicy) SetTransitionToPrimaryStorageClass(v string) *LifecyclePolicy { - s.TransitionToPrimaryStorageClass = &v - return s -} - -type ListTagsForResourceInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // (Optional) Specifies the maximum number of tag objects to return in the response. - // The default value is 100. - MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` - - // (Optional) You can use NextToken in a subsequent request to fetch the next - // page of access point descriptions if the response payload was paginated. - NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` - - // Specifies the EFS resource you want to retrieve tags for. You can retrieve - // tags for EFS file systems and access points using this API endpoint. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"ResourceId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListTagsForResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListTagsForResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ListTagsForResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.NextToken != nil && len(*s.NextToken) < 1 { - invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) - } - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMaxResults sets the MaxResults field's value. -func (s *ListTagsForResourceInput) SetMaxResults(v int64) *ListTagsForResourceInput { - s.MaxResults = &v - return s -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceInput) SetNextToken(v string) *ListTagsForResourceInput { - s.NextToken = &v - return s -} - -// SetResourceId sets the ResourceId field's value. -func (s *ListTagsForResourceInput) SetResourceId(v string) *ListTagsForResourceInput { - s.ResourceId = &v - return s -} - -type ListTagsForResourceOutput struct { - _ struct{} `type:"structure"` - - // NextToken is present if the response payload is paginated. You can use NextToken - // in a subsequent request to fetch the next page of access point descriptions. - NextToken *string `min:"1" type:"string"` - - // An array of the tags for the specified EFS resource. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListTagsForResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ListTagsForResourceOutput) GoString() string { - return s.String() -} - -// SetNextToken sets the NextToken field's value. -func (s *ListTagsForResourceOutput) SetNextToken(v string) *ListTagsForResourceOutput { - s.NextToken = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ListTagsForResourceOutput) SetTags(v []*Tag) *ListTagsForResourceOutput { - s.Tags = v - return s -} - -type ModifyMountTargetSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // The ID of the mount target whose security groups you want to modify. - // - // MountTargetId is a required field - MountTargetId *string `location:"uri" locationName:"MountTargetId" min:"13" type:"string" required:"true"` - - // An array of up to five VPC security group IDs. - SecurityGroups []*string `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ModifyMountTargetSecurityGroupsInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ModifyMountTargetSecurityGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyMountTargetSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyMountTargetSecurityGroupsInput"} - if s.MountTargetId == nil { - invalidParams.Add(request.NewErrParamRequired("MountTargetId")) - } - if s.MountTargetId != nil && len(*s.MountTargetId) < 13 { - invalidParams.Add(request.NewErrParamMinLen("MountTargetId", 13)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *ModifyMountTargetSecurityGroupsInput) SetMountTargetId(v string) *ModifyMountTargetSecurityGroupsInput { - s.MountTargetId = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *ModifyMountTargetSecurityGroupsInput) SetSecurityGroups(v []*string) *ModifyMountTargetSecurityGroupsInput { - s.SecurityGroups = v - return s -} - -type ModifyMountTargetSecurityGroupsOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ModifyMountTargetSecurityGroupsOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ModifyMountTargetSecurityGroupsOutput) GoString() string { - return s.String() -} - -// Returned if the mount target would violate one of the specified restrictions -// based on the file system's existing mount targets. -type MountTargetConflict struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MountTargetConflict) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MountTargetConflict) GoString() string { - return s.String() -} - -func newErrorMountTargetConflict(v protocol.ResponseMetadata) error { - return &MountTargetConflict{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *MountTargetConflict) Code() string { - return "MountTargetConflict" -} - -// Message returns the exception's message. -func (s *MountTargetConflict) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *MountTargetConflict) OrigErr() error { - return nil -} - -func (s *MountTargetConflict) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *MountTargetConflict) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *MountTargetConflict) RequestID() string { - return s.RespMetadata.RequestID -} - -// Provides a description of a mount target. -type MountTargetDescription struct { - _ struct{} `type:"structure"` - - // The unique and consistent identifier of the Availability Zone that the mount - // target resides in. For example, use1-az1 is an AZ ID for the us-east-1 Region - // and it has the same location in every Amazon Web Services account. - AvailabilityZoneId *string `type:"string"` - - // The name of the Availability Zone in which the mount target is located. Availability - // Zones are independently mapped to names for each Amazon Web Services account. - // For example, the Availability Zone us-east-1a for your Amazon Web Services - // account might not be the same location as us-east-1a for another Amazon Web - // Services account. - AvailabilityZoneName *string `min:"1" type:"string"` - - // The ID of the file system for which the mount target is intended. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // Address at which the file system can be mounted by using the mount target. - IpAddress *string `min:"7" type:"string"` - - // Lifecycle state of the mount target. - // - // LifeCycleState is a required field - LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` - - // System-assigned mount target ID. - // - // MountTargetId is a required field - MountTargetId *string `min:"13" type:"string" required:"true"` - - // The ID of the network interface that Amazon EFS created when it created the - // mount target. - NetworkInterfaceId *string `type:"string"` - - // Amazon Web Services account ID that owns the resource. - OwnerId *string `type:"string"` - - // The ID of the mount target's subnet. - // - // SubnetId is a required field - SubnetId *string `min:"15" type:"string" required:"true"` - - // The virtual private cloud (VPC) ID that the mount target is configured in. - VpcId *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MountTargetDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MountTargetDescription) GoString() string { - return s.String() -} - -// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. -func (s *MountTargetDescription) SetAvailabilityZoneId(v string) *MountTargetDescription { - s.AvailabilityZoneId = &v - return s -} - -// SetAvailabilityZoneName sets the AvailabilityZoneName field's value. -func (s *MountTargetDescription) SetAvailabilityZoneName(v string) *MountTargetDescription { - s.AvailabilityZoneName = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *MountTargetDescription) SetFileSystemId(v string) *MountTargetDescription { - s.FileSystemId = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *MountTargetDescription) SetIpAddress(v string) *MountTargetDescription { - s.IpAddress = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *MountTargetDescription) SetLifeCycleState(v string) *MountTargetDescription { - s.LifeCycleState = &v - return s -} - -// SetMountTargetId sets the MountTargetId field's value. -func (s *MountTargetDescription) SetMountTargetId(v string) *MountTargetDescription { - s.MountTargetId = &v - return s -} - -// SetNetworkInterfaceId sets the NetworkInterfaceId field's value. -func (s *MountTargetDescription) SetNetworkInterfaceId(v string) *MountTargetDescription { - s.NetworkInterfaceId = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *MountTargetDescription) SetOwnerId(v string) *MountTargetDescription { - s.OwnerId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *MountTargetDescription) SetSubnetId(v string) *MountTargetDescription { - s.SubnetId = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *MountTargetDescription) SetVpcId(v string) *MountTargetDescription { - s.VpcId = &v - return s -} - -// Returned if there is no mount target with the specified ID found in the caller's -// Amazon Web Services account. -type MountTargetNotFound struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MountTargetNotFound) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s MountTargetNotFound) GoString() string { - return s.String() -} - -func newErrorMountTargetNotFound(v protocol.ResponseMetadata) error { - return &MountTargetNotFound{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *MountTargetNotFound) Code() string { - return "MountTargetNotFound" -} - -// Message returns the exception's message. -func (s *MountTargetNotFound) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *MountTargetNotFound) OrigErr() error { - return nil -} - -func (s *MountTargetNotFound) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *MountTargetNotFound) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *MountTargetNotFound) RequestID() string { - return s.RespMetadata.RequestID -} - -// The calling account has reached the limit for elastic network interfaces -// for the specific Amazon Web Services Region. Either delete some network interfaces -// or request that the account quota be raised. For more information, see Amazon -// VPC Quotas (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) -// in the Amazon VPC User Guide (see the Network interfaces per Region entry -// in the Network interfaces table). -type NetworkInterfaceLimitExceeded struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NetworkInterfaceLimitExceeded) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NetworkInterfaceLimitExceeded) GoString() string { - return s.String() -} - -func newErrorNetworkInterfaceLimitExceeded(v protocol.ResponseMetadata) error { - return &NetworkInterfaceLimitExceeded{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *NetworkInterfaceLimitExceeded) Code() string { - return "NetworkInterfaceLimitExceeded" -} - -// Message returns the exception's message. -func (s *NetworkInterfaceLimitExceeded) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *NetworkInterfaceLimitExceeded) OrigErr() error { - return nil -} - -func (s *NetworkInterfaceLimitExceeded) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *NetworkInterfaceLimitExceeded) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *NetworkInterfaceLimitExceeded) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if IpAddress was not specified in the request and there are no free -// IP addresses in the subnet. -type NoFreeAddressesInSubnet struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NoFreeAddressesInSubnet) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s NoFreeAddressesInSubnet) GoString() string { - return s.String() -} - -func newErrorNoFreeAddressesInSubnet(v protocol.ResponseMetadata) error { - return &NoFreeAddressesInSubnet{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *NoFreeAddressesInSubnet) Code() string { - return "NoFreeAddressesInSubnet" -} - -// Message returns the exception's message. -func (s *NoFreeAddressesInSubnet) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *NoFreeAddressesInSubnet) OrigErr() error { - return nil -} - -func (s *NoFreeAddressesInSubnet) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *NoFreeAddressesInSubnet) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *NoFreeAddressesInSubnet) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the default file system policy is in effect for the EFS file -// system specified. -type PolicyNotFound struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - ErrorCode *string `min:"1" type:"string"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyNotFound) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PolicyNotFound) GoString() string { - return s.String() -} - -func newErrorPolicyNotFound(v protocol.ResponseMetadata) error { - return &PolicyNotFound{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *PolicyNotFound) Code() string { - return "PolicyNotFound" -} - -// Message returns the exception's message. -func (s *PolicyNotFound) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *PolicyNotFound) OrigErr() error { - return nil -} - -func (s *PolicyNotFound) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *PolicyNotFound) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *PolicyNotFound) RequestID() string { - return s.RespMetadata.RequestID -} - -// The full POSIX identity, including the user ID, group ID, and any secondary -// group IDs, on the access point that is used for all file system operations -// performed by NFS clients using the access point. -type PosixUser struct { - _ struct{} `type:"structure"` - - // The POSIX group ID used for all file system operations using this access - // point. - // - // Gid is a required field - Gid *int64 `type:"long" required:"true"` - - // Secondary POSIX group IDs used for all file system operations using this - // access point. - SecondaryGids []*int64 `type:"list"` - - // The POSIX user ID used for all file system operations using this access point. - // - // Uid is a required field - Uid *int64 `type:"long" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PosixUser) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PosixUser) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PosixUser) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PosixUser"} - if s.Gid == nil { - invalidParams.Add(request.NewErrParamRequired("Gid")) - } - if s.Uid == nil { - invalidParams.Add(request.NewErrParamRequired("Uid")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGid sets the Gid field's value. -func (s *PosixUser) SetGid(v int64) *PosixUser { - s.Gid = &v - return s -} - -// SetSecondaryGids sets the SecondaryGids field's value. -func (s *PosixUser) SetSecondaryGids(v []*int64) *PosixUser { - s.SecondaryGids = v - return s -} - -// SetUid sets the Uid field's value. -func (s *PosixUser) SetUid(v int64) *PosixUser { - s.Uid = &v - return s -} - -type PutAccountPreferencesInput struct { - _ struct{} `type:"structure"` - - // Specifies the EFS resource ID preference to set for the user's Amazon Web - // Services account, in the current Amazon Web Services Region, either LONG_ID - // (17 characters), or SHORT_ID (8 characters). - // - // Starting in October, 2021, you will receive an error when setting the account - // preference to SHORT_ID. Contact Amazon Web Services support if you receive - // an error and must use short IDs for file system and mount target resources. - // - // ResourceIdType is a required field - ResourceIdType *string `type:"string" required:"true" enum:"ResourceIdType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutAccountPreferencesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutAccountPreferencesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutAccountPreferencesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutAccountPreferencesInput"} - if s.ResourceIdType == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceIdType")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceIdType sets the ResourceIdType field's value. -func (s *PutAccountPreferencesInput) SetResourceIdType(v string) *PutAccountPreferencesInput { - s.ResourceIdType = &v - return s -} - -type PutAccountPreferencesOutput struct { - _ struct{} `type:"structure"` - - // Describes the resource type and its ID preference for the user's Amazon Web - // Services account, in the current Amazon Web Services Region. - ResourceIdPreference *ResourceIdPreference `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutAccountPreferencesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutAccountPreferencesOutput) GoString() string { - return s.String() -} - -// SetResourceIdPreference sets the ResourceIdPreference field's value. -func (s *PutAccountPreferencesOutput) SetResourceIdPreference(v *ResourceIdPreference) *PutAccountPreferencesOutput { - s.ResourceIdPreference = v - return s -} - -type PutBackupPolicyInput struct { - _ struct{} `type:"structure"` - - // The backup policy included in the PutBackupPolicy request. - // - // BackupPolicy is a required field - BackupPolicy *BackupPolicy `type:"structure" required:"true"` - - // Specifies which EFS file system to update the backup policy for. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBackupPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBackupPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutBackupPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutBackupPolicyInput"} - if s.BackupPolicy == nil { - invalidParams.Add(request.NewErrParamRequired("BackupPolicy")) - } - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.BackupPolicy != nil { - if err := s.BackupPolicy.Validate(); err != nil { - invalidParams.AddNested("BackupPolicy", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBackupPolicy sets the BackupPolicy field's value. -func (s *PutBackupPolicyInput) SetBackupPolicy(v *BackupPolicy) *PutBackupPolicyInput { - s.BackupPolicy = v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *PutBackupPolicyInput) SetFileSystemId(v string) *PutBackupPolicyInput { - s.FileSystemId = &v - return s -} - -type PutBackupPolicyOutput struct { - _ struct{} `type:"structure"` - - // Describes the file system's backup policy, indicating whether automatic backups - // are turned on or off. - BackupPolicy *BackupPolicy `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBackupPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutBackupPolicyOutput) GoString() string { - return s.String() -} - -// SetBackupPolicy sets the BackupPolicy field's value. -func (s *PutBackupPolicyOutput) SetBackupPolicy(v *BackupPolicy) *PutBackupPolicyOutput { - s.BackupPolicy = v - return s -} - -type PutFileSystemPolicyInput struct { - _ struct{} `type:"structure"` - - // (Optional) A boolean that specifies whether or not to bypass the FileSystemPolicy - // lockout safety check. The lockout safety check determines whether the policy - // in the request will lock out, or prevent, the IAM principal that is making - // the request from making future PutFileSystemPolicy requests on this file - // system. Set BypassPolicyLockoutSafetyCheck to True only when you intend to - // prevent the IAM principal that is making the request from making subsequent - // PutFileSystemPolicy requests on this file system. The default value is False. - BypassPolicyLockoutSafetyCheck *bool `type:"boolean"` - - // The ID of the EFS file system that you want to create or update the FileSystemPolicy - // for. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // The FileSystemPolicy that you're creating. Accepts a JSON formatted policy - // definition. EFS file system policies have a 20,000 character limit. To find - // out more about the elements that make up a file system policy, see EFS Resource-based - // Policies (https://docs.aws.amazon.com/efs/latest/ug/access-control-overview.html#access-control-manage-access-intro-resource-policies). - // - // Policy is a required field - Policy *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutFileSystemPolicyInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutFileSystemPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutFileSystemPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutFileSystemPolicyInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.Policy == nil { - invalidParams.Add(request.NewErrParamRequired("Policy")) - } - if s.Policy != nil && len(*s.Policy) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Policy", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetBypassPolicyLockoutSafetyCheck sets the BypassPolicyLockoutSafetyCheck field's value. -func (s *PutFileSystemPolicyInput) SetBypassPolicyLockoutSafetyCheck(v bool) *PutFileSystemPolicyInput { - s.BypassPolicyLockoutSafetyCheck = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *PutFileSystemPolicyInput) SetFileSystemId(v string) *PutFileSystemPolicyInput { - s.FileSystemId = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *PutFileSystemPolicyInput) SetPolicy(v string) *PutFileSystemPolicyInput { - s.Policy = &v - return s -} - -type PutFileSystemPolicyOutput struct { - _ struct{} `type:"structure"` - - // Specifies the EFS file system to which the FileSystemPolicy applies. - FileSystemId *string `type:"string"` - - // The JSON formatted FileSystemPolicy for the EFS file system. - Policy *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutFileSystemPolicyOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutFileSystemPolicyOutput) GoString() string { - return s.String() -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *PutFileSystemPolicyOutput) SetFileSystemId(v string) *PutFileSystemPolicyOutput { - s.FileSystemId = &v - return s -} - -// SetPolicy sets the Policy field's value. -func (s *PutFileSystemPolicyOutput) SetPolicy(v string) *PutFileSystemPolicyOutput { - s.Policy = &v - return s -} - -type PutLifecycleConfigurationInput struct { - _ struct{} `type:"structure"` - - // The ID of the file system for which you are creating the LifecycleConfiguration - // object (String). - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // An array of LifecyclePolicy objects that define the file system's LifecycleConfiguration - // object. A LifecycleConfiguration object informs EFS Lifecycle management - // of the following: - // - // * TransitionToIA – When to move files in the file system from primary - // storage (Standard storage class) into the Infrequent Access (IA) storage. - // - // * TransitionToArchive – When to move files in the file system from their - // current storage class (either IA or Standard storage) into the Archive - // storage. File systems cannot transition into Archive storage before transitioning - // into IA storage. Therefore, TransitionToArchive must either not be set - // or must be later than TransitionToIA. The Archive storage class is available - // only for file systems that use the Elastic Throughput mode and the General - // Purpose Performance mode. - // - // * TransitionToPrimaryStorageClass – Whether to move files in the file - // system back to primary storage (Standard storage class) after they are - // accessed in IA or Archive storage. - // - // When using the put-lifecycle-configuration CLI command or the PutLifecycleConfiguration - // API action, Amazon EFS requires that each LifecyclePolicy object have only - // a single transition. This means that in a request body, LifecyclePolicies - // must be structured as an array of LifecyclePolicy objects, one object for - // each storage transition. See the example requests in the following section - // for more information. - // - // LifecyclePolicies is a required field - LifecyclePolicies []*LifecyclePolicy `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutLifecycleConfigurationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutLifecycleConfigurationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *PutLifecycleConfigurationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "PutLifecycleConfigurationInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.LifecyclePolicies == nil { - invalidParams.Add(request.NewErrParamRequired("LifecyclePolicies")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *PutLifecycleConfigurationInput) SetFileSystemId(v string) *PutLifecycleConfigurationInput { - s.FileSystemId = &v - return s -} - -// SetLifecyclePolicies sets the LifecyclePolicies field's value. -func (s *PutLifecycleConfigurationInput) SetLifecyclePolicies(v []*LifecyclePolicy) *PutLifecycleConfigurationInput { - s.LifecyclePolicies = v - return s -} - -type PutLifecycleConfigurationOutput struct { - _ struct{} `type:"structure"` - - // An array of lifecycle management policies. EFS supports a maximum of one - // policy per file system. - LifecyclePolicies []*LifecyclePolicy `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutLifecycleConfigurationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PutLifecycleConfigurationOutput) GoString() string { - return s.String() -} - -// SetLifecyclePolicies sets the LifecyclePolicies field's value. -func (s *PutLifecycleConfigurationOutput) SetLifecyclePolicies(v []*LifecyclePolicy) *PutLifecycleConfigurationOutput { - s.LifecyclePolicies = v - return s -} - -// Returned if the file system is already included in a replication configuration.> -type ReplicationAlreadyExists struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - ErrorCode *string `min:"1" type:"string"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationAlreadyExists) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationAlreadyExists) GoString() string { - return s.String() -} - -func newErrorReplicationAlreadyExists(v protocol.ResponseMetadata) error { - return &ReplicationAlreadyExists{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ReplicationAlreadyExists) Code() string { - return "ReplicationAlreadyExists" -} - -// Message returns the exception's message. -func (s *ReplicationAlreadyExists) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ReplicationAlreadyExists) OrigErr() error { - return nil -} - -func (s *ReplicationAlreadyExists) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ReplicationAlreadyExists) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ReplicationAlreadyExists) RequestID() string { - return s.RespMetadata.RequestID -} - -// Describes the replication configuration for a specific file system. -type ReplicationConfigurationDescription struct { - _ struct{} `type:"structure"` - - // Describes when the replication configuration was created. - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // An array of destination objects. Only one destination object is supported. - // - // Destinations is a required field - Destinations []*Destination `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the original source EFS file system in - // the replication configuration. - // - // OriginalSourceFileSystemArn is a required field - OriginalSourceFileSystemArn *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the current source file system in the replication - // configuration. - // - // SourceFileSystemArn is a required field - SourceFileSystemArn *string `type:"string" required:"true"` - - // The ID of the source Amazon EFS file system that is being replicated. - // - // SourceFileSystemId is a required field - SourceFileSystemId *string `type:"string" required:"true"` - - // The Amazon Web Services Region in which the source EFS file system is located. - // - // SourceFileSystemRegion is a required field - SourceFileSystemRegion *string `min:"1" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationConfigurationDescription) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationConfigurationDescription) GoString() string { - return s.String() -} - -// SetCreationTime sets the CreationTime field's value. -func (s *ReplicationConfigurationDescription) SetCreationTime(v time.Time) *ReplicationConfigurationDescription { - s.CreationTime = &v - return s -} - -// SetDestinations sets the Destinations field's value. -func (s *ReplicationConfigurationDescription) SetDestinations(v []*Destination) *ReplicationConfigurationDescription { - s.Destinations = v - return s -} - -// SetOriginalSourceFileSystemArn sets the OriginalSourceFileSystemArn field's value. -func (s *ReplicationConfigurationDescription) SetOriginalSourceFileSystemArn(v string) *ReplicationConfigurationDescription { - s.OriginalSourceFileSystemArn = &v - return s -} - -// SetSourceFileSystemArn sets the SourceFileSystemArn field's value. -func (s *ReplicationConfigurationDescription) SetSourceFileSystemArn(v string) *ReplicationConfigurationDescription { - s.SourceFileSystemArn = &v - return s -} - -// SetSourceFileSystemId sets the SourceFileSystemId field's value. -func (s *ReplicationConfigurationDescription) SetSourceFileSystemId(v string) *ReplicationConfigurationDescription { - s.SourceFileSystemId = &v - return s -} - -// SetSourceFileSystemRegion sets the SourceFileSystemRegion field's value. -func (s *ReplicationConfigurationDescription) SetSourceFileSystemRegion(v string) *ReplicationConfigurationDescription { - s.SourceFileSystemRegion = &v - return s -} - -// Returned if the specified file system does not have a replication configuration. -type ReplicationNotFound struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // ReplicationNotFound - ErrorCode *string `min:"1" type:"string"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationNotFound) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ReplicationNotFound) GoString() string { - return s.String() -} - -func newErrorReplicationNotFound(v protocol.ResponseMetadata) error { - return &ReplicationNotFound{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ReplicationNotFound) Code() string { - return "ReplicationNotFound" -} - -// Message returns the exception's message. -func (s *ReplicationNotFound) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ReplicationNotFound) OrigErr() error { - return nil -} - -func (s *ReplicationNotFound) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ReplicationNotFound) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ReplicationNotFound) RequestID() string { - return s.RespMetadata.RequestID -} - -// Describes the resource type and its ID preference for the user's Amazon Web -// Services account, in the current Amazon Web Services Region. -type ResourceIdPreference struct { - _ struct{} `type:"structure"` - - // Identifies the EFS resource ID preference, either LONG_ID (17 characters) - // or SHORT_ID (8 characters). - ResourceIdType *string `type:"string" enum:"ResourceIdType"` - - // Identifies the Amazon EFS resources to which the ID preference setting applies, - // FILE_SYSTEM and MOUNT_TARGET. - Resources []*string `type:"list" enum:"Resource"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResourceIdPreference) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResourceIdPreference) GoString() string { - return s.String() -} - -// SetResourceIdType sets the ResourceIdType field's value. -func (s *ResourceIdPreference) SetResourceIdType(v string) *ResourceIdPreference { - s.ResourceIdType = &v - return s -} - -// SetResources sets the Resources field's value. -func (s *ResourceIdPreference) SetResources(v []*string) *ResourceIdPreference { - s.Resources = v - return s -} - -// Specifies the directory on the Amazon EFS file system that the access point -// provides access to. The access point exposes the specified file system path -// as the root directory of your file system to applications using the access -// point. NFS clients using the access point can only access data in the access -// point's RootDirectory and it's subdirectories. -type RootDirectory struct { - _ struct{} `type:"structure"` - - // (Optional) Specifies the POSIX IDs and permissions to apply to the access - // point's RootDirectory. If the RootDirectory > Path specified does not exist, - // EFS creates the root directory using the CreationInfo settings when a client - // connects to an access point. When specifying the CreationInfo, you must provide - // values for all properties. - // - // If you do not provide CreationInfo and the specified RootDirectory > Path - // does not exist, attempts to mount the file system using the access point - // will fail. - CreationInfo *CreationInfo `type:"structure"` - - // Specifies the path on the EFS file system to expose as the root directory - // to NFS clients using the access point to access the EFS file system. A path - // can have up to four subdirectories. If the specified path does not exist, - // you are required to provide the CreationInfo. - Path *string `min:"1" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RootDirectory) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s RootDirectory) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RootDirectory) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RootDirectory"} - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.CreationInfo != nil { - if err := s.CreationInfo.Validate(); err != nil { - invalidParams.AddNested("CreationInfo", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCreationInfo sets the CreationInfo field's value. -func (s *RootDirectory) SetCreationInfo(v *CreationInfo) *RootDirectory { - s.CreationInfo = v - return s -} - -// SetPath sets the Path field's value. -func (s *RootDirectory) SetPath(v string) *RootDirectory { - s.Path = &v - return s -} - -// Returned if the size of SecurityGroups specified in the request is greater -// than five. -type SecurityGroupLimitExceeded struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SecurityGroupLimitExceeded) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SecurityGroupLimitExceeded) GoString() string { - return s.String() -} - -func newErrorSecurityGroupLimitExceeded(v protocol.ResponseMetadata) error { - return &SecurityGroupLimitExceeded{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *SecurityGroupLimitExceeded) Code() string { - return "SecurityGroupLimitExceeded" -} - -// Message returns the exception's message. -func (s *SecurityGroupLimitExceeded) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *SecurityGroupLimitExceeded) OrigErr() error { - return nil -} - -func (s *SecurityGroupLimitExceeded) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *SecurityGroupLimitExceeded) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *SecurityGroupLimitExceeded) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if one of the specified security groups doesn't exist in the subnet's -// virtual private cloud (VPC). -type SecurityGroupNotFound struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SecurityGroupNotFound) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SecurityGroupNotFound) GoString() string { - return s.String() -} - -func newErrorSecurityGroupNotFound(v protocol.ResponseMetadata) error { - return &SecurityGroupNotFound{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *SecurityGroupNotFound) Code() string { - return "SecurityGroupNotFound" -} - -// Message returns the exception's message. -func (s *SecurityGroupNotFound) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *SecurityGroupNotFound) OrigErr() error { - return nil -} - -func (s *SecurityGroupNotFound) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *SecurityGroupNotFound) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *SecurityGroupNotFound) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if there is no subnet with ID SubnetId provided in the request. -type SubnetNotFound struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SubnetNotFound) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s SubnetNotFound) GoString() string { - return s.String() -} - -func newErrorSubnetNotFound(v protocol.ResponseMetadata) error { - return &SubnetNotFound{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *SubnetNotFound) Code() string { - return "SubnetNotFound" -} - -// Message returns the exception's message. -func (s *SubnetNotFound) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *SubnetNotFound) OrigErr() error { - return nil -} - -func (s *SubnetNotFound) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *SubnetNotFound) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *SubnetNotFound) RequestID() string { - return s.RespMetadata.RequestID -} - -// A tag is a key-value pair. Allowed characters are letters, white space, and -// numbers that can be represented in UTF-8, and the following characters:+ -// - = . _ : /. -type Tag struct { - _ struct{} `type:"structure"` - - // The tag key (String). The key can't start with aws:. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value of the tag key. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Tag) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Tag) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Tag"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - if s.Value == nil { - invalidParams.Add(request.NewErrParamRequired("Value")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -type TagResourceInput struct { - _ struct{} `type:"structure"` - - // The ID specifying the EFS resource that you want to create a tag for. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"ResourceId" type:"string" required:"true"` - - // An array of Tag objects to add. Each Tag object is a key-value pair. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil { - for i, v := range s.Tags { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Tags", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *TagResourceInput) SetResourceId(v string) *TagResourceInput { - s.ResourceId = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourceInput) SetTags(v []*Tag) *TagResourceInput { - s.Tags = v - return s -} - -type TagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagResourceOutput) GoString() string { - return s.String() -} - -// Returned when the CreateAccessPoint API action is called too quickly and -// the number of Access Points on the file system is nearing the limit of 120 -// (https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region). -type ThrottlingException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - ErrorCode *string `min:"1" type:"string"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ThrottlingException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ThrottlingException) GoString() string { - return s.String() -} - -func newErrorThrottlingException(v protocol.ResponseMetadata) error { - return &ThrottlingException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ThrottlingException) Code() string { - return "ThrottlingException" -} - -// Message returns the exception's message. -func (s *ThrottlingException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ThrottlingException) OrigErr() error { - return nil -} - -func (s *ThrottlingException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ThrottlingException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ThrottlingException) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the throughput mode or amount of provisioned throughput can't -// be changed because the throughput limit of 1024 MiB/s has been reached. -type ThroughputLimitExceeded struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ThroughputLimitExceeded) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ThroughputLimitExceeded) GoString() string { - return s.String() -} - -func newErrorThroughputLimitExceeded(v protocol.ResponseMetadata) error { - return &ThroughputLimitExceeded{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ThroughputLimitExceeded) Code() string { - return "ThroughputLimitExceeded" -} - -// Message returns the exception's message. -func (s *ThroughputLimitExceeded) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ThroughputLimitExceeded) OrigErr() error { - return nil -} - -func (s *ThroughputLimitExceeded) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ThroughputLimitExceeded) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ThroughputLimitExceeded) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if you don’t wait at least 24 hours before either changing the -// throughput mode, or decreasing the Provisioned Throughput value. -type TooManyRequests struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TooManyRequests) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TooManyRequests) GoString() string { - return s.String() -} - -func newErrorTooManyRequests(v protocol.ResponseMetadata) error { - return &TooManyRequests{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *TooManyRequests) Code() string { - return "TooManyRequests" -} - -// Message returns the exception's message. -func (s *TooManyRequests) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *TooManyRequests) OrigErr() error { - return nil -} - -func (s *TooManyRequests) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *TooManyRequests) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *TooManyRequests) RequestID() string { - return s.RespMetadata.RequestID -} - -// Returned if the requested Amazon EFS functionality is not available in the -// specified Availability Zone. -type UnsupportedAvailabilityZone struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UnsupportedAvailabilityZone) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UnsupportedAvailabilityZone) GoString() string { - return s.String() -} - -func newErrorUnsupportedAvailabilityZone(v protocol.ResponseMetadata) error { - return &UnsupportedAvailabilityZone{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *UnsupportedAvailabilityZone) Code() string { - return "UnsupportedAvailabilityZone" -} - -// Message returns the exception's message. -func (s *UnsupportedAvailabilityZone) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *UnsupportedAvailabilityZone) OrigErr() error { - return nil -} - -func (s *UnsupportedAvailabilityZone) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *UnsupportedAvailabilityZone) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *UnsupportedAvailabilityZone) RequestID() string { - return s.RespMetadata.RequestID -} - -type UntagResourceInput struct { - _ struct{} `type:"structure" nopayload:"true"` - - // Specifies the EFS resource that you want to remove tags from. - // - // ResourceId is a required field - ResourceId *string `location:"uri" locationName:"ResourceId" type:"string" required:"true"` - - // The keys of the key-value tag pairs that you want to remove from the specified - // EFS resource. - // - // TagKeys is a required field - TagKeys []*string `location:"querystring" locationName:"tagKeys" min:"1" type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagResourceInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagResourceInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourceInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} - if s.ResourceId == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceId")) - } - if s.ResourceId != nil && len(*s.ResourceId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceId", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.TagKeys != nil && len(s.TagKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceId sets the ResourceId field's value. -func (s *UntagResourceInput) SetResourceId(v string) *UntagResourceInput { - s.ResourceId = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { - s.TagKeys = v - return s -} - -type UntagResourceOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagResourceOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagResourceOutput) GoString() string { - return s.String() -} - -type UpdateFileSystemInput struct { - _ struct{} `type:"structure"` - - // The ID of the file system that you want to update. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // (Optional) The throughput, measured in mebibytes per second (MiBps), that - // you want to provision for a file system that you're creating. Required if - // ThroughputMode is set to provisioned. Valid values are 1-3414 MiBps, with - // the upper limit depending on Region. To increase this limit, contact Amazon - // Web Services Support. For more information, see Amazon EFS quotas that you - // can increase (https://docs.aws.amazon.com/efs/latest/ug/limits.html#soft-limits) - // in the Amazon EFS User Guide. - ProvisionedThroughputInMibps *float64 `min:"1" type:"double"` - - // (Optional) Updates the file system's throughput mode. If you're not updating - // your throughput mode, you don't need to provide this value in your request. - // If you are changing the ThroughputMode to provisioned, you must also set - // a value for ProvisionedThroughputInMibps. - ThroughputMode *string `type:"string" enum:"ThroughputMode"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFileSystemInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFileSystemInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFileSystemInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - if s.ProvisionedThroughputInMibps != nil && *s.ProvisionedThroughputInMibps < 1 { - invalidParams.Add(request.NewErrParamMinValue("ProvisionedThroughputInMibps", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *UpdateFileSystemInput) SetFileSystemId(v string) *UpdateFileSystemInput { - s.FileSystemId = &v - return s -} - -// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. -func (s *UpdateFileSystemInput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemInput { - s.ProvisionedThroughputInMibps = &v - return s -} - -// SetThroughputMode sets the ThroughputMode field's value. -func (s *UpdateFileSystemInput) SetThroughputMode(v string) *UpdateFileSystemInput { - s.ThroughputMode = &v - return s -} - -// A description of the file system. -type UpdateFileSystemOutput struct { - _ struct{} `type:"structure"` - - // The unique and consistent identifier of the Availability Zone in which the - // file system is located, and is valid only for One Zone file systems. For - // example, use1-az1 is an Availability Zone ID for the us-east-1 Amazon Web - // Services Region, and it has the same location in every Amazon Web Services - // account. - AvailabilityZoneId *string `type:"string"` - - // Describes the Amazon Web Services Availability Zone in which the file system - // is located, and is valid only for One Zone file systems. For more information, - // see Using EFS storage classes (https://docs.aws.amazon.com/efs/latest/ug/storage-classes.html) - // in the Amazon EFS User Guide. - AvailabilityZoneName *string `min:"1" type:"string"` - - // The time that the file system was created, in seconds (since 1970-01-01T00:00:00Z). - // - // CreationTime is a required field - CreationTime *time.Time `type:"timestamp" required:"true"` - - // The opaque string specified in the request. - // - // CreationToken is a required field - CreationToken *string `min:"1" type:"string" required:"true"` - - // A Boolean value that, if true, indicates that the file system is encrypted. - Encrypted *bool `type:"boolean"` - - // The Amazon Resource Name (ARN) for the EFS file system, in the format arn:aws:elasticfilesystem:region:account-id:file-system/file-system-id - // . Example with sample data: arn:aws:elasticfilesystem:us-west-2:1111333322228888:file-system/fs-01234567 - FileSystemArn *string `type:"string"` - - // The ID of the file system, assigned by Amazon EFS. - // - // FileSystemId is a required field - FileSystemId *string `type:"string" required:"true"` - - // Describes the protection on the file system. - FileSystemProtection *FileSystemProtectionDescription `type:"structure"` - - // The ID of an KMS key used to protect the encrypted file system. - KmsKeyId *string `type:"string"` - - // The lifecycle phase of the file system. - // - // LifeCycleState is a required field - LifeCycleState *string `type:"string" required:"true" enum:"LifeCycleState"` - - // You can add tags to a file system, including a Name tag. For more information, - // see CreateFileSystem. If the file system has a Name tag, Amazon EFS returns - // the value in this field. - Name *string `type:"string"` - - // The current number of mount targets that the file system has. For more information, - // see CreateMountTarget. - // - // NumberOfMountTargets is a required field - NumberOfMountTargets *int64 `type:"integer" required:"true"` - - // The Amazon Web Services account that created the file system. - // - // OwnerId is a required field - OwnerId *string `type:"string" required:"true"` - - // The Performance mode of the file system. - // - // PerformanceMode is a required field - PerformanceMode *string `type:"string" required:"true" enum:"PerformanceMode"` - - // The amount of provisioned throughput, measured in MiBps, for the file system. - // Valid for file systems using ThroughputMode set to provisioned. - ProvisionedThroughputInMibps *float64 `min:"1" type:"double"` - - // The latest known metered size (in bytes) of data stored in the file system, - // in its Value field, and the time at which that size was determined in its - // Timestamp field. The Timestamp value is the integer number of seconds since - // 1970-01-01T00:00:00Z. The SizeInBytes value doesn't represent the size of - // a consistent snapshot of the file system, but it is eventually consistent - // when there are no writes to the file system. That is, SizeInBytes represents - // actual size only if the file system is not modified for a period longer than - // a couple of hours. Otherwise, the value is not the exact size that the file - // system was at any point in time. - // - // SizeInBytes is a required field - SizeInBytes *FileSystemSize `type:"structure" required:"true"` - - // The tags associated with the file system, presented as an array of Tag objects. - // - // Tags is a required field - Tags []*Tag `type:"list" required:"true"` - - // Displays the file system's throughput mode. For more information, see Throughput - // modes (https://docs.aws.amazon.com/efs/latest/ug/performance.html#throughput-modes) - // in the Amazon EFS User Guide. - ThroughputMode *string `type:"string" enum:"ThroughputMode"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFileSystemOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFileSystemOutput) GoString() string { - return s.String() -} - -// SetAvailabilityZoneId sets the AvailabilityZoneId field's value. -func (s *UpdateFileSystemOutput) SetAvailabilityZoneId(v string) *UpdateFileSystemOutput { - s.AvailabilityZoneId = &v - return s -} - -// SetAvailabilityZoneName sets the AvailabilityZoneName field's value. -func (s *UpdateFileSystemOutput) SetAvailabilityZoneName(v string) *UpdateFileSystemOutput { - s.AvailabilityZoneName = &v - return s -} - -// SetCreationTime sets the CreationTime field's value. -func (s *UpdateFileSystemOutput) SetCreationTime(v time.Time) *UpdateFileSystemOutput { - s.CreationTime = &v - return s -} - -// SetCreationToken sets the CreationToken field's value. -func (s *UpdateFileSystemOutput) SetCreationToken(v string) *UpdateFileSystemOutput { - s.CreationToken = &v - return s -} - -// SetEncrypted sets the Encrypted field's value. -func (s *UpdateFileSystemOutput) SetEncrypted(v bool) *UpdateFileSystemOutput { - s.Encrypted = &v - return s -} - -// SetFileSystemArn sets the FileSystemArn field's value. -func (s *UpdateFileSystemOutput) SetFileSystemArn(v string) *UpdateFileSystemOutput { - s.FileSystemArn = &v - return s -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *UpdateFileSystemOutput) SetFileSystemId(v string) *UpdateFileSystemOutput { - s.FileSystemId = &v - return s -} - -// SetFileSystemProtection sets the FileSystemProtection field's value. -func (s *UpdateFileSystemOutput) SetFileSystemProtection(v *FileSystemProtectionDescription) *UpdateFileSystemOutput { - s.FileSystemProtection = v - return s -} - -// SetKmsKeyId sets the KmsKeyId field's value. -func (s *UpdateFileSystemOutput) SetKmsKeyId(v string) *UpdateFileSystemOutput { - s.KmsKeyId = &v - return s -} - -// SetLifeCycleState sets the LifeCycleState field's value. -func (s *UpdateFileSystemOutput) SetLifeCycleState(v string) *UpdateFileSystemOutput { - s.LifeCycleState = &v - return s -} - -// SetName sets the Name field's value. -func (s *UpdateFileSystemOutput) SetName(v string) *UpdateFileSystemOutput { - s.Name = &v - return s -} - -// SetNumberOfMountTargets sets the NumberOfMountTargets field's value. -func (s *UpdateFileSystemOutput) SetNumberOfMountTargets(v int64) *UpdateFileSystemOutput { - s.NumberOfMountTargets = &v - return s -} - -// SetOwnerId sets the OwnerId field's value. -func (s *UpdateFileSystemOutput) SetOwnerId(v string) *UpdateFileSystemOutput { - s.OwnerId = &v - return s -} - -// SetPerformanceMode sets the PerformanceMode field's value. -func (s *UpdateFileSystemOutput) SetPerformanceMode(v string) *UpdateFileSystemOutput { - s.PerformanceMode = &v - return s -} - -// SetProvisionedThroughputInMibps sets the ProvisionedThroughputInMibps field's value. -func (s *UpdateFileSystemOutput) SetProvisionedThroughputInMibps(v float64) *UpdateFileSystemOutput { - s.ProvisionedThroughputInMibps = &v - return s -} - -// SetSizeInBytes sets the SizeInBytes field's value. -func (s *UpdateFileSystemOutput) SetSizeInBytes(v *FileSystemSize) *UpdateFileSystemOutput { - s.SizeInBytes = v - return s -} - -// SetTags sets the Tags field's value. -func (s *UpdateFileSystemOutput) SetTags(v []*Tag) *UpdateFileSystemOutput { - s.Tags = v - return s -} - -// SetThroughputMode sets the ThroughputMode field's value. -func (s *UpdateFileSystemOutput) SetThroughputMode(v string) *UpdateFileSystemOutput { - s.ThroughputMode = &v - return s -} - -type UpdateFileSystemProtectionInput struct { - _ struct{} `type:"structure"` - - // The ID of the file system to update. - // - // FileSystemId is a required field - FileSystemId *string `location:"uri" locationName:"FileSystemId" type:"string" required:"true"` - - // The status of the file system's replication overwrite protection. - // - // * ENABLED – The file system cannot be used as the destination file system - // in a replication configuration. The file system is writeable. Replication - // overwrite protection is ENABLED by default. - // - // * DISABLED – The file system can be used as the destination file system - // in a replication configuration. The file system is read-only and can only - // be modified by EFS replication. - // - // * REPLICATING – The file system is being used as the destination file - // system in a replication configuration. The file system is read-only and - // is only modified only by EFS replication. - // - // If the replication configuration is deleted, the file system's replication - // overwrite protection is re-enabled, the file system becomes writeable. - ReplicationOverwriteProtection *string `type:"string" enum:"ReplicationOverwriteProtection"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFileSystemProtectionInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFileSystemProtectionInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UpdateFileSystemProtectionInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UpdateFileSystemProtectionInput"} - if s.FileSystemId == nil { - invalidParams.Add(request.NewErrParamRequired("FileSystemId")) - } - if s.FileSystemId != nil && len(*s.FileSystemId) < 1 { - invalidParams.Add(request.NewErrParamMinLen("FileSystemId", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetFileSystemId sets the FileSystemId field's value. -func (s *UpdateFileSystemProtectionInput) SetFileSystemId(v string) *UpdateFileSystemProtectionInput { - s.FileSystemId = &v - return s -} - -// SetReplicationOverwriteProtection sets the ReplicationOverwriteProtection field's value. -func (s *UpdateFileSystemProtectionInput) SetReplicationOverwriteProtection(v string) *UpdateFileSystemProtectionInput { - s.ReplicationOverwriteProtection = &v - return s -} - -// Describes the protection on a file system. -type UpdateFileSystemProtectionOutput struct { - _ struct{} `type:"structure"` - - // The status of the file system's replication overwrite protection. - // - // * ENABLED – The file system cannot be used as the destination file system - // in a replication configuration. The file system is writeable. Replication - // overwrite protection is ENABLED by default. - // - // * DISABLED – The file system can be used as the destination file system - // in a replication configuration. The file system is read-only and can only - // be modified by EFS replication. - // - // * REPLICATING – The file system is being used as the destination file - // system in a replication configuration. The file system is read-only and - // is only modified only by EFS replication. - // - // If the replication configuration is deleted, the file system's replication - // overwrite protection is re-enabled, the file system becomes writeable. - ReplicationOverwriteProtection *string `type:"string" enum:"ReplicationOverwriteProtection"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFileSystemProtectionOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UpdateFileSystemProtectionOutput) GoString() string { - return s.String() -} - -// SetReplicationOverwriteProtection sets the ReplicationOverwriteProtection field's value. -func (s *UpdateFileSystemProtectionOutput) SetReplicationOverwriteProtection(v string) *UpdateFileSystemProtectionOutput { - s.ReplicationOverwriteProtection = &v - return s -} - -// Returned if the Backup service is not available in the Amazon Web Services -// Region in which the request was made. -type ValidationException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - // The error code is a string that uniquely identifies an error condition. It - // is meant to be read and understood by programs that detect and handle errors - // by type. - // - // ErrorCode is a required field - ErrorCode *string `min:"1" type:"string" required:"true"` - - // The error message contains a generic description of the error condition in - // English. It is intended for a human audience. Simple programs display the - // message directly to the end user if they encounter an error condition they - // don't know how or don't care to handle. Sophisticated programs with more - // exhaustive error handling and proper internationalization are more likely - // to ignore the error message. - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ValidationException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ValidationException) GoString() string { - return s.String() -} - -func newErrorValidationException(v protocol.ResponseMetadata) error { - return &ValidationException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ValidationException) Code() string { - return "ValidationException" -} - -// Message returns the exception's message. -func (s *ValidationException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ValidationException) OrigErr() error { - return nil -} - -func (s *ValidationException) Error() string { - return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ValidationException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ValidationException) RequestID() string { - return s.RespMetadata.RequestID -} - -const ( - // LifeCycleStateCreating is a LifeCycleState enum value - LifeCycleStateCreating = "creating" - - // LifeCycleStateAvailable is a LifeCycleState enum value - LifeCycleStateAvailable = "available" - - // LifeCycleStateUpdating is a LifeCycleState enum value - LifeCycleStateUpdating = "updating" - - // LifeCycleStateDeleting is a LifeCycleState enum value - LifeCycleStateDeleting = "deleting" - - // LifeCycleStateDeleted is a LifeCycleState enum value - LifeCycleStateDeleted = "deleted" - - // LifeCycleStateError is a LifeCycleState enum value - LifeCycleStateError = "error" -) - -// LifeCycleState_Values returns all elements of the LifeCycleState enum -func LifeCycleState_Values() []string { - return []string{ - LifeCycleStateCreating, - LifeCycleStateAvailable, - LifeCycleStateUpdating, - LifeCycleStateDeleting, - LifeCycleStateDeleted, - LifeCycleStateError, - } -} - -const ( - // PerformanceModeGeneralPurpose is a PerformanceMode enum value - PerformanceModeGeneralPurpose = "generalPurpose" - - // PerformanceModeMaxIo is a PerformanceMode enum value - PerformanceModeMaxIo = "maxIO" -) - -// PerformanceMode_Values returns all elements of the PerformanceMode enum -func PerformanceMode_Values() []string { - return []string{ - PerformanceModeGeneralPurpose, - PerformanceModeMaxIo, - } -} - -const ( - // ReplicationOverwriteProtectionEnabled is a ReplicationOverwriteProtection enum value - ReplicationOverwriteProtectionEnabled = "ENABLED" - - // ReplicationOverwriteProtectionDisabled is a ReplicationOverwriteProtection enum value - ReplicationOverwriteProtectionDisabled = "DISABLED" - - // ReplicationOverwriteProtectionReplicating is a ReplicationOverwriteProtection enum value - ReplicationOverwriteProtectionReplicating = "REPLICATING" -) - -// ReplicationOverwriteProtection_Values returns all elements of the ReplicationOverwriteProtection enum -func ReplicationOverwriteProtection_Values() []string { - return []string{ - ReplicationOverwriteProtectionEnabled, - ReplicationOverwriteProtectionDisabled, - ReplicationOverwriteProtectionReplicating, - } -} - -const ( - // ReplicationStatusEnabled is a ReplicationStatus enum value - ReplicationStatusEnabled = "ENABLED" - - // ReplicationStatusEnabling is a ReplicationStatus enum value - ReplicationStatusEnabling = "ENABLING" - - // ReplicationStatusDeleting is a ReplicationStatus enum value - ReplicationStatusDeleting = "DELETING" - - // ReplicationStatusError is a ReplicationStatus enum value - ReplicationStatusError = "ERROR" - - // ReplicationStatusPaused is a ReplicationStatus enum value - ReplicationStatusPaused = "PAUSED" - - // ReplicationStatusPausing is a ReplicationStatus enum value - ReplicationStatusPausing = "PAUSING" -) - -// ReplicationStatus_Values returns all elements of the ReplicationStatus enum -func ReplicationStatus_Values() []string { - return []string{ - ReplicationStatusEnabled, - ReplicationStatusEnabling, - ReplicationStatusDeleting, - ReplicationStatusError, - ReplicationStatusPaused, - ReplicationStatusPausing, - } -} - -// An EFS resource, for example a file system or a mount target. -const ( - // ResourceFileSystem is a Resource enum value - ResourceFileSystem = "FILE_SYSTEM" - - // ResourceMountTarget is a Resource enum value - ResourceMountTarget = "MOUNT_TARGET" -) - -// Resource_Values returns all elements of the Resource enum -func Resource_Values() []string { - return []string{ - ResourceFileSystem, - ResourceMountTarget, - } -} - -// A preference indicating a choice to use 63bit/32bit IDs for all applicable -// resources. -const ( - // ResourceIdTypeLongId is a ResourceIdType enum value - ResourceIdTypeLongId = "LONG_ID" - - // ResourceIdTypeShortId is a ResourceIdType enum value - ResourceIdTypeShortId = "SHORT_ID" -) - -// ResourceIdType_Values returns all elements of the ResourceIdType enum -func ResourceIdType_Values() []string { - return []string{ - ResourceIdTypeLongId, - ResourceIdTypeShortId, - } -} - -const ( - // StatusEnabled is a Status enum value - StatusEnabled = "ENABLED" - - // StatusEnabling is a Status enum value - StatusEnabling = "ENABLING" - - // StatusDisabled is a Status enum value - StatusDisabled = "DISABLED" - - // StatusDisabling is a Status enum value - StatusDisabling = "DISABLING" -) - -// Status_Values returns all elements of the Status enum -func Status_Values() []string { - return []string{ - StatusEnabled, - StatusEnabling, - StatusDisabled, - StatusDisabling, - } -} - -const ( - // ThroughputModeBursting is a ThroughputMode enum value - ThroughputModeBursting = "bursting" - - // ThroughputModeProvisioned is a ThroughputMode enum value - ThroughputModeProvisioned = "provisioned" - - // ThroughputModeElastic is a ThroughputMode enum value - ThroughputModeElastic = "elastic" -) - -// ThroughputMode_Values returns all elements of the ThroughputMode enum -func ThroughputMode_Values() []string { - return []string{ - ThroughputModeBursting, - ThroughputModeProvisioned, - ThroughputModeElastic, - } -} - -const ( - // TransitionToArchiveRulesAfter1Day is a TransitionToArchiveRules enum value - TransitionToArchiveRulesAfter1Day = "AFTER_1_DAY" - - // TransitionToArchiveRulesAfter7Days is a TransitionToArchiveRules enum value - TransitionToArchiveRulesAfter7Days = "AFTER_7_DAYS" - - // TransitionToArchiveRulesAfter14Days is a TransitionToArchiveRules enum value - TransitionToArchiveRulesAfter14Days = "AFTER_14_DAYS" - - // TransitionToArchiveRulesAfter30Days is a TransitionToArchiveRules enum value - TransitionToArchiveRulesAfter30Days = "AFTER_30_DAYS" - - // TransitionToArchiveRulesAfter60Days is a TransitionToArchiveRules enum value - TransitionToArchiveRulesAfter60Days = "AFTER_60_DAYS" - - // TransitionToArchiveRulesAfter90Days is a TransitionToArchiveRules enum value - TransitionToArchiveRulesAfter90Days = "AFTER_90_DAYS" - - // TransitionToArchiveRulesAfter180Days is a TransitionToArchiveRules enum value - TransitionToArchiveRulesAfter180Days = "AFTER_180_DAYS" - - // TransitionToArchiveRulesAfter270Days is a TransitionToArchiveRules enum value - TransitionToArchiveRulesAfter270Days = "AFTER_270_DAYS" - - // TransitionToArchiveRulesAfter365Days is a TransitionToArchiveRules enum value - TransitionToArchiveRulesAfter365Days = "AFTER_365_DAYS" -) - -// TransitionToArchiveRules_Values returns all elements of the TransitionToArchiveRules enum -func TransitionToArchiveRules_Values() []string { - return []string{ - TransitionToArchiveRulesAfter1Day, - TransitionToArchiveRulesAfter7Days, - TransitionToArchiveRulesAfter14Days, - TransitionToArchiveRulesAfter30Days, - TransitionToArchiveRulesAfter60Days, - TransitionToArchiveRulesAfter90Days, - TransitionToArchiveRulesAfter180Days, - TransitionToArchiveRulesAfter270Days, - TransitionToArchiveRulesAfter365Days, - } -} - -const ( - // TransitionToIARulesAfter7Days is a TransitionToIARules enum value - TransitionToIARulesAfter7Days = "AFTER_7_DAYS" - - // TransitionToIARulesAfter14Days is a TransitionToIARules enum value - TransitionToIARulesAfter14Days = "AFTER_14_DAYS" - - // TransitionToIARulesAfter30Days is a TransitionToIARules enum value - TransitionToIARulesAfter30Days = "AFTER_30_DAYS" - - // TransitionToIARulesAfter60Days is a TransitionToIARules enum value - TransitionToIARulesAfter60Days = "AFTER_60_DAYS" - - // TransitionToIARulesAfter90Days is a TransitionToIARules enum value - TransitionToIARulesAfter90Days = "AFTER_90_DAYS" - - // TransitionToIARulesAfter1Day is a TransitionToIARules enum value - TransitionToIARulesAfter1Day = "AFTER_1_DAY" - - // TransitionToIARulesAfter180Days is a TransitionToIARules enum value - TransitionToIARulesAfter180Days = "AFTER_180_DAYS" - - // TransitionToIARulesAfter270Days is a TransitionToIARules enum value - TransitionToIARulesAfter270Days = "AFTER_270_DAYS" - - // TransitionToIARulesAfter365Days is a TransitionToIARules enum value - TransitionToIARulesAfter365Days = "AFTER_365_DAYS" -) - -// TransitionToIARules_Values returns all elements of the TransitionToIARules enum -func TransitionToIARules_Values() []string { - return []string{ - TransitionToIARulesAfter7Days, - TransitionToIARulesAfter14Days, - TransitionToIARulesAfter30Days, - TransitionToIARulesAfter60Days, - TransitionToIARulesAfter90Days, - TransitionToIARulesAfter1Day, - TransitionToIARulesAfter180Days, - TransitionToIARulesAfter270Days, - TransitionToIARulesAfter365Days, - } -} - -const ( - // TransitionToPrimaryStorageClassRulesAfter1Access is a TransitionToPrimaryStorageClassRules enum value - TransitionToPrimaryStorageClassRulesAfter1Access = "AFTER_1_ACCESS" -) - -// TransitionToPrimaryStorageClassRules_Values returns all elements of the TransitionToPrimaryStorageClassRules enum -func TransitionToPrimaryStorageClassRules_Values() []string { - return []string{ - TransitionToPrimaryStorageClassRulesAfter1Access, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go b/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go deleted file mode 100644 index 77ae8e3726..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/doc.go +++ /dev/null @@ -1,34 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package efs provides the client and types for making API -// requests to Amazon Elastic File System. -// -// Amazon Elastic File System (Amazon EFS) provides simple, scalable file storage -// for use with Amazon EC2 Linux and Mac instances in the Amazon Web Services -// Cloud. With Amazon EFS, storage capacity is elastic, growing and shrinking -// automatically as you add and remove files, so that your applications have -// the storage they need, when they need it. For more information, see the Amazon -// Elastic File System API Reference (https://docs.aws.amazon.com/efs/latest/ug/api-reference.html) -// and the Amazon Elastic File System User Guide (https://docs.aws.amazon.com/efs/latest/ug/whatisefs.html). -// -// See https://docs.aws.amazon.com/goto/WebAPI/elasticfilesystem-2015-02-01 for more information on this service. -// -// See efs package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/efs/ -// -// # Using the Client -// -// To contact Amazon Elastic File System with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the Amazon Elastic File System client EFS for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/efs/#New -package efs diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go b/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go deleted file mode 100644 index bda18785c0..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/errors.go +++ /dev/null @@ -1,275 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package efs - -import ( - "github.com/aws/aws-sdk-go/private/protocol" -) - -const ( - - // ErrCodeAccessPointAlreadyExists for service response error code - // "AccessPointAlreadyExists". - // - // Returned if the access point that you are trying to create already exists, - // with the creation token you provided in the request. - ErrCodeAccessPointAlreadyExists = "AccessPointAlreadyExists" - - // ErrCodeAccessPointLimitExceeded for service response error code - // "AccessPointLimitExceeded". - // - // Returned if the Amazon Web Services account has already created the maximum - // number of access points allowed per file system. For more informaton, see - // https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region - // (https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region). - ErrCodeAccessPointLimitExceeded = "AccessPointLimitExceeded" - - // ErrCodeAccessPointNotFound for service response error code - // "AccessPointNotFound". - // - // Returned if the specified AccessPointId value doesn't exist in the requester's - // Amazon Web Services account. - ErrCodeAccessPointNotFound = "AccessPointNotFound" - - // ErrCodeAvailabilityZonesMismatch for service response error code - // "AvailabilityZonesMismatch". - // - // Returned if the Availability Zone that was specified for a mount target is - // different from the Availability Zone that was specified for One Zone storage. - // For more information, see Regional and One Zone storage redundancy (https://docs.aws.amazon.com/efs/latest/ug/availability-durability.html). - ErrCodeAvailabilityZonesMismatch = "AvailabilityZonesMismatch" - - // ErrCodeBadRequest for service response error code - // "BadRequest". - // - // Returned if the request is malformed or contains an error such as an invalid - // parameter value or a missing required parameter. - ErrCodeBadRequest = "BadRequest" - - // ErrCodeConflictException for service response error code - // "ConflictException". - // - // Returned if the source file system in a replication is encrypted but the - // destination file system is unencrypted. - ErrCodeConflictException = "ConflictException" - - // ErrCodeDependencyTimeout for service response error code - // "DependencyTimeout". - // - // The service timed out trying to fulfill the request, and the client should - // try the call again. - ErrCodeDependencyTimeout = "DependencyTimeout" - - // ErrCodeFileSystemAlreadyExists for service response error code - // "FileSystemAlreadyExists". - // - // Returned if the file system you are trying to create already exists, with - // the creation token you provided. - ErrCodeFileSystemAlreadyExists = "FileSystemAlreadyExists" - - // ErrCodeFileSystemInUse for service response error code - // "FileSystemInUse". - // - // Returned if a file system has mount targets. - ErrCodeFileSystemInUse = "FileSystemInUse" - - // ErrCodeFileSystemLimitExceeded for service response error code - // "FileSystemLimitExceeded". - // - // Returned if the Amazon Web Services account has already created the maximum - // number of file systems allowed per account. - ErrCodeFileSystemLimitExceeded = "FileSystemLimitExceeded" - - // ErrCodeFileSystemNotFound for service response error code - // "FileSystemNotFound". - // - // Returned if the specified FileSystemId value doesn't exist in the requester's - // Amazon Web Services account. - ErrCodeFileSystemNotFound = "FileSystemNotFound" - - // ErrCodeIncorrectFileSystemLifeCycleState for service response error code - // "IncorrectFileSystemLifeCycleState". - // - // Returned if the file system's lifecycle state is not "available". - ErrCodeIncorrectFileSystemLifeCycleState = "IncorrectFileSystemLifeCycleState" - - // ErrCodeIncorrectMountTargetState for service response error code - // "IncorrectMountTargetState". - // - // Returned if the mount target is not in the correct state for the operation. - ErrCodeIncorrectMountTargetState = "IncorrectMountTargetState" - - // ErrCodeInsufficientThroughputCapacity for service response error code - // "InsufficientThroughputCapacity". - // - // Returned if there's not enough capacity to provision additional throughput. - // This value might be returned when you try to create a file system in provisioned - // throughput mode, when you attempt to increase the provisioned throughput - // of an existing file system, or when you attempt to change an existing file - // system from Bursting Throughput to Provisioned Throughput mode. Try again - // later. - ErrCodeInsufficientThroughputCapacity = "InsufficientThroughputCapacity" - - // ErrCodeInternalServerError for service response error code - // "InternalServerError". - // - // Returned if an error occurred on the server side. - ErrCodeInternalServerError = "InternalServerError" - - // ErrCodeInvalidPolicyException for service response error code - // "InvalidPolicyException". - // - // Returned if the FileSystemPolicy is malformed or contains an error such as - // a parameter value that is not valid or a missing required parameter. Returned - // in the case of a policy lockout safety check error. - ErrCodeInvalidPolicyException = "InvalidPolicyException" - - // ErrCodeIpAddressInUse for service response error code - // "IpAddressInUse". - // - // Returned if the request specified an IpAddress that is already in use in - // the subnet. - ErrCodeIpAddressInUse = "IpAddressInUse" - - // ErrCodeMountTargetConflict for service response error code - // "MountTargetConflict". - // - // Returned if the mount target would violate one of the specified restrictions - // based on the file system's existing mount targets. - ErrCodeMountTargetConflict = "MountTargetConflict" - - // ErrCodeMountTargetNotFound for service response error code - // "MountTargetNotFound". - // - // Returned if there is no mount target with the specified ID found in the caller's - // Amazon Web Services account. - ErrCodeMountTargetNotFound = "MountTargetNotFound" - - // ErrCodeNetworkInterfaceLimitExceeded for service response error code - // "NetworkInterfaceLimitExceeded". - // - // The calling account has reached the limit for elastic network interfaces - // for the specific Amazon Web Services Region. Either delete some network interfaces - // or request that the account quota be raised. For more information, see Amazon - // VPC Quotas (https://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Appendix_Limits.html) - // in the Amazon VPC User Guide (see the Network interfaces per Region entry - // in the Network interfaces table). - ErrCodeNetworkInterfaceLimitExceeded = "NetworkInterfaceLimitExceeded" - - // ErrCodeNoFreeAddressesInSubnet for service response error code - // "NoFreeAddressesInSubnet". - // - // Returned if IpAddress was not specified in the request and there are no free - // IP addresses in the subnet. - ErrCodeNoFreeAddressesInSubnet = "NoFreeAddressesInSubnet" - - // ErrCodePolicyNotFound for service response error code - // "PolicyNotFound". - // - // Returned if the default file system policy is in effect for the EFS file - // system specified. - ErrCodePolicyNotFound = "PolicyNotFound" - - // ErrCodeReplicationAlreadyExists for service response error code - // "ReplicationAlreadyExists". - // - // Returned if the file system is already included in a replication configuration.> - ErrCodeReplicationAlreadyExists = "ReplicationAlreadyExists" - - // ErrCodeReplicationNotFound for service response error code - // "ReplicationNotFound". - // - // Returned if the specified file system does not have a replication configuration. - ErrCodeReplicationNotFound = "ReplicationNotFound" - - // ErrCodeSecurityGroupLimitExceeded for service response error code - // "SecurityGroupLimitExceeded". - // - // Returned if the size of SecurityGroups specified in the request is greater - // than five. - ErrCodeSecurityGroupLimitExceeded = "SecurityGroupLimitExceeded" - - // ErrCodeSecurityGroupNotFound for service response error code - // "SecurityGroupNotFound". - // - // Returned if one of the specified security groups doesn't exist in the subnet's - // virtual private cloud (VPC). - ErrCodeSecurityGroupNotFound = "SecurityGroupNotFound" - - // ErrCodeSubnetNotFound for service response error code - // "SubnetNotFound". - // - // Returned if there is no subnet with ID SubnetId provided in the request. - ErrCodeSubnetNotFound = "SubnetNotFound" - - // ErrCodeThrottlingException for service response error code - // "ThrottlingException". - // - // Returned when the CreateAccessPoint API action is called too quickly and - // the number of Access Points on the file system is nearing the limit of 120 - // (https://docs.aws.amazon.com/efs/latest/ug/limits.html#limits-efs-resources-per-account-per-region). - ErrCodeThrottlingException = "ThrottlingException" - - // ErrCodeThroughputLimitExceeded for service response error code - // "ThroughputLimitExceeded". - // - // Returned if the throughput mode or amount of provisioned throughput can't - // be changed because the throughput limit of 1024 MiB/s has been reached. - ErrCodeThroughputLimitExceeded = "ThroughputLimitExceeded" - - // ErrCodeTooManyRequests for service response error code - // "TooManyRequests". - // - // Returned if you don’t wait at least 24 hours before either changing the - // throughput mode, or decreasing the Provisioned Throughput value. - ErrCodeTooManyRequests = "TooManyRequests" - - // ErrCodeUnsupportedAvailabilityZone for service response error code - // "UnsupportedAvailabilityZone". - // - // Returned if the requested Amazon EFS functionality is not available in the - // specified Availability Zone. - ErrCodeUnsupportedAvailabilityZone = "UnsupportedAvailabilityZone" - - // ErrCodeValidationException for service response error code - // "ValidationException". - // - // Returned if the Backup service is not available in the Amazon Web Services - // Region in which the request was made. - ErrCodeValidationException = "ValidationException" -) - -var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ - "AccessPointAlreadyExists": newErrorAccessPointAlreadyExists, - "AccessPointLimitExceeded": newErrorAccessPointLimitExceeded, - "AccessPointNotFound": newErrorAccessPointNotFound, - "AvailabilityZonesMismatch": newErrorAvailabilityZonesMismatch, - "BadRequest": newErrorBadRequest, - "ConflictException": newErrorConflictException, - "DependencyTimeout": newErrorDependencyTimeout, - "FileSystemAlreadyExists": newErrorFileSystemAlreadyExists, - "FileSystemInUse": newErrorFileSystemInUse, - "FileSystemLimitExceeded": newErrorFileSystemLimitExceeded, - "FileSystemNotFound": newErrorFileSystemNotFound, - "IncorrectFileSystemLifeCycleState": newErrorIncorrectFileSystemLifeCycleState, - "IncorrectMountTargetState": newErrorIncorrectMountTargetState, - "InsufficientThroughputCapacity": newErrorInsufficientThroughputCapacity, - "InternalServerError": newErrorInternalServerError, - "InvalidPolicyException": newErrorInvalidPolicyException, - "IpAddressInUse": newErrorIpAddressInUse, - "MountTargetConflict": newErrorMountTargetConflict, - "MountTargetNotFound": newErrorMountTargetNotFound, - "NetworkInterfaceLimitExceeded": newErrorNetworkInterfaceLimitExceeded, - "NoFreeAddressesInSubnet": newErrorNoFreeAddressesInSubnet, - "PolicyNotFound": newErrorPolicyNotFound, - "ReplicationAlreadyExists": newErrorReplicationAlreadyExists, - "ReplicationNotFound": newErrorReplicationNotFound, - "SecurityGroupLimitExceeded": newErrorSecurityGroupLimitExceeded, - "SecurityGroupNotFound": newErrorSecurityGroupNotFound, - "SubnetNotFound": newErrorSubnetNotFound, - "ThrottlingException": newErrorThrottlingException, - "ThroughputLimitExceeded": newErrorThroughputLimitExceeded, - "TooManyRequests": newErrorTooManyRequests, - "UnsupportedAvailabilityZone": newErrorUnsupportedAvailabilityZone, - "ValidationException": newErrorValidationException, -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/efs/service.go b/vendor/github.com/aws/aws-sdk-go/service/efs/service.go deleted file mode 100644 index 4a134d7ff4..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/efs/service.go +++ /dev/null @@ -1,107 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package efs - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/restjson" -) - -// EFS provides the API operation methods for making requests to -// Amazon Elastic File System. See this package's package overview docs -// for details on the service. -// -// EFS methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type EFS struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "elasticfilesystem" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "EFS" // ServiceID is a unique identifier of a specific service. -) - -// New creates a new instance of the EFS client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// -// mySession := session.Must(session.NewSession()) -// -// // Create a EFS client from just a session. -// svc := efs.New(mySession) -// -// // Create a EFS client with additional configuration -// svc := efs.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *EFS { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = EndpointsID - // No Fallback - } - return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *EFS { - svc := &EFS{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - PartitionID: partitionID, - Endpoint: endpoint, - APIVersion: "2015-02-01", - ResolvedRegion: resolvedRegion, - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(restjson.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(restjson.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(restjson.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed( - protocol.NewUnmarshalErrorHandler(restjson.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), - ) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a EFS operation and runs any -// custom request initialization. -func (c *EFS) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/api.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/api.go deleted file mode 100644 index b9eb411c4a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/api.go +++ /dev/null @@ -1,3032 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package resourcegroupstaggingapi - -import ( - "fmt" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/awsutil" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -const opDescribeReportCreation = "DescribeReportCreation" - -// DescribeReportCreationRequest generates a "aws/request.Request" representing the -// client's request for the DescribeReportCreation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See DescribeReportCreation for more information on using the DescribeReportCreation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the DescribeReportCreationRequest method. -// req, resp := client.DescribeReportCreationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/DescribeReportCreation -func (c *ResourceGroupsTaggingAPI) DescribeReportCreationRequest(input *DescribeReportCreationInput) (req *request.Request, output *DescribeReportCreationOutput) { - op := &request.Operation{ - Name: opDescribeReportCreation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeReportCreationInput{} - } - - output = &DescribeReportCreationOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeReportCreation API operation for AWS Resource Groups Tagging API. -// -// Describes the status of the StartReportCreation operation. -// -// You can call this operation only from the organization's management account -// and from the us-east-1 Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups Tagging API's -// API operation DescribeReportCreation for usage and error information. -// -// Returned Error Types: -// -// - ConstraintViolationException -// The request was denied because performing this operation violates a constraint. -// -// Some of the reasons in the following list might not apply to this specific -// operation. -// -// - You must meet the prerequisites for using tag policies. For information, -// see Prerequisites and Permissions for Using Tag Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html) -// in the Organizations User Guide. -// -// - You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com) -// to integrate with Organizations For information, see EnableAWSServiceAccess -// (https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html). -// -// - You must have a tag policy attached to the organization root, an OU, -// or an account. -// -// - InternalServiceException -// The request processing failed because of an unknown error, exception, or -// failure. You can retry the request. -// -// - InvalidParameterException -// This error indicates one of the following: -// -// - A parameter is missing. -// -// - A malformed string was supplied for the request parameter. -// -// - An out-of-range value was supplied for the request parameter. -// -// - The target ID is invalid, unsupported, or doesn't exist. -// -// - You can't access the Amazon S3 bucket for report storage. For more information, -// see Additional Requirements for Organization-wide Tag Compliance Reports -// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) -// in the Organizations User Guide. -// -// - ThrottledException -// The request was denied to limit the frequency of submitted requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/DescribeReportCreation -func (c *ResourceGroupsTaggingAPI) DescribeReportCreation(input *DescribeReportCreationInput) (*DescribeReportCreationOutput, error) { - req, out := c.DescribeReportCreationRequest(input) - return out, req.Send() -} - -// DescribeReportCreationWithContext is the same as DescribeReportCreation with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeReportCreation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) DescribeReportCreationWithContext(ctx aws.Context, input *DescribeReportCreationInput, opts ...request.Option) (*DescribeReportCreationOutput, error) { - req, out := c.DescribeReportCreationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetComplianceSummary = "GetComplianceSummary" - -// GetComplianceSummaryRequest generates a "aws/request.Request" representing the -// client's request for the GetComplianceSummary operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetComplianceSummary for more information on using the GetComplianceSummary -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetComplianceSummaryRequest method. -// req, resp := client.GetComplianceSummaryRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetComplianceSummary -func (c *ResourceGroupsTaggingAPI) GetComplianceSummaryRequest(input *GetComplianceSummaryInput) (req *request.Request, output *GetComplianceSummaryOutput) { - op := &request.Operation{ - Name: opGetComplianceSummary, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PaginationToken"}, - OutputTokens: []string{"PaginationToken"}, - LimitToken: "MaxResults", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetComplianceSummaryInput{} - } - - output = &GetComplianceSummaryOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetComplianceSummary API operation for AWS Resource Groups Tagging API. -// -// Returns a table that shows counts of resources that are noncompliant with -// their tag policies. -// -// For more information on tag policies, see Tag Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the Organizations User Guide. -// -// You can call this operation only from the organization's management account -// and from the us-east-1 Region. -// -// This operation supports pagination, where the response can be sent in multiple -// pages. You should check the PaginationToken response parameter to determine -// if there are additional results available to return. Repeat the query, passing -// the PaginationToken response parameter value as an input to the next request -// until you recieve a null value. A null value for PaginationToken indicates -// that there are no more results waiting to be returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups Tagging API's -// API operation GetComplianceSummary for usage and error information. -// -// Returned Error Types: -// -// - ConstraintViolationException -// The request was denied because performing this operation violates a constraint. -// -// Some of the reasons in the following list might not apply to this specific -// operation. -// -// - You must meet the prerequisites for using tag policies. For information, -// see Prerequisites and Permissions for Using Tag Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html) -// in the Organizations User Guide. -// -// - You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com) -// to integrate with Organizations For information, see EnableAWSServiceAccess -// (https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html). -// -// - You must have a tag policy attached to the organization root, an OU, -// or an account. -// -// - InternalServiceException -// The request processing failed because of an unknown error, exception, or -// failure. You can retry the request. -// -// - InvalidParameterException -// This error indicates one of the following: -// -// - A parameter is missing. -// -// - A malformed string was supplied for the request parameter. -// -// - An out-of-range value was supplied for the request parameter. -// -// - The target ID is invalid, unsupported, or doesn't exist. -// -// - You can't access the Amazon S3 bucket for report storage. For more information, -// see Additional Requirements for Organization-wide Tag Compliance Reports -// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) -// in the Organizations User Guide. -// -// - ThrottledException -// The request was denied to limit the frequency of submitted requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetComplianceSummary -func (c *ResourceGroupsTaggingAPI) GetComplianceSummary(input *GetComplianceSummaryInput) (*GetComplianceSummaryOutput, error) { - req, out := c.GetComplianceSummaryRequest(input) - return out, req.Send() -} - -// GetComplianceSummaryWithContext is the same as GetComplianceSummary with the addition of -// the ability to pass a context and additional request options. -// -// See GetComplianceSummary for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) GetComplianceSummaryWithContext(ctx aws.Context, input *GetComplianceSummaryInput, opts ...request.Option) (*GetComplianceSummaryOutput, error) { - req, out := c.GetComplianceSummaryRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetComplianceSummaryPages iterates over the pages of a GetComplianceSummary operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetComplianceSummary method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetComplianceSummary operation. -// pageNum := 0 -// err := client.GetComplianceSummaryPages(params, -// func(page *resourcegroupstaggingapi.GetComplianceSummaryOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ResourceGroupsTaggingAPI) GetComplianceSummaryPages(input *GetComplianceSummaryInput, fn func(*GetComplianceSummaryOutput, bool) bool) error { - return c.GetComplianceSummaryPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetComplianceSummaryPagesWithContext same as GetComplianceSummaryPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) GetComplianceSummaryPagesWithContext(ctx aws.Context, input *GetComplianceSummaryInput, fn func(*GetComplianceSummaryOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetComplianceSummaryInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetComplianceSummaryRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetComplianceSummaryOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetResources = "GetResources" - -// GetResourcesRequest generates a "aws/request.Request" representing the -// client's request for the GetResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetResources for more information on using the GetResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetResourcesRequest method. -// req, resp := client.GetResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetResources -func (c *ResourceGroupsTaggingAPI) GetResourcesRequest(input *GetResourcesInput) (req *request.Request, output *GetResourcesOutput) { - op := &request.Operation{ - Name: opGetResources, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PaginationToken"}, - OutputTokens: []string{"PaginationToken"}, - LimitToken: "ResourcesPerPage", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetResourcesInput{} - } - - output = &GetResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResources API operation for AWS Resource Groups Tagging API. -// -// Returns all the tagged or previously tagged resources that are located in -// the specified Amazon Web Services Region for the account. -// -// Depending on what information you want returned, you can also specify the -// following: -// -// - Filters that specify what tags and resource types you want returned. -// The response includes all tags that are associated with the requested -// resources. -// -// - Information about compliance with the account's effective tag policy. -// For more information on tag policies, see Tag Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies.html) -// in the Organizations User Guide. -// -// This operation supports pagination, where the response can be sent in multiple -// pages. You should check the PaginationToken response parameter to determine -// if there are additional results available to return. Repeat the query, passing -// the PaginationToken response parameter value as an input to the next request -// until you recieve a null value. A null value for PaginationToken indicates -// that there are no more results waiting to be returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups Tagging API's -// API operation GetResources for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// This error indicates one of the following: -// -// - A parameter is missing. -// -// - A malformed string was supplied for the request parameter. -// -// - An out-of-range value was supplied for the request parameter. -// -// - The target ID is invalid, unsupported, or doesn't exist. -// -// - You can't access the Amazon S3 bucket for report storage. For more information, -// see Additional Requirements for Organization-wide Tag Compliance Reports -// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) -// in the Organizations User Guide. -// -// - ThrottledException -// The request was denied to limit the frequency of submitted requests. -// -// - InternalServiceException -// The request processing failed because of an unknown error, exception, or -// failure. You can retry the request. -// -// - PaginationTokenExpiredException -// A PaginationToken is valid for a maximum of 15 minutes. Your request was -// denied because the specified PaginationToken has expired. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetResources -func (c *ResourceGroupsTaggingAPI) GetResources(input *GetResourcesInput) (*GetResourcesOutput, error) { - req, out := c.GetResourcesRequest(input) - return out, req.Send() -} - -// GetResourcesWithContext is the same as GetResources with the addition of -// the ability to pass a context and additional request options. -// -// See GetResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) GetResourcesWithContext(ctx aws.Context, input *GetResourcesInput, opts ...request.Option) (*GetResourcesOutput, error) { - req, out := c.GetResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetResourcesPages iterates over the pages of a GetResources operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetResources method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetResources operation. -// pageNum := 0 -// err := client.GetResourcesPages(params, -// func(page *resourcegroupstaggingapi.GetResourcesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ResourceGroupsTaggingAPI) GetResourcesPages(input *GetResourcesInput, fn func(*GetResourcesOutput, bool) bool) error { - return c.GetResourcesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetResourcesPagesWithContext same as GetResourcesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) GetResourcesPagesWithContext(ctx aws.Context, input *GetResourcesInput, fn func(*GetResourcesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetResourcesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetResourcesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetResourcesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetTagKeys = "GetTagKeys" - -// GetTagKeysRequest generates a "aws/request.Request" representing the -// client's request for the GetTagKeys operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTagKeys for more information on using the GetTagKeys -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetTagKeysRequest method. -// req, resp := client.GetTagKeysRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagKeys -func (c *ResourceGroupsTaggingAPI) GetTagKeysRequest(input *GetTagKeysInput) (req *request.Request, output *GetTagKeysOutput) { - op := &request.Operation{ - Name: opGetTagKeys, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PaginationToken"}, - OutputTokens: []string{"PaginationToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetTagKeysInput{} - } - - output = &GetTagKeysOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTagKeys API operation for AWS Resource Groups Tagging API. -// -// Returns all tag keys currently in use in the specified Amazon Web Services -// Region for the calling account. -// -// This operation supports pagination, where the response can be sent in multiple -// pages. You should check the PaginationToken response parameter to determine -// if there are additional results available to return. Repeat the query, passing -// the PaginationToken response parameter value as an input to the next request -// until you recieve a null value. A null value for PaginationToken indicates -// that there are no more results waiting to be returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups Tagging API's -// API operation GetTagKeys for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// This error indicates one of the following: -// -// - A parameter is missing. -// -// - A malformed string was supplied for the request parameter. -// -// - An out-of-range value was supplied for the request parameter. -// -// - The target ID is invalid, unsupported, or doesn't exist. -// -// - You can't access the Amazon S3 bucket for report storage. For more information, -// see Additional Requirements for Organization-wide Tag Compliance Reports -// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) -// in the Organizations User Guide. -// -// - ThrottledException -// The request was denied to limit the frequency of submitted requests. -// -// - InternalServiceException -// The request processing failed because of an unknown error, exception, or -// failure. You can retry the request. -// -// - PaginationTokenExpiredException -// A PaginationToken is valid for a maximum of 15 minutes. Your request was -// denied because the specified PaginationToken has expired. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagKeys -func (c *ResourceGroupsTaggingAPI) GetTagKeys(input *GetTagKeysInput) (*GetTagKeysOutput, error) { - req, out := c.GetTagKeysRequest(input) - return out, req.Send() -} - -// GetTagKeysWithContext is the same as GetTagKeys with the addition of -// the ability to pass a context and additional request options. -// -// See GetTagKeys for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) GetTagKeysWithContext(ctx aws.Context, input *GetTagKeysInput, opts ...request.Option) (*GetTagKeysOutput, error) { - req, out := c.GetTagKeysRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetTagKeysPages iterates over the pages of a GetTagKeys operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetTagKeys method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetTagKeys operation. -// pageNum := 0 -// err := client.GetTagKeysPages(params, -// func(page *resourcegroupstaggingapi.GetTagKeysOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ResourceGroupsTaggingAPI) GetTagKeysPages(input *GetTagKeysInput, fn func(*GetTagKeysOutput, bool) bool) error { - return c.GetTagKeysPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetTagKeysPagesWithContext same as GetTagKeysPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) GetTagKeysPagesWithContext(ctx aws.Context, input *GetTagKeysInput, fn func(*GetTagKeysOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetTagKeysInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetTagKeysRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetTagKeysOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetTagValues = "GetTagValues" - -// GetTagValuesRequest generates a "aws/request.Request" representing the -// client's request for the GetTagValues operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See GetTagValues for more information on using the GetTagValues -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the GetTagValuesRequest method. -// req, resp := client.GetTagValuesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagValues -func (c *ResourceGroupsTaggingAPI) GetTagValuesRequest(input *GetTagValuesInput) (req *request.Request, output *GetTagValuesOutput) { - op := &request.Operation{ - Name: opGetTagValues, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"PaginationToken"}, - OutputTokens: []string{"PaginationToken"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &GetTagValuesInput{} - } - - output = &GetTagValuesOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTagValues API operation for AWS Resource Groups Tagging API. -// -// Returns all tag values for the specified key that are used in the specified -// Amazon Web Services Region for the calling account. -// -// This operation supports pagination, where the response can be sent in multiple -// pages. You should check the PaginationToken response parameter to determine -// if there are additional results available to return. Repeat the query, passing -// the PaginationToken response parameter value as an input to the next request -// until you recieve a null value. A null value for PaginationToken indicates -// that there are no more results waiting to be returned. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups Tagging API's -// API operation GetTagValues for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// This error indicates one of the following: -// -// - A parameter is missing. -// -// - A malformed string was supplied for the request parameter. -// -// - An out-of-range value was supplied for the request parameter. -// -// - The target ID is invalid, unsupported, or doesn't exist. -// -// - You can't access the Amazon S3 bucket for report storage. For more information, -// see Additional Requirements for Organization-wide Tag Compliance Reports -// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) -// in the Organizations User Guide. -// -// - ThrottledException -// The request was denied to limit the frequency of submitted requests. -// -// - InternalServiceException -// The request processing failed because of an unknown error, exception, or -// failure. You can retry the request. -// -// - PaginationTokenExpiredException -// A PaginationToken is valid for a maximum of 15 minutes. Your request was -// denied because the specified PaginationToken has expired. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/GetTagValues -func (c *ResourceGroupsTaggingAPI) GetTagValues(input *GetTagValuesInput) (*GetTagValuesOutput, error) { - req, out := c.GetTagValuesRequest(input) - return out, req.Send() -} - -// GetTagValuesWithContext is the same as GetTagValues with the addition of -// the ability to pass a context and additional request options. -// -// See GetTagValues for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) GetTagValuesWithContext(ctx aws.Context, input *GetTagValuesInput, opts ...request.Option) (*GetTagValuesOutput, error) { - req, out := c.GetTagValuesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// GetTagValuesPages iterates over the pages of a GetTagValues operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See GetTagValues method for more information on how to use this operation. -// -// Note: This operation can generate multiple requests to a service. -// -// // Example iterating over at most 3 pages of a GetTagValues operation. -// pageNum := 0 -// err := client.GetTagValuesPages(params, -// func(page *resourcegroupstaggingapi.GetTagValuesOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ResourceGroupsTaggingAPI) GetTagValuesPages(input *GetTagValuesInput, fn func(*GetTagValuesOutput, bool) bool) error { - return c.GetTagValuesPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// GetTagValuesPagesWithContext same as GetTagValuesPages except -// it takes a Context and allows setting request options on the pages. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) GetTagValuesPagesWithContext(ctx aws.Context, input *GetTagValuesInput, fn func(*GetTagValuesOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *GetTagValuesInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.GetTagValuesRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*GetTagValuesOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opStartReportCreation = "StartReportCreation" - -// StartReportCreationRequest generates a "aws/request.Request" representing the -// client's request for the StartReportCreation operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See StartReportCreation for more information on using the StartReportCreation -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the StartReportCreationRequest method. -// req, resp := client.StartReportCreationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/StartReportCreation -func (c *ResourceGroupsTaggingAPI) StartReportCreationRequest(input *StartReportCreationInput) (req *request.Request, output *StartReportCreationOutput) { - op := &request.Operation{ - Name: opStartReportCreation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &StartReportCreationInput{} - } - - output = &StartReportCreationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// StartReportCreation API operation for AWS Resource Groups Tagging API. -// -// Generates a report that lists all tagged resources in the accounts across -// your organization and tells whether each resource is compliant with the effective -// tag policy. Compliance data is refreshed daily. The report is generated asynchronously. -// -// The generated report is saved to the following location: -// -// s3://example-bucket/AwsTagPolicies/o-exampleorgid/YYYY-MM-ddTHH:mm:ssZ/report.csv -// -// You can call this operation only from the organization's management account -// and from the us-east-1 Region. -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups Tagging API's -// API operation StartReportCreation for usage and error information. -// -// Returned Error Types: -// -// - ConcurrentModificationException -// The target of the operation is currently being modified by a different request. -// Try again later. -// -// - ConstraintViolationException -// The request was denied because performing this operation violates a constraint. -// -// Some of the reasons in the following list might not apply to this specific -// operation. -// -// - You must meet the prerequisites for using tag policies. For information, -// see Prerequisites and Permissions for Using Tag Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html) -// in the Organizations User Guide. -// -// - You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com) -// to integrate with Organizations For information, see EnableAWSServiceAccess -// (https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html). -// -// - You must have a tag policy attached to the organization root, an OU, -// or an account. -// -// - InternalServiceException -// The request processing failed because of an unknown error, exception, or -// failure. You can retry the request. -// -// - InvalidParameterException -// This error indicates one of the following: -// -// - A parameter is missing. -// -// - A malformed string was supplied for the request parameter. -// -// - An out-of-range value was supplied for the request parameter. -// -// - The target ID is invalid, unsupported, or doesn't exist. -// -// - You can't access the Amazon S3 bucket for report storage. For more information, -// see Additional Requirements for Organization-wide Tag Compliance Reports -// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) -// in the Organizations User Guide. -// -// - ThrottledException -// The request was denied to limit the frequency of submitted requests. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/StartReportCreation -func (c *ResourceGroupsTaggingAPI) StartReportCreation(input *StartReportCreationInput) (*StartReportCreationOutput, error) { - req, out := c.StartReportCreationRequest(input) - return out, req.Send() -} - -// StartReportCreationWithContext is the same as StartReportCreation with the addition of -// the ability to pass a context and additional request options. -// -// See StartReportCreation for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) StartReportCreationWithContext(ctx aws.Context, input *StartReportCreationInput, opts ...request.Option) (*StartReportCreationOutput, error) { - req, out := c.StartReportCreationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opTagResources = "TagResources" - -// TagResourcesRequest generates a "aws/request.Request" representing the -// client's request for the TagResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See TagResources for more information on using the TagResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the TagResourcesRequest method. -// req, resp := client.TagResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/TagResources -func (c *ResourceGroupsTaggingAPI) TagResourcesRequest(input *TagResourcesInput) (req *request.Request, output *TagResourcesOutput) { - op := &request.Operation{ - Name: opTagResources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &TagResourcesInput{} - } - - output = &TagResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// TagResources API operation for AWS Resource Groups Tagging API. -// -// Applies one or more tags to the specified resources. Note the following: -// -// - Not all resources can have tags. For a list of services with resources -// that support tagging using this operation, see Services that support the -// Resource Groups Tagging API (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html). -// If the resource doesn't yet support this operation, the resource's service -// might support tagging using its own API operations. For more information, -// refer to the documentation for that service. -// -// - Each resource can have up to 50 tags. For other limits, see Tag Naming -// and Usage Conventions (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html#tag-conventions) -// in the Amazon Web Services General Reference. -// -// - You can only tag resources that are located in the specified Amazon -// Web Services Region for the Amazon Web Services account. -// -// - To add tags to a resource, you need the necessary permissions for the -// service that the resource belongs to as well as permissions for adding -// tags. For more information, see the documentation for each service. -// -// Do not store personally identifiable information (PII) or other confidential -// or sensitive information in tags. We use tags to provide you with billing -// and administration services. Tags are not intended to be used for private -// or sensitive data. -// -// # Minimum permissions -// -// In addition to the tag:TagResources permission required by this operation, -// you must also have the tagging permission defined by the service that created -// the resource. For example, to tag an Amazon EC2 instance using the TagResources -// operation, you must have both of the following permissions: -// -// - tag:TagResource -// -// - ec2:CreateTags -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups Tagging API's -// API operation TagResources for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// This error indicates one of the following: -// -// - A parameter is missing. -// -// - A malformed string was supplied for the request parameter. -// -// - An out-of-range value was supplied for the request parameter. -// -// - The target ID is invalid, unsupported, or doesn't exist. -// -// - You can't access the Amazon S3 bucket for report storage. For more information, -// see Additional Requirements for Organization-wide Tag Compliance Reports -// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) -// in the Organizations User Guide. -// -// - ThrottledException -// The request was denied to limit the frequency of submitted requests. -// -// - InternalServiceException -// The request processing failed because of an unknown error, exception, or -// failure. You can retry the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/TagResources -func (c *ResourceGroupsTaggingAPI) TagResources(input *TagResourcesInput) (*TagResourcesOutput, error) { - req, out := c.TagResourcesRequest(input) - return out, req.Send() -} - -// TagResourcesWithContext is the same as TagResources with the addition of -// the ability to pass a context and additional request options. -// -// See TagResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) TagResourcesWithContext(ctx aws.Context, input *TagResourcesInput, opts ...request.Option) (*TagResourcesOutput, error) { - req, out := c.TagResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opUntagResources = "UntagResources" - -// UntagResourcesRequest generates a "aws/request.Request" representing the -// client's request for the UntagResources operation. The "output" return -// value will be populated with the request's response once the request completes -// successfully. -// -// Use "Send" method on the returned Request to send the API call to the service. -// the "output" return value is not valid until after Send returns without error. -// -// See UntagResources for more information on using the UntagResources -// API call, and error handling. -// -// This method is useful when you want to inject custom logic or configuration -// into the SDK's request lifecycle. Such as custom headers, or retry logic. -// -// // Example sending a request using the UntagResourcesRequest method. -// req, resp := client.UntagResourcesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/UntagResources -func (c *ResourceGroupsTaggingAPI) UntagResourcesRequest(input *UntagResourcesInput) (req *request.Request, output *UntagResourcesOutput) { - op := &request.Operation{ - Name: opUntagResources, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &UntagResourcesInput{} - } - - output = &UntagResourcesOutput{} - req = c.newRequest(op, input, output) - return -} - -// UntagResources API operation for AWS Resource Groups Tagging API. -// -// Removes the specified tags from the specified resources. When you specify -// a tag key, the action removes both that key and its associated value. The -// operation succeeds even if you attempt to remove tags from a resource that -// were already removed. Note the following: -// -// - To remove tags from a resource, you need the necessary permissions for -// the service that the resource belongs to as well as permissions for removing -// tags. For more information, see the documentation for the service whose -// resource you want to untag. -// -// - You can only tag resources that are located in the specified Amazon -// Web Services Region for the calling Amazon Web Services account. -// -// # Minimum permissions -// -// In addition to the tag:UntagResources permission required by this operation, -// you must also have the remove tags permission defined by the service that -// created the resource. For example, to remove the tags from an Amazon EC2 -// instance using the UntagResources operation, you must have both of the following -// permissions: -// -// - tag:UntagResource -// -// - ec2:DeleteTags -// -// Returns awserr.Error for service API and SDK errors. Use runtime type assertions -// with awserr.Error's Code and Message methods to get detailed information about -// the error. -// -// See the AWS API reference guide for AWS Resource Groups Tagging API's -// API operation UntagResources for usage and error information. -// -// Returned Error Types: -// -// - InvalidParameterException -// This error indicates one of the following: -// -// - A parameter is missing. -// -// - A malformed string was supplied for the request parameter. -// -// - An out-of-range value was supplied for the request parameter. -// -// - The target ID is invalid, unsupported, or doesn't exist. -// -// - You can't access the Amazon S3 bucket for report storage. For more information, -// see Additional Requirements for Organization-wide Tag Compliance Reports -// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) -// in the Organizations User Guide. -// -// - ThrottledException -// The request was denied to limit the frequency of submitted requests. -// -// - InternalServiceException -// The request processing failed because of an unknown error, exception, or -// failure. You can retry the request. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26/UntagResources -func (c *ResourceGroupsTaggingAPI) UntagResources(input *UntagResourcesInput) (*UntagResourcesOutput, error) { - req, out := c.UntagResourcesRequest(input) - return out, req.Send() -} - -// UntagResourcesWithContext is the same as UntagResources with the addition of -// the ability to pass a context and additional request options. -// -// See UntagResources for details on how to use this API operation. -// -// The context must be non-nil and will be used for request cancellation. If -// the context is nil a panic will occur. In the future the SDK may create -// sub-contexts for http.Requests. See https://golang.org/pkg/context/ -// for more information on using Contexts. -func (c *ResourceGroupsTaggingAPI) UntagResourcesWithContext(ctx aws.Context, input *UntagResourcesInput, opts ...request.Option) (*UntagResourcesOutput, error) { - req, out := c.UntagResourcesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Information that shows whether a resource is compliant with the effective -// tag policy, including details on any noncompliant tag keys. -type ComplianceDetails struct { - _ struct{} `type:"structure"` - - // Whether a resource is compliant with the effective tag policy. - ComplianceStatus *bool `type:"boolean"` - - // These are keys defined in the effective policy that are on the resource with - // either incorrect case treatment or noncompliant values. - KeysWithNoncompliantValues []*string `type:"list"` - - // These tag keys on the resource are noncompliant with the effective tag policy. - NoncompliantKeys []*string `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ComplianceDetails) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ComplianceDetails) GoString() string { - return s.String() -} - -// SetComplianceStatus sets the ComplianceStatus field's value. -func (s *ComplianceDetails) SetComplianceStatus(v bool) *ComplianceDetails { - s.ComplianceStatus = &v - return s -} - -// SetKeysWithNoncompliantValues sets the KeysWithNoncompliantValues field's value. -func (s *ComplianceDetails) SetKeysWithNoncompliantValues(v []*string) *ComplianceDetails { - s.KeysWithNoncompliantValues = v - return s -} - -// SetNoncompliantKeys sets the NoncompliantKeys field's value. -func (s *ComplianceDetails) SetNoncompliantKeys(v []*string) *ComplianceDetails { - s.NoncompliantKeys = v - return s -} - -// The target of the operation is currently being modified by a different request. -// Try again later. -type ConcurrentModificationException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConcurrentModificationException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConcurrentModificationException) GoString() string { - return s.String() -} - -func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { - return &ConcurrentModificationException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ConcurrentModificationException) Code() string { - return "ConcurrentModificationException" -} - -// Message returns the exception's message. -func (s *ConcurrentModificationException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ConcurrentModificationException) OrigErr() error { - return nil -} - -func (s *ConcurrentModificationException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ConcurrentModificationException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ConcurrentModificationException) RequestID() string { - return s.RespMetadata.RequestID -} - -// The request was denied because performing this operation violates a constraint. -// -// Some of the reasons in the following list might not apply to this specific -// operation. -// -// - You must meet the prerequisites for using tag policies. For information, -// see Prerequisites and Permissions for Using Tag Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html) -// in the Organizations User Guide. -// -// - You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com) -// to integrate with Organizations For information, see EnableAWSServiceAccess -// (https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html). -// -// - You must have a tag policy attached to the organization root, an OU, -// or an account. -type ConstraintViolationException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConstraintViolationException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ConstraintViolationException) GoString() string { - return s.String() -} - -func newErrorConstraintViolationException(v protocol.ResponseMetadata) error { - return &ConstraintViolationException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ConstraintViolationException) Code() string { - return "ConstraintViolationException" -} - -// Message returns the exception's message. -func (s *ConstraintViolationException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ConstraintViolationException) OrigErr() error { - return nil -} - -func (s *ConstraintViolationException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ConstraintViolationException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ConstraintViolationException) RequestID() string { - return s.RespMetadata.RequestID -} - -type DescribeReportCreationInput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeReportCreationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeReportCreationInput) GoString() string { - return s.String() -} - -type DescribeReportCreationOutput struct { - _ struct{} `type:"structure"` - - // Details of the common errors that all operations return. - ErrorMessage *string `type:"string"` - - // The path to the Amazon S3 bucket where the report was stored on creation. - S3Location *string `type:"string"` - - // Reports the status of the operation. - // - // The operation status can be one of the following: - // - // * RUNNING - Report creation is in progress. - // - // * SUCCEEDED - Report creation is complete. You can open the report from - // the Amazon S3 bucket that you specified when you ran StartReportCreation. - // - // * FAILED - Report creation timed out or the Amazon S3 bucket is not accessible. - // - // * NO REPORT - No report was generated in the last 90 days. - Status *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeReportCreationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s DescribeReportCreationOutput) GoString() string { - return s.String() -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *DescribeReportCreationOutput) SetErrorMessage(v string) *DescribeReportCreationOutput { - s.ErrorMessage = &v - return s -} - -// SetS3Location sets the S3Location field's value. -func (s *DescribeReportCreationOutput) SetS3Location(v string) *DescribeReportCreationOutput { - s.S3Location = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *DescribeReportCreationOutput) SetStatus(v string) *DescribeReportCreationOutput { - s.Status = &v - return s -} - -// Information about the errors that are returned for each failed resource. -// This information can include InternalServiceException and InvalidParameterException -// errors. It can also include any valid error code returned by the Amazon Web -// Services service that hosts the resource that the ARN key represents. -// -// The following are common error codes that you might receive from other Amazon -// Web Services services: -// -// - InternalServiceException – This can mean that the Resource Groups -// Tagging API didn't receive a response from another Amazon Web Services -// service. It can also mean that the resource type in the request is not -// supported by the Resource Groups Tagging API. In these cases, it's safe -// to retry the request and then call GetResources (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_GetResources.html) -// to verify the changes. -// -// - AccessDeniedException – This can mean that you need permission to -// call the tagging operations in the Amazon Web Services service that contains -// the resource. For example, to use the Resource Groups Tagging API to tag -// a Amazon CloudWatch alarm resource, you need permission to call both TagResources -// (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_TagResources.html) -// and TagResource (https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_TagResource.html) -// in the CloudWatch API. -// -// For more information on errors that are generated from other Amazon Web Services -// services, see the documentation for that service. -type FailureInfo struct { - _ struct{} `type:"structure"` - - // The code of the common error. Valid values include InternalServiceException, - // InvalidParameterException, and any valid error code returned by the Amazon - // Web Services service that hosts the resource that you want to tag. - ErrorCode *string `type:"string" enum:"ErrorCode"` - - // The message of the common error. - ErrorMessage *string `type:"string"` - - // The HTTP status code of the common error. - StatusCode *int64 `type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FailureInfo) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s FailureInfo) GoString() string { - return s.String() -} - -// SetErrorCode sets the ErrorCode field's value. -func (s *FailureInfo) SetErrorCode(v string) *FailureInfo { - s.ErrorCode = &v - return s -} - -// SetErrorMessage sets the ErrorMessage field's value. -func (s *FailureInfo) SetErrorMessage(v string) *FailureInfo { - s.ErrorMessage = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *FailureInfo) SetStatusCode(v int64) *FailureInfo { - s.StatusCode = &v - return s -} - -type GetComplianceSummaryInput struct { - _ struct{} `type:"structure"` - - // Specifies a list of attributes to group the counts of noncompliant resources - // by. If supplied, the counts are sorted by those attributes. - GroupBy []*string `type:"list" enum:"GroupByAttribute"` - - // Specifies the maximum number of results to be returned in each page. A query - // can return fewer than this maximum, even if there are more results still - // to return. You should always check the PaginationToken response value to - // see if there are more results. You can specify a minimum of 1 and a maximum - // value of 100. - MaxResults *int64 `min:"1" type:"integer"` - - // Specifies a PaginationToken response value from a previous request to indicate - // that you want the next page of results. Leave this parameter empty in your - // initial request. - PaginationToken *string `type:"string"` - - // Specifies a list of Amazon Web Services Regions to limit the output to. If - // you use this parameter, the count of returned noncompliant resources includes - // only resources in the specified Regions. - RegionFilters []*string `min:"1" type:"list"` - - // Specifies that you want the response to include information for only resources - // of the specified types. The format of each resource type is service[:resourceType]. - // For example, specifying a resource type of ec2 returns all Amazon EC2 resources - // (which includes EC2 instances). Specifying a resource type of ec2:instance - // returns only EC2 instances. - // - // The string for each service name and resource type is the same as that embedded - // in a resource's Amazon Resource Name (ARN). Consult the Amazon Web Services - // General Reference (https://docs.aws.amazon.com/general/latest/gr/) for the - // following: - // - // * For a list of service name strings, see Amazon Web Services Service - // Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#genref-aws-service-namespaces). - // - // * For resource type strings, see Example ARNs (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html#arns-syntax). - // - // * For more information about ARNs, see Amazon Resource Names (ARNs) and - // Amazon Web Services Service Namespaces (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html). - // - // You can specify multiple resource types by using a comma separated array. - // The array can include up to 100 items. Note that the length constraint requirement - // applies to each resource type filter. - ResourceTypeFilters []*string `type:"list"` - - // Specifies that you want the response to include information for only resources - // that have tags with the specified tag keys. If you use this parameter, the - // count of returned noncompliant resources includes only resources that have - // the specified tag keys. - TagKeyFilters []*string `min:"1" type:"list"` - - // Specifies target identifiers (usually, specific account IDs) to limit the - // output by. If you use this parameter, the count of returned noncompliant - // resources includes only resources with the specified target IDs. - TargetIdFilters []*string `min:"1" type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetComplianceSummaryInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetComplianceSummaryInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetComplianceSummaryInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetComplianceSummaryInput"} - if s.MaxResults != nil && *s.MaxResults < 1 { - invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) - } - if s.RegionFilters != nil && len(s.RegionFilters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("RegionFilters", 1)) - } - if s.TagKeyFilters != nil && len(s.TagKeyFilters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeyFilters", 1)) - } - if s.TargetIdFilters != nil && len(s.TargetIdFilters) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TargetIdFilters", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetGroupBy sets the GroupBy field's value. -func (s *GetComplianceSummaryInput) SetGroupBy(v []*string) *GetComplianceSummaryInput { - s.GroupBy = v - return s -} - -// SetMaxResults sets the MaxResults field's value. -func (s *GetComplianceSummaryInput) SetMaxResults(v int64) *GetComplianceSummaryInput { - s.MaxResults = &v - return s -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *GetComplianceSummaryInput) SetPaginationToken(v string) *GetComplianceSummaryInput { - s.PaginationToken = &v - return s -} - -// SetRegionFilters sets the RegionFilters field's value. -func (s *GetComplianceSummaryInput) SetRegionFilters(v []*string) *GetComplianceSummaryInput { - s.RegionFilters = v - return s -} - -// SetResourceTypeFilters sets the ResourceTypeFilters field's value. -func (s *GetComplianceSummaryInput) SetResourceTypeFilters(v []*string) *GetComplianceSummaryInput { - s.ResourceTypeFilters = v - return s -} - -// SetTagKeyFilters sets the TagKeyFilters field's value. -func (s *GetComplianceSummaryInput) SetTagKeyFilters(v []*string) *GetComplianceSummaryInput { - s.TagKeyFilters = v - return s -} - -// SetTargetIdFilters sets the TargetIdFilters field's value. -func (s *GetComplianceSummaryInput) SetTargetIdFilters(v []*string) *GetComplianceSummaryInput { - s.TargetIdFilters = v - return s -} - -type GetComplianceSummaryOutput struct { - _ struct{} `type:"structure"` - - // A string that indicates that there is more data available than this response - // contains. To receive the next part of the response, specify this response - // value as the PaginationToken value in the request for the next page. - PaginationToken *string `type:"string"` - - // A table that shows counts of noncompliant resources. - SummaryList []*Summary `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetComplianceSummaryOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetComplianceSummaryOutput) GoString() string { - return s.String() -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *GetComplianceSummaryOutput) SetPaginationToken(v string) *GetComplianceSummaryOutput { - s.PaginationToken = &v - return s -} - -// SetSummaryList sets the SummaryList field's value. -func (s *GetComplianceSummaryOutput) SetSummaryList(v []*Summary) *GetComplianceSummaryOutput { - s.SummaryList = v - return s -} - -type GetResourcesInput struct { - _ struct{} `type:"structure"` - - // Specifies whether to exclude resources that are compliant with the tag policy. - // Set this to true if you are interested in retrieving information on noncompliant - // resources only. - // - // You can use this parameter only if the IncludeComplianceDetails parameter - // is also set to true. - ExcludeCompliantResources *bool `type:"boolean"` - - // Specifies whether to include details regarding the compliance with the effective - // tag policy. Set this to true to determine whether resources are compliant - // with the tag policy and to get details. - IncludeComplianceDetails *bool `type:"boolean"` - - // Specifies a PaginationToken response value from a previous request to indicate - // that you want the next page of results. Leave this parameter empty in your - // initial request. - PaginationToken *string `type:"string"` - - // Specifies a list of ARNs of resources for which you want to retrieve tag - // data. You can't specify both this parameter and any of the pagination parameters - // (ResourcesPerPage, TagsPerPage, PaginationToken) in the same request. If - // you specify both, you get an Invalid Parameter exception. - // - // If a resource specified by this parameter doesn't exist, it doesn't generate - // an error; it simply isn't included in the response. - // - // An ARN (Amazon Resource Name) uniquely identifies a resource. For more information, - // see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces - // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - ResourceARNList []*string `min:"1" type:"list"` - - // Specifies the resource types that you want included in the response. The - // format of each resource type is service[:resourceType]. For example, specifying - // a resource type of ec2 returns all Amazon EC2 resources (which includes EC2 - // instances). Specifying a resource type of ec2:instance returns only EC2 instances. - // - // The string for each service name and resource type is the same as that embedded - // in a resource's Amazon Resource Name (ARN). For the list of services whose - // resources you can use in this parameter, see Services that support the Resource - // Groups Tagging API (https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html). - // - // You can specify multiple resource types by using an array. The array can - // include up to 100 items. Note that the length constraint requirement applies - // to each resource type filter. For example, the following string would limit - // the response to only Amazon EC2 instances, Amazon S3 buckets, or any Audit - // Manager resource: - // - // ec2:instance,s3:bucket,auditmanager - ResourceTypeFilters []*string `type:"list"` - - // Specifies the maximum number of results to be returned in each page. A query - // can return fewer than this maximum, even if there are more results still - // to return. You should always check the PaginationToken response value to - // see if there are more results. You can specify a minimum of 1 and a maximum - // value of 100. - ResourcesPerPage *int64 `type:"integer"` - - // Specifies a list of TagFilters (keys and values) to restrict the output to - // only those resources that have tags with the specified keys and, if included, - // the specified values. Each TagFilter must contain a key with values optional. - // A request can include up to 50 keys, and each key can include up to 20 values. - // - // Note the following when deciding how to use TagFilters: - // - // * If you don't specify a TagFilter, the response includes all resources - // that are currently tagged or ever had a tag. Resources that currently - // don't have tags are shown with an empty tag set, like this: "Tags": []. - // - // * If you specify more than one filter in a single request, the response - // returns only those resources that satisfy all filters. - // - // * If you specify a filter that contains more than one value for a key, - // the response returns resources that match any of the specified values - // for that key. - // - // * If you don't specify a value for a key, the response returns all resources - // that are tagged with that key, with any or no value. For example, for - // the following filters: filter1= {keyA,{value1}}, filter2={keyB,{value2,value3,value4}}, - // filter3= {keyC}: GetResources({filter1}) returns resources tagged with - // key1=value1 GetResources({filter2}) returns resources tagged with key2=value2 - // or key2=value3 or key2=value4 GetResources({filter3}) returns resources - // tagged with any tag with the key key3, and with any or no value GetResources({filter1,filter2,filter3}) - // returns resources tagged with (key1=value1) and (key2=value2 or key2=value3 - // or key2=value4) and (key3, any or no value) - TagFilters []*TagFilter `type:"list"` - - // Amazon Web Services recommends using ResourcesPerPage instead of this parameter. - // - // A limit that restricts the number of tags (key and value pairs) returned - // by GetResources in paginated output. A resource with no tags is counted as - // having one tag (one key and value pair). - // - // GetResources does not split a resource and its associated tags across pages. - // If the specified TagsPerPage would cause such a break, a PaginationToken - // is returned in place of the affected resource and its tags. Use that token - // in another request to get the remaining data. For example, if you specify - // a TagsPerPage of 100 and the account has 22 resources with 10 tags each (meaning - // that each resource has 10 key and value pairs), the output will consist of - // three pages. The first page displays the first 10 resources, each with its - // 10 tags. The second page displays the next 10 resources, each with its 10 - // tags. The third page displays the remaining 2 resources, each with its 10 - // tags. - // - // You can set TagsPerPage to a minimum of 100 items up to a maximum of 500 - // items. - TagsPerPage *int64 `type:"integer"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourcesInput"} - if s.ResourceARNList != nil && len(s.ResourceARNList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARNList", 1)) - } - if s.TagFilters != nil { - for i, v := range s.TagFilters { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "TagFilters", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetExcludeCompliantResources sets the ExcludeCompliantResources field's value. -func (s *GetResourcesInput) SetExcludeCompliantResources(v bool) *GetResourcesInput { - s.ExcludeCompliantResources = &v - return s -} - -// SetIncludeComplianceDetails sets the IncludeComplianceDetails field's value. -func (s *GetResourcesInput) SetIncludeComplianceDetails(v bool) *GetResourcesInput { - s.IncludeComplianceDetails = &v - return s -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *GetResourcesInput) SetPaginationToken(v string) *GetResourcesInput { - s.PaginationToken = &v - return s -} - -// SetResourceARNList sets the ResourceARNList field's value. -func (s *GetResourcesInput) SetResourceARNList(v []*string) *GetResourcesInput { - s.ResourceARNList = v - return s -} - -// SetResourceTypeFilters sets the ResourceTypeFilters field's value. -func (s *GetResourcesInput) SetResourceTypeFilters(v []*string) *GetResourcesInput { - s.ResourceTypeFilters = v - return s -} - -// SetResourcesPerPage sets the ResourcesPerPage field's value. -func (s *GetResourcesInput) SetResourcesPerPage(v int64) *GetResourcesInput { - s.ResourcesPerPage = &v - return s -} - -// SetTagFilters sets the TagFilters field's value. -func (s *GetResourcesInput) SetTagFilters(v []*TagFilter) *GetResourcesInput { - s.TagFilters = v - return s -} - -// SetTagsPerPage sets the TagsPerPage field's value. -func (s *GetResourcesInput) SetTagsPerPage(v int64) *GetResourcesInput { - s.TagsPerPage = &v - return s -} - -type GetResourcesOutput struct { - _ struct{} `type:"structure"` - - // A string that indicates that there is more data available than this response - // contains. To receive the next part of the response, specify this response - // value as the PaginationToken value in the request for the next page. - PaginationToken *string `type:"string"` - - // A list of resource ARNs and the tags (keys and values) associated with each. - ResourceTagMappingList []*ResourceTagMapping `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetResourcesOutput) GoString() string { - return s.String() -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *GetResourcesOutput) SetPaginationToken(v string) *GetResourcesOutput { - s.PaginationToken = &v - return s -} - -// SetResourceTagMappingList sets the ResourceTagMappingList field's value. -func (s *GetResourcesOutput) SetResourceTagMappingList(v []*ResourceTagMapping) *GetResourcesOutput { - s.ResourceTagMappingList = v - return s -} - -type GetTagKeysInput struct { - _ struct{} `type:"structure"` - - // Specifies a PaginationToken response value from a previous request to indicate - // that you want the next page of results. Leave this parameter empty in your - // initial request. - PaginationToken *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetTagKeysInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetTagKeysInput) GoString() string { - return s.String() -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *GetTagKeysInput) SetPaginationToken(v string) *GetTagKeysInput { - s.PaginationToken = &v - return s -} - -type GetTagKeysOutput struct { - _ struct{} `type:"structure"` - - // A string that indicates that there is more data available than this response - // contains. To receive the next part of the response, specify this response - // value as the PaginationToken value in the request for the next page. - PaginationToken *string `type:"string"` - - // A list of all tag keys in the Amazon Web Services account. - TagKeys []*string `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetTagKeysOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetTagKeysOutput) GoString() string { - return s.String() -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *GetTagKeysOutput) SetPaginationToken(v string) *GetTagKeysOutput { - s.PaginationToken = &v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *GetTagKeysOutput) SetTagKeys(v []*string) *GetTagKeysOutput { - s.TagKeys = v - return s -} - -type GetTagValuesInput struct { - _ struct{} `type:"structure"` - - // Specifies the tag key for which you want to list all existing values that - // are currently used in the specified Amazon Web Services Region for the calling - // account. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // Specifies a PaginationToken response value from a previous request to indicate - // that you want the next page of results. Leave this parameter empty in your - // initial request. - PaginationToken *string `type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetTagValuesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetTagValuesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTagValuesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTagValuesInput"} - if s.Key == nil { - invalidParams.Add(request.NewErrParamRequired("Key")) - } - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *GetTagValuesInput) SetKey(v string) *GetTagValuesInput { - s.Key = &v - return s -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *GetTagValuesInput) SetPaginationToken(v string) *GetTagValuesInput { - s.PaginationToken = &v - return s -} - -type GetTagValuesOutput struct { - _ struct{} `type:"structure"` - - // A string that indicates that there is more data available than this response - // contains. To receive the next part of the response, specify this response - // value as the PaginationToken value in the request for the next page. - PaginationToken *string `type:"string"` - - // A list of all tag values for the specified key currently used in the specified - // Amazon Web Services Region for the calling account. - TagValues []*string `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetTagValuesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s GetTagValuesOutput) GoString() string { - return s.String() -} - -// SetPaginationToken sets the PaginationToken field's value. -func (s *GetTagValuesOutput) SetPaginationToken(v string) *GetTagValuesOutput { - s.PaginationToken = &v - return s -} - -// SetTagValues sets the TagValues field's value. -func (s *GetTagValuesOutput) SetTagValues(v []*string) *GetTagValuesOutput { - s.TagValues = v - return s -} - -// The request processing failed because of an unknown error, exception, or -// failure. You can retry the request. -type InternalServiceException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InternalServiceException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InternalServiceException) GoString() string { - return s.String() -} - -func newErrorInternalServiceException(v protocol.ResponseMetadata) error { - return &InternalServiceException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *InternalServiceException) Code() string { - return "InternalServiceException" -} - -// Message returns the exception's message. -func (s *InternalServiceException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *InternalServiceException) OrigErr() error { - return nil -} - -func (s *InternalServiceException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *InternalServiceException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *InternalServiceException) RequestID() string { - return s.RespMetadata.RequestID -} - -// This error indicates one of the following: -// -// - A parameter is missing. -// -// - A malformed string was supplied for the request parameter. -// -// - An out-of-range value was supplied for the request parameter. -// -// - The target ID is invalid, unsupported, or doesn't exist. -// -// - You can't access the Amazon S3 bucket for report storage. For more information, -// see Additional Requirements for Organization-wide Tag Compliance Reports -// (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) -// in the Organizations User Guide. -type InvalidParameterException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InvalidParameterException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s InvalidParameterException) GoString() string { - return s.String() -} - -func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { - return &InvalidParameterException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *InvalidParameterException) Code() string { - return "InvalidParameterException" -} - -// Message returns the exception's message. -func (s *InvalidParameterException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *InvalidParameterException) OrigErr() error { - return nil -} - -func (s *InvalidParameterException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *InvalidParameterException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *InvalidParameterException) RequestID() string { - return s.RespMetadata.RequestID -} - -// A PaginationToken is valid for a maximum of 15 minutes. Your request was -// denied because the specified PaginationToken has expired. -type PaginationTokenExpiredException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PaginationTokenExpiredException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s PaginationTokenExpiredException) GoString() string { - return s.String() -} - -func newErrorPaginationTokenExpiredException(v protocol.ResponseMetadata) error { - return &PaginationTokenExpiredException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *PaginationTokenExpiredException) Code() string { - return "PaginationTokenExpiredException" -} - -// Message returns the exception's message. -func (s *PaginationTokenExpiredException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *PaginationTokenExpiredException) OrigErr() error { - return nil -} - -func (s *PaginationTokenExpiredException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *PaginationTokenExpiredException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *PaginationTokenExpiredException) RequestID() string { - return s.RespMetadata.RequestID -} - -// A list of resource ARNs and the tags (keys and values) that are associated -// with each. -type ResourceTagMapping struct { - _ struct{} `type:"structure"` - - // Information that shows whether a resource is compliant with the effective - // tag policy, including details on any noncompliant tag keys. - ComplianceDetails *ComplianceDetails `type:"structure"` - - // The ARN of the resource. - ResourceARN *string `min:"1" type:"string"` - - // The tags that have been applied to one or more Amazon Web Services resources. - Tags []*Tag `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResourceTagMapping) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ResourceTagMapping) GoString() string { - return s.String() -} - -// SetComplianceDetails sets the ComplianceDetails field's value. -func (s *ResourceTagMapping) SetComplianceDetails(v *ComplianceDetails) *ResourceTagMapping { - s.ComplianceDetails = v - return s -} - -// SetResourceARN sets the ResourceARN field's value. -func (s *ResourceTagMapping) SetResourceARN(v string) *ResourceTagMapping { - s.ResourceARN = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *ResourceTagMapping) SetTags(v []*Tag) *ResourceTagMapping { - s.Tags = v - return s -} - -type StartReportCreationInput struct { - _ struct{} `type:"structure"` - - // The name of the Amazon S3 bucket where the report will be stored; for example: - // - // awsexamplebucket - // - // For more information on S3 bucket requirements, including an example bucket - // policy, see the example S3 bucket policy on this page. - // - // S3Bucket is a required field - S3Bucket *string `min:"3" type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StartReportCreationInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StartReportCreationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *StartReportCreationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "StartReportCreationInput"} - if s.S3Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("S3Bucket")) - } - if s.S3Bucket != nil && len(*s.S3Bucket) < 3 { - invalidParams.Add(request.NewErrParamMinLen("S3Bucket", 3)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *StartReportCreationInput) SetS3Bucket(v string) *StartReportCreationInput { - s.S3Bucket = &v - return s -} - -type StartReportCreationOutput struct { - _ struct{} `type:"structure"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StartReportCreationOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s StartReportCreationOutput) GoString() string { - return s.String() -} - -// A count of noncompliant resources. -type Summary struct { - _ struct{} `type:"structure"` - - // The timestamp that shows when this summary was generated in this Region. - LastUpdated *string `type:"string"` - - // The count of noncompliant resources. - NonCompliantResources *int64 `type:"long"` - - // The Amazon Web Services Region that the summary applies to. - Region *string `min:"1" type:"string"` - - // The Amazon Web Services resource type. - ResourceType *string `type:"string"` - - // The account identifier or the root identifier of the organization. If you - // don't know the root ID, you can call the Organizations ListRoots (https://docs.aws.amazon.com/organizations/latest/APIReference/API_ListRoots.html) - // API. - TargetId *string `min:"6" type:"string"` - - // Whether the target is an account, an OU, or the organization root. - TargetIdType *string `type:"string" enum:"TargetIdType"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Summary) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Summary) GoString() string { - return s.String() -} - -// SetLastUpdated sets the LastUpdated field's value. -func (s *Summary) SetLastUpdated(v string) *Summary { - s.LastUpdated = &v - return s -} - -// SetNonCompliantResources sets the NonCompliantResources field's value. -func (s *Summary) SetNonCompliantResources(v int64) *Summary { - s.NonCompliantResources = &v - return s -} - -// SetRegion sets the Region field's value. -func (s *Summary) SetRegion(v string) *Summary { - s.Region = &v - return s -} - -// SetResourceType sets the ResourceType field's value. -func (s *Summary) SetResourceType(v string) *Summary { - s.ResourceType = &v - return s -} - -// SetTargetId sets the TargetId field's value. -func (s *Summary) SetTargetId(v string) *Summary { - s.TargetId = &v - return s -} - -// SetTargetIdType sets the TargetIdType field's value. -func (s *Summary) SetTargetIdType(v string) *Summary { - s.TargetIdType = &v - return s -} - -// The metadata that you apply to Amazon Web Services resources to help you -// categorize and organize them. Each tag consists of a key and a value, both -// of which you define. For more information, see Tagging Amazon Web Services -// Resources (https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html) -// in the Amazon Web Services General Reference. -type Tag struct { - _ struct{} `type:"structure"` - - // One part of a key-value pair that makes up a tag. A key is a general label - // that acts like a category for more specific tag values. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // One part of a key-value pair that make up a tag. A value acts as a descriptor - // within a tag category (key). The value can be empty or null. - // - // Value is a required field - Value *string `type:"string" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Tag) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s Tag) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *Tag) SetKey(v string) *Tag { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *Tag) SetValue(v string) *Tag { - s.Value = &v - return s -} - -// A list of tags (keys and values) that are used to specify the associated -// resources. -type TagFilter struct { - _ struct{} `type:"structure"` - - // One part of a key-value pair that makes up a tag. A key is a general label - // that acts like a category for more specific tag values. - Key *string `min:"1" type:"string"` - - // One part of a key-value pair that make up a tag. A value acts as a descriptor - // within a tag category (key). The value can be empty or null. - Values []*string `type:"list"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagFilter) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagFilter) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagFilter) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagFilter"} - if s.Key != nil && len(*s.Key) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Key", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetKey sets the Key field's value. -func (s *TagFilter) SetKey(v string) *TagFilter { - s.Key = &v - return s -} - -// SetValues sets the Values field's value. -func (s *TagFilter) SetValues(v []*string) *TagFilter { - s.Values = v - return s -} - -type TagResourcesInput struct { - _ struct{} `type:"structure"` - - // Specifies the list of ARNs of the resources that you want to apply tags to. - // - // An ARN (Amazon Resource Name) uniquely identifies a resource. For more information, - // see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces - // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // ResourceARNList is a required field - ResourceARNList []*string `min:"1" type:"list" required:"true"` - - // Specifies a list of tags that you want to add to the specified resources. - // A tag consists of a key and a value that you define. - // - // Tags is a required field - Tags map[string]*string `min:"1" type:"map" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagResourcesInput"} - if s.ResourceARNList == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceARNList")) - } - if s.ResourceARNList != nil && len(s.ResourceARNList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARNList", 1)) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARNList sets the ResourceARNList field's value. -func (s *TagResourcesInput) SetResourceARNList(v []*string) *TagResourcesInput { - s.ResourceARNList = v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagResourcesInput) SetTags(v map[string]*string) *TagResourcesInput { - s.Tags = v - return s -} - -type TagResourcesOutput struct { - _ struct{} `type:"structure"` - - // A map containing a key-value pair for each failed item that couldn't be tagged. - // The key is the ARN of the failed resource. The value is a FailureInfo object - // that contains an error code, a status code, and an error message. If there - // are no errors, the FailedResourcesMap is empty. - FailedResourcesMap map[string]*FailureInfo `type:"map"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s TagResourcesOutput) GoString() string { - return s.String() -} - -// SetFailedResourcesMap sets the FailedResourcesMap field's value. -func (s *TagResourcesOutput) SetFailedResourcesMap(v map[string]*FailureInfo) *TagResourcesOutput { - s.FailedResourcesMap = v - return s -} - -// The request was denied to limit the frequency of submitted requests. -type ThrottledException struct { - _ struct{} `type:"structure"` - RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` - - Message_ *string `locationName:"Message" type:"string"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ThrottledException) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s ThrottledException) GoString() string { - return s.String() -} - -func newErrorThrottledException(v protocol.ResponseMetadata) error { - return &ThrottledException{ - RespMetadata: v, - } -} - -// Code returns the exception type name. -func (s *ThrottledException) Code() string { - return "ThrottledException" -} - -// Message returns the exception's message. -func (s *ThrottledException) Message() string { - if s.Message_ != nil { - return *s.Message_ - } - return "" -} - -// OrigErr always returns nil, satisfies awserr.Error interface. -func (s *ThrottledException) OrigErr() error { - return nil -} - -func (s *ThrottledException) Error() string { - return fmt.Sprintf("%s: %s", s.Code(), s.Message()) -} - -// Status code returns the HTTP status code for the request's response error. -func (s *ThrottledException) StatusCode() int { - return s.RespMetadata.StatusCode -} - -// RequestID returns the service's response RequestID for request. -func (s *ThrottledException) RequestID() string { - return s.RespMetadata.RequestID -} - -type UntagResourcesInput struct { - _ struct{} `type:"structure"` - - // Specifies a list of ARNs of the resources that you want to remove tags from. - // - // An ARN (Amazon Resource Name) uniquely identifies a resource. For more information, - // see Amazon Resource Names (ARNs) and Amazon Web Services Service Namespaces - // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) - // in the Amazon Web Services General Reference. - // - // ResourceARNList is a required field - ResourceARNList []*string `min:"1" type:"list" required:"true"` - - // Specifies a list of tag keys that you want to remove from the specified resources. - // - // TagKeys is a required field - TagKeys []*string `min:"1" type:"list" required:"true"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagResourcesInput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagResourcesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *UntagResourcesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "UntagResourcesInput"} - if s.ResourceARNList == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceARNList")) - } - if s.ResourceARNList != nil && len(s.ResourceARNList) < 1 { - invalidParams.Add(request.NewErrParamMinLen("ResourceARNList", 1)) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - if s.TagKeys != nil && len(s.TagKeys) < 1 { - invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceARNList sets the ResourceARNList field's value. -func (s *UntagResourcesInput) SetResourceARNList(v []*string) *UntagResourcesInput { - s.ResourceARNList = v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *UntagResourcesInput) SetTagKeys(v []*string) *UntagResourcesInput { - s.TagKeys = v - return s -} - -type UntagResourcesOutput struct { - _ struct{} `type:"structure"` - - // A map containing a key-value pair for each failed item that couldn't be untagged. - // The key is the ARN of the failed resource. The value is a FailureInfo object - // that contains an error code, a status code, and an error message. If there - // are no errors, the FailedResourcesMap is empty. - FailedResourcesMap map[string]*FailureInfo `type:"map"` -} - -// String returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagResourcesOutput) String() string { - return awsutil.Prettify(s) -} - -// GoString returns the string representation. -// -// API parameter values that are decorated as "sensitive" in the API will not -// be included in the string output. The member name will be present, but the -// value will be replaced with "sensitive". -func (s UntagResourcesOutput) GoString() string { - return s.String() -} - -// SetFailedResourcesMap sets the FailedResourcesMap field's value. -func (s *UntagResourcesOutput) SetFailedResourcesMap(v map[string]*FailureInfo) *UntagResourcesOutput { - s.FailedResourcesMap = v - return s -} - -const ( - // ErrorCodeInternalServiceException is a ErrorCode enum value - ErrorCodeInternalServiceException = "InternalServiceException" - - // ErrorCodeInvalidParameterException is a ErrorCode enum value - ErrorCodeInvalidParameterException = "InvalidParameterException" -) - -// ErrorCode_Values returns all elements of the ErrorCode enum -func ErrorCode_Values() []string { - return []string{ - ErrorCodeInternalServiceException, - ErrorCodeInvalidParameterException, - } -} - -const ( - // GroupByAttributeTargetId is a GroupByAttribute enum value - GroupByAttributeTargetId = "TARGET_ID" - - // GroupByAttributeRegion is a GroupByAttribute enum value - GroupByAttributeRegion = "REGION" - - // GroupByAttributeResourceType is a GroupByAttribute enum value - GroupByAttributeResourceType = "RESOURCE_TYPE" -) - -// GroupByAttribute_Values returns all elements of the GroupByAttribute enum -func GroupByAttribute_Values() []string { - return []string{ - GroupByAttributeTargetId, - GroupByAttributeRegion, - GroupByAttributeResourceType, - } -} - -const ( - // TargetIdTypeAccount is a TargetIdType enum value - TargetIdTypeAccount = "ACCOUNT" - - // TargetIdTypeOu is a TargetIdType enum value - TargetIdTypeOu = "OU" - - // TargetIdTypeRoot is a TargetIdType enum value - TargetIdTypeRoot = "ROOT" -) - -// TargetIdType_Values returns all elements of the TargetIdType enum -func TargetIdType_Values() []string { - return []string{ - TargetIdTypeAccount, - TargetIdTypeOu, - TargetIdTypeRoot, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/doc.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/doc.go deleted file mode 100644 index fad73571ce..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/doc.go +++ /dev/null @@ -1,28 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package resourcegroupstaggingapi provides the client and types for making API -// requests to AWS Resource Groups Tagging API. -// -// # Resource Groups Tagging API -// -// See https://docs.aws.amazon.com/goto/WebAPI/resourcegroupstaggingapi-2017-01-26 for more information on this service. -// -// See resourcegroupstaggingapi package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/resourcegroupstaggingapi/ -// -// # Using the Client -// -// To contact AWS Resource Groups Tagging API with the SDK use the New function to create -// a new service client. With that client you can make API requests to the service. -// These clients are safe to use concurrently. -// -// See the SDK's documentation for more information on how to use the SDK. -// https://docs.aws.amazon.com/sdk-for-go/api/ -// -// See aws.Config documentation for more information on configuring SDK clients. -// https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config -// -// See the AWS Resource Groups Tagging API client ResourceGroupsTaggingAPI for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/resourcegroupstaggingapi/#New -package resourcegroupstaggingapi diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/errors.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/errors.go deleted file mode 100644 index d7ccece232..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/errors.go +++ /dev/null @@ -1,85 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package resourcegroupstaggingapi - -import ( - "github.com/aws/aws-sdk-go/private/protocol" -) - -const ( - - // ErrCodeConcurrentModificationException for service response error code - // "ConcurrentModificationException". - // - // The target of the operation is currently being modified by a different request. - // Try again later. - ErrCodeConcurrentModificationException = "ConcurrentModificationException" - - // ErrCodeConstraintViolationException for service response error code - // "ConstraintViolationException". - // - // The request was denied because performing this operation violates a constraint. - // - // Some of the reasons in the following list might not apply to this specific - // operation. - // - // * You must meet the prerequisites for using tag policies. For information, - // see Prerequisites and Permissions for Using Tag Policies (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html) - // in the Organizations User Guide. - // - // * You must enable the tag policies service principal (tagpolicies.tag.amazonaws.com) - // to integrate with Organizations For information, see EnableAWSServiceAccess - // (https://docs.aws.amazon.com/organizations/latest/APIReference/API_EnableAWSServiceAccess.html). - // - // * You must have a tag policy attached to the organization root, an OU, - // or an account. - ErrCodeConstraintViolationException = "ConstraintViolationException" - - // ErrCodeInternalServiceException for service response error code - // "InternalServiceException". - // - // The request processing failed because of an unknown error, exception, or - // failure. You can retry the request. - ErrCodeInternalServiceException = "InternalServiceException" - - // ErrCodeInvalidParameterException for service response error code - // "InvalidParameterException". - // - // This error indicates one of the following: - // - // * A parameter is missing. - // - // * A malformed string was supplied for the request parameter. - // - // * An out-of-range value was supplied for the request parameter. - // - // * The target ID is invalid, unsupported, or doesn't exist. - // - // * You can't access the Amazon S3 bucket for report storage. For more information, - // see Additional Requirements for Organization-wide Tag Compliance Reports - // (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_tag-policies-prereqs.html#bucket-policies-org-report) - // in the Organizations User Guide. - ErrCodeInvalidParameterException = "InvalidParameterException" - - // ErrCodePaginationTokenExpiredException for service response error code - // "PaginationTokenExpiredException". - // - // A PaginationToken is valid for a maximum of 15 minutes. Your request was - // denied because the specified PaginationToken has expired. - ErrCodePaginationTokenExpiredException = "PaginationTokenExpiredException" - - // ErrCodeThrottledException for service response error code - // "ThrottledException". - // - // The request was denied to limit the frequency of submitted requests. - ErrCodeThrottledException = "ThrottledException" -) - -var exceptionFromCode = map[string]func(protocol.ResponseMetadata) error{ - "ConcurrentModificationException": newErrorConcurrentModificationException, - "ConstraintViolationException": newErrorConstraintViolationException, - "InternalServiceException": newErrorInternalServiceException, - "InvalidParameterException": newErrorInvalidParameterException, - "PaginationTokenExpiredException": newErrorPaginationTokenExpiredException, - "ThrottledException": newErrorThrottledException, -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/service.go b/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/service.go deleted file mode 100644 index 275689370a..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi/service.go +++ /dev/null @@ -1,109 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package resourcegroupstaggingapi - -import ( - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/client" - "github.com/aws/aws-sdk-go/aws/client/metadata" - "github.com/aws/aws-sdk-go/aws/request" - "github.com/aws/aws-sdk-go/aws/signer/v4" - "github.com/aws/aws-sdk-go/private/protocol" - "github.com/aws/aws-sdk-go/private/protocol/jsonrpc" -) - -// ResourceGroupsTaggingAPI provides the API operation methods for making requests to -// AWS Resource Groups Tagging API. See this package's package overview docs -// for details on the service. -// -// ResourceGroupsTaggingAPI methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ResourceGroupsTaggingAPI struct { - *client.Client -} - -// Used for custom client initialization logic -var initClient func(*client.Client) - -// Used for custom request initialization logic -var initRequest func(*request.Request) - -// Service information constants -const ( - ServiceName = "tagging" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Resource Groups Tagging API" // ServiceID is a unique identifier of a specific service. -) - -// New creates a new instance of the ResourceGroupsTaggingAPI client with a session. -// If additional configuration is needed for the client instance use the optional -// aws.Config parameter to add your extra config. -// -// Example: -// -// mySession := session.Must(session.NewSession()) -// -// // Create a ResourceGroupsTaggingAPI client from just a session. -// svc := resourcegroupstaggingapi.New(mySession) -// -// // Create a ResourceGroupsTaggingAPI client with additional configuration -// svc := resourcegroupstaggingapi.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ResourceGroupsTaggingAPI { - c := p.ClientConfig(EndpointsID, cfgs...) - if c.SigningNameDerived || len(c.SigningName) == 0 { - c.SigningName = EndpointsID - // No Fallback - } - return newClient(*c.Config, c.Handlers, c.PartitionID, c.Endpoint, c.SigningRegion, c.SigningName, c.ResolvedRegion) -} - -// newClient creates, initializes and returns a new service client instance. -func newClient(cfg aws.Config, handlers request.Handlers, partitionID, endpoint, signingRegion, signingName, resolvedRegion string) *ResourceGroupsTaggingAPI { - svc := &ResourceGroupsTaggingAPI{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - PartitionID: partitionID, - Endpoint: endpoint, - APIVersion: "2017-01-26", - ResolvedRegion: resolvedRegion, - JSONVersion: "1.1", - TargetPrefix: "ResourceGroupsTaggingAPI_20170126", - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(jsonrpc.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(jsonrpc.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(jsonrpc.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed( - protocol.NewUnmarshalErrorHandler(jsonrpc.NewUnmarshalTypedError(exceptionFromCode)).NamedHandler(), - ) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ResourceGroupsTaggingAPI operation and runs any -// custom request initialization. -func (c *ResourceGroupsTaggingAPI) newRequest(op *request.Operation, params, data interface{}) *request.Request { - req := c.NewRequest(op, params, data) - - // Run custom request initialization if present - if initRequest != nil { - initRequest(req) - } - - return req -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 564e44739f..e2236e3a18 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -440,10 +440,8 @@ github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil github.com/aws/aws-sdk-go/service/cloudfront github.com/aws/aws-sdk-go/service/cloudfront/cloudfrontiface github.com/aws/aws-sdk-go/service/ec2 -github.com/aws/aws-sdk-go/service/efs github.com/aws/aws-sdk-go/service/iam github.com/aws/aws-sdk-go/service/iam/iamiface -github.com/aws/aws-sdk-go/service/resourcegroupstaggingapi github.com/aws/aws-sdk-go/service/route53 github.com/aws/aws-sdk-go/service/s3 github.com/aws/aws-sdk-go/service/s3/s3iface @@ -521,6 +519,11 @@ github.com/aws/aws-sdk-go-v2/internal/v4a/internal/v4 github.com/aws/aws-sdk-go-v2/service/ec2 github.com/aws/aws-sdk-go-v2/service/ec2/internal/endpoints github.com/aws/aws-sdk-go-v2/service/ec2/types +# github.com/aws/aws-sdk-go-v2/service/efs v1.36.2 +## explicit; go 1.22 +github.com/aws/aws-sdk-go-v2/service/efs +github.com/aws/aws-sdk-go-v2/service/efs/internal/endpoints +github.com/aws/aws-sdk-go-v2/service/efs/types # github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.29.6 ## explicit; go 1.22 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing