diff --git a/go.mod b/go.mod index 1ee1079784..af8e6d815c 100644 --- a/go.mod +++ b/go.mod @@ -38,7 +38,7 @@ require ( github.com/apparentlymart/go-cidr v1.1.0 github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab github.com/aws/aws-sdk-go v1.55.5 - github.com/aws/aws-sdk-go-v2 v1.38.0 + github.com/aws/aws-sdk-go-v2 v1.39.0 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 @@ -47,7 +47,7 @@ require ( github.com/aws/aws-sdk-go-v2/service/route53 v1.48.6 github.com/aws/aws-sdk-go-v2/service/s3 v1.80.0 github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 - github.com/aws/smithy-go v1.22.5 + github.com/aws/smithy-go v1.23.0 github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e github.com/clarketm/json v1.14.1 github.com/containers/image/v5 v5.31.0 @@ -157,6 +157,8 @@ require ( require github.com/aws/aws-sdk-go-v2/service/servicequotas v1.31.0 +require github.com/aws/aws-sdk-go-v2/service/efs v1.40.5 + require ( cloud.google.com/go v0.116.0 // indirect cloud.google.com/go/auth v0.13.0 // indirect @@ -181,8 +183,8 @@ require ( 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/feature/ec2/imds v1.16.30 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.3 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.3 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 // indirect github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.32.0 diff --git a/go.sum b/go.sum index b9294167e8..2bad67c24b 100644 --- a/go.sum +++ b/go.sum @@ -162,8 +162,8 @@ github.com/awalterschulze/gographviz v0.0.0-20190522210029-fa59802746ab/go.mod h github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/+8rV9s48= github.com/aws/aws-sdk-go v1.55.5 h1:KKUZBfBoyqy5d3swXyiC7Q76ic40rYcbqH7qjh59kzU= github.com/aws/aws-sdk-go v1.55.5/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU= -github.com/aws/aws-sdk-go-v2 v1.38.0 h1:UCRQ5mlqcFk9HJDIqENSLR3wiG1VTWlyUfLDEvY7RxU= -github.com/aws/aws-sdk-go-v2 v1.38.0/go.mod h1:9Q0OoGQoboYIAJyslFyF1f5K1Ryddop8gqMhWx/n4Wg= +github.com/aws/aws-sdk-go-v2 v1.39.0 h1:xm5WV/2L4emMRmMjHFykqiA4M/ra0DJVSWUkDyBjbg4= +github.com/aws/aws-sdk-go-v2 v1.39.0/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10 h1:zAybnyUQXIZ5mok5Jqwlf58/TFE7uvd3IAsa1aF9cXs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.6.10/go.mod h1:qqvMj6gHLR/EXWZw4ZbqlPbQUyenf4h82UQUlKc+l14= github.com/aws/aws-sdk-go-v2/config v1.29.14 h1:f+eEi/2cKCg9pqKBoAIwRGzVb70MRKqWX4dg1BDcSJM= @@ -172,16 +172,18 @@ github.com/aws/aws-sdk-go-v2/credentials v1.17.67 h1:9KxtdcIA/5xPNQyZRgUSpYOE6j9 github.com/aws/aws-sdk-go-v2/credentials v1.17.67/go.mod h1:p3C44m+cfnbv763s52gCqrjaqyPikj9Sg47kUVaNZQQ= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30 h1:x793wxmUWVDhshP8WW2mlnXuFrO4cOd3HLBroh1paFw= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.30/go.mod h1:Jpne2tDnYiFascUEs2AWHJL9Yp7A5ZVy3TNyxaAjD6M= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.3 h1:o9RnO+YZ4X+kt5Z7Nvcishlz0nksIt2PIzDglLMP0vA= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.3/go.mod h1:+6aLJzOG1fvMOyzIySYjOFjcguGvVRL68R+uoRencN4= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.3 h1:joyyUFhiTQQmVK6ImzNU9TQSNRNeD9kOklqTzyk5v6s= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.3/go.mod h1:+vNIyZQP3b3B1tSLI0lxvrU9cfM7gpdRXMFfm67ZcPc= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 h1:UCxq0X9O3xrlENdKf1r9eRJoKz/b0AfGkpp3a7FPlhg= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7/go.mod h1:rHRoJUNUASj5Z/0eqI4w32vKvC7atoWR0jC+IkmVH8k= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 h1:Y6DTZUn7ZUC4th9FMBbo8LVE+1fyq3ofw+tRwkUd3PY= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7/go.mod h1:x3XE6vMnU9QvHN/Wrx2s44kwzV2o2g5x/siw4ZUJ9g8= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 h1:bIqFDwgGXXN1Kpp99pDOdKMTTb5d2KyU5X/BZxjOkRo= github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3/go.mod h1:H5O/EsxDWyU+LP/V8i5sm8cxoZgc2fdNR9bxlOFrQTo= github.com/aws/aws-sdk-go-v2/internal/v4a v1.3.34 h1:ZNTqv4nIdE/DiBfUUfXcLZ/Spcuz+RjeziUtNJackkM= 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.40.5 h1:iOfTDjU/S2b0BSWCqv7fDbT4uKo0e3jdtnRHVwXXggI= +github.com/aws/aws-sdk-go-v2/service/efs v1.40.5/go.mod h1:gnXK8cQKVDpkqG7lCZ2NYx32B9WbTIZsGiAFRXxpX70= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.32.0 h1:FO6LzHczDXByBf8+WJ5cswxaGy1EOjDVXA3NQa97Bh8= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing v1.32.0/go.mod h1:q2K5uszrJv1SBxKYp5M9KUf7XR/Xnu38vSCiQ/wwhfI= github.com/aws/aws-sdk-go-v2/service/elasticloadbalancingv2 v1.49.0 h1:2VJj7fSoDawAjQ91u/DtrrUDOGsuMaWxcbe9Ok/O27w= @@ -210,8 +212,8 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1 h1:hXmVKytPfTy5axZ+fYbR5d0c github.com/aws/aws-sdk-go-v2/service/ssooidc v1.30.1/go.mod h1:MlYRNmYu/fGPoxBQVvBYr9nyr948aY/WLUvwBMBJubs= github.com/aws/aws-sdk-go-v2/service/sts v1.33.19 h1:1XuUZ8mYJw9B6lzAkXhqHlJd/XvaX32evhproijJEZY= github.com/aws/aws-sdk-go-v2/service/sts v1.33.19/go.mod h1:cQnB8CUnxbMU82JvlqjKR2HBOm3fe9pWorWBza6MBJ4= -github.com/aws/smithy-go v1.22.5 h1:P9ATCXPMb2mPjYBgueqJNCA5S9UfktsW0tTxi+a7eqw= -github.com/aws/smithy-go v1.22.5/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= +github.com/aws/smithy-go v1.23.0 h1:8n6I3gXzWJB2DxBDnfxgBaSX6oe0d/t10qGz7OKqMCE= +github.com/aws/smithy-go v1.23.0/go.mod h1:t1ufH5HMublsJYulve2RKmHDC15xu1f26kHCp/HgceI= github.com/benbjohnson/clock v1.3.5 h1:VvXlSJBzZpA/zum6Sj74hxwYI2DIxRWuNIoXAzHZz5o= github.com/benbjohnson/clock v1.3.5/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go index dbbd7f0b95..86f7edb16a 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/go_module_metadata.go @@ -3,4 +3,4 @@ package aws // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.38.0" +const goModuleVersion = "1.39.0" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go index 6ee3391be2..3314230fd8 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/aws/middleware/user_agent.go @@ -135,6 +135,8 @@ const ( UserAgentFeatureCredentialsAwsSdkStore = "y" // n/a (this is used by .NET based sdk) UserAgentFeatureCredentialsHTTP = "z" UserAgentFeatureCredentialsIMDS = "0" + + UserAgentFeatureBearerServiceEnvVars = "3" ) var credentialSourceToFeature = map[aws.CredentialSource]UserAgentFeature{ diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md index 17250d76aa..553faf5037 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/CHANGELOG.md @@ -1,3 +1,20 @@ +# v1.4.7 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.6 (2025-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.5 (2025-08-27) + +* **Dependency Update**: Update to smithy-go v1.23.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.4.4 (2025-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + # v1.4.3 (2025-08-11) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go index 046d002379..d0c4a4e33e 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/configsources/go_module_metadata.go @@ -3,4 +3,4 @@ package configsources // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.4.3" +const goModuleVersion = "1.4.7" diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go index 619c1f5d8f..d4e6611f74 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go @@ -112,6 +112,13 @@ var partitions = []Partition{ SupportsFIPS: nil, SupportsDualStack: nil, }, + "ap-southeast-6": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, "ap-southeast-7": { Name: nil, DnsSuffix: nil, @@ -297,32 +304,18 @@ var partitions = []Partition{ }, }, { - ID: "aws-us-gov", - RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + ID: "aws-eusc", + RegionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws-us-gov", - DnsSuffix: "amazonaws.com", - DualStackDnsSuffix: "api.aws", + Name: "aws-eusc", + DnsSuffix: "amazonaws.eu", + DualStackDnsSuffix: "api.amazonwebservices.eu", SupportsFIPS: true, SupportsDualStack: true, - ImplicitGlobalRegion: "us-gov-west-1", + ImplicitGlobalRegion: "eusc-de-east-1", }, Regions: map[string]RegionOverrides{ - "aws-us-gov-global": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-gov-east-1": { - Name: nil, - DnsSuffix: nil, - DualStackDnsSuffix: nil, - SupportsFIPS: nil, - SupportsDualStack: nil, - }, - "us-gov-west-1": { + "eusc-de-east-1": { Name: nil, DnsSuffix: nil, DualStackDnsSuffix: nil, @@ -337,7 +330,7 @@ var partitions = []Partition{ DefaultConfig: PartitionConfig{ Name: "aws-iso", DnsSuffix: "c2s.ic.gov", - DualStackDnsSuffix: "c2s.ic.gov", + DualStackDnsSuffix: "api.aws.ic.gov", SupportsFIPS: true, SupportsDualStack: false, ImplicitGlobalRegion: "us-iso-east-1", @@ -372,7 +365,7 @@ var partitions = []Partition{ DefaultConfig: PartitionConfig{ Name: "aws-iso-b", DnsSuffix: "sc2s.sgov.gov", - DualStackDnsSuffix: "sc2s.sgov.gov", + DualStackDnsSuffix: "api.aws.scloud", SupportsFIPS: true, SupportsDualStack: false, ImplicitGlobalRegion: "us-isob-east-1", @@ -400,7 +393,7 @@ var partitions = []Partition{ DefaultConfig: PartitionConfig{ Name: "aws-iso-e", DnsSuffix: "cloud.adc-e.uk", - DualStackDnsSuffix: "cloud.adc-e.uk", + DualStackDnsSuffix: "api.cloud-aws.adc-e.uk", SupportsFIPS: true, SupportsDualStack: false, ImplicitGlobalRegion: "eu-isoe-west-1", @@ -428,7 +421,7 @@ var partitions = []Partition{ DefaultConfig: PartitionConfig{ Name: "aws-iso-f", DnsSuffix: "csp.hci.ic.gov", - DualStackDnsSuffix: "csp.hci.ic.gov", + DualStackDnsSuffix: "api.aws.hci.ic.gov", SupportsFIPS: true, SupportsDualStack: false, ImplicitGlobalRegion: "us-isof-south-1", @@ -458,18 +451,32 @@ var partitions = []Partition{ }, }, { - ID: "aws-eusc", - RegionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + ID: "aws-us-gov", + RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$", DefaultConfig: PartitionConfig{ - Name: "aws-eusc", - DnsSuffix: "amazonaws.eu", - DualStackDnsSuffix: "amazonaws.eu", + Name: "aws-us-gov", + DnsSuffix: "amazonaws.com", + DualStackDnsSuffix: "api.aws", SupportsFIPS: true, - SupportsDualStack: false, - ImplicitGlobalRegion: "eusc-de-east-1", + SupportsDualStack: true, + ImplicitGlobalRegion: "us-gov-west-1", }, Regions: map[string]RegionOverrides{ - "eusc-de-east-1": { + "aws-us-gov-global": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + "us-gov-east-1": { + Name: nil, + DnsSuffix: nil, + DualStackDnsSuffix: nil, + SupportsFIPS: nil, + SupportsDualStack: nil, + }, + "us-gov-west-1": { Name: nil, DnsSuffix: nil, DualStackDnsSuffix: nil, diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json index 456b07fca6..c6582c9c63 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.json @@ -50,11 +50,14 @@ "ap-southeast-5" : { "description" : "Asia Pacific (Malaysia)" }, + "ap-southeast-6" : { + "description" : "Asia Pacific (New Zealand)" + }, "ap-southeast-7" : { "description" : "Asia Pacific (Thailand)" }, "aws-global" : { - "description" : "AWS Standard global region" + "description" : "aws global region" }, "ca-central-1" : { "description" : "Canada (Central)" @@ -127,7 +130,7 @@ "regionRegex" : "^cn\\-\\w+\\-\\d+$", "regions" : { "aws-cn-global" : { - "description" : "AWS China global region" + "description" : "aws-cn global region" }, "cn-north-1" : { "description" : "China (Beijing)" @@ -136,6 +139,104 @@ "description" : "China (Ningxia)" } } + }, { + "id" : "aws-eusc", + "outputs" : { + "dnsSuffix" : "amazonaws.eu", + "dualStackDnsSuffix" : "api.amazonwebservices.eu", + "implicitGlobalRegion" : "eusc-de-east-1", + "name" : "aws-eusc", + "supportsDualStack" : true, + "supportsFIPS" : true + }, + "regionRegex" : "^eusc\\-(de)\\-\\w+\\-\\d+$", + "regions" : { + "eusc-de-east-1" : { + "description" : "EU (Germany)" + } + } + }, { + "id" : "aws-iso", + "outputs" : { + "dnsSuffix" : "c2s.ic.gov", + "dualStackDnsSuffix" : "api.aws.ic.gov", + "implicitGlobalRegion" : "us-iso-east-1", + "name" : "aws-iso", + "supportsDualStack" : false, + "supportsFIPS" : true + }, + "regionRegex" : "^us\\-iso\\-\\w+\\-\\d+$", + "regions" : { + "aws-iso-global" : { + "description" : "aws-iso global region" + }, + "us-iso-east-1" : { + "description" : "US ISO East" + }, + "us-iso-west-1" : { + "description" : "US ISO WEST" + } + } + }, { + "id" : "aws-iso-b", + "outputs" : { + "dnsSuffix" : "sc2s.sgov.gov", + "dualStackDnsSuffix" : "api.aws.scloud", + "implicitGlobalRegion" : "us-isob-east-1", + "name" : "aws-iso-b", + "supportsDualStack" : false, + "supportsFIPS" : true + }, + "regionRegex" : "^us\\-isob\\-\\w+\\-\\d+$", + "regions" : { + "aws-iso-b-global" : { + "description" : "aws-iso-b global region" + }, + "us-isob-east-1" : { + "description" : "US ISOB East (Ohio)" + } + } + }, { + "id" : "aws-iso-e", + "outputs" : { + "dnsSuffix" : "cloud.adc-e.uk", + "dualStackDnsSuffix" : "api.cloud-aws.adc-e.uk", + "implicitGlobalRegion" : "eu-isoe-west-1", + "name" : "aws-iso-e", + "supportsDualStack" : false, + "supportsFIPS" : true + }, + "regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$", + "regions" : { + "aws-iso-e-global" : { + "description" : "aws-iso-e global region" + }, + "eu-isoe-west-1" : { + "description" : "EU ISOE West" + } + } + }, { + "id" : "aws-iso-f", + "outputs" : { + "dnsSuffix" : "csp.hci.ic.gov", + "dualStackDnsSuffix" : "api.aws.hci.ic.gov", + "implicitGlobalRegion" : "us-isof-south-1", + "name" : "aws-iso-f", + "supportsDualStack" : false, + "supportsFIPS" : true + }, + "regionRegex" : "^us\\-isof\\-\\w+\\-\\d+$", + "regions" : { + "aws-iso-f-global" : { + "description" : "aws-iso-f global region" + }, + "us-isof-east-1" : { + "description" : "US ISOF EAST" + }, + "us-isof-south-1" : { + "description" : "US ISOF SOUTH" + } + } }, { "id" : "aws-us-gov", "outputs" : { @@ -149,7 +250,7 @@ "regionRegex" : "^us\\-gov\\-\\w+\\-\\d+$", "regions" : { "aws-us-gov-global" : { - "description" : "AWS GovCloud (US) global region" + "description" : "aws-us-gov global region" }, "us-gov-east-1" : { "description" : "AWS GovCloud (US-East)" @@ -158,104 +259,6 @@ "description" : "AWS GovCloud (US-West)" } } - }, { - "id" : "aws-iso", - "outputs" : { - "dnsSuffix" : "c2s.ic.gov", - "dualStackDnsSuffix" : "c2s.ic.gov", - "implicitGlobalRegion" : "us-iso-east-1", - "name" : "aws-iso", - "supportsDualStack" : false, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-iso\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-global" : { - "description" : "AWS ISO (US) global region" - }, - "us-iso-east-1" : { - "description" : "US ISO East" - }, - "us-iso-west-1" : { - "description" : "US ISO WEST" - } - } - }, { - "id" : "aws-iso-b", - "outputs" : { - "dnsSuffix" : "sc2s.sgov.gov", - "dualStackDnsSuffix" : "sc2s.sgov.gov", - "implicitGlobalRegion" : "us-isob-east-1", - "name" : "aws-iso-b", - "supportsDualStack" : false, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-isob\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-b-global" : { - "description" : "AWS ISOB (US) global region" - }, - "us-isob-east-1" : { - "description" : "US ISOB East (Ohio)" - } - } - }, { - "id" : "aws-iso-e", - "outputs" : { - "dnsSuffix" : "cloud.adc-e.uk", - "dualStackDnsSuffix" : "cloud.adc-e.uk", - "implicitGlobalRegion" : "eu-isoe-west-1", - "name" : "aws-iso-e", - "supportsDualStack" : false, - "supportsFIPS" : true - }, - "regionRegex" : "^eu\\-isoe\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-e-global" : { - "description" : "AWS ISOE (Europe) global region" - }, - "eu-isoe-west-1" : { - "description" : "EU ISOE West" - } - } - }, { - "id" : "aws-iso-f", - "outputs" : { - "dnsSuffix" : "csp.hci.ic.gov", - "dualStackDnsSuffix" : "csp.hci.ic.gov", - "implicitGlobalRegion" : "us-isof-south-1", - "name" : "aws-iso-f", - "supportsDualStack" : false, - "supportsFIPS" : true - }, - "regionRegex" : "^us\\-isof\\-\\w+\\-\\d+$", - "regions" : { - "aws-iso-f-global" : { - "description" : "AWS ISOF global region" - }, - "us-isof-east-1" : { - "description" : "US ISOF EAST" - }, - "us-isof-south-1" : { - "description" : "US ISOF SOUTH" - } - } - }, { - "id" : "aws-eusc", - "outputs" : { - "dnsSuffix" : "amazonaws.eu", - "dualStackDnsSuffix" : "amazonaws.eu", - "implicitGlobalRegion" : "eusc-de-east-1", - "name" : "aws-eusc", - "supportsDualStack" : false, - "supportsFIPS" : true - }, - "regionRegex" : "^eusc\\-(de)\\-\\w+\\-\\d+$", - "regions" : { - "eusc-de-east-1" : { - "description" : "EU (Germany)" - } - } } ], "version" : "1.1" } \ No newline at end of file diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md index b7bd93f378..4f0701fd0d 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/CHANGELOG.md @@ -1,3 +1,20 @@ +# v2.7.7 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.6 (2025-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.5 (2025-08-27) + +* **Dependency Update**: Update to smithy-go v1.23.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v2.7.4 (2025-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + # v2.7.3 (2025-08-11) * **Dependency Update**: Updated to the latest SDK module versions diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go index fd1a4e3680..af8faba143 100644 --- a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go +++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/v2/go_module_metadata.go @@ -3,4 +3,4 @@ package endpoints // goModuleVersion is the tagged release for this module -const goModuleVersion = "2.7.3" +const goModuleVersion = "2.7.7" 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..06fc1e523a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/CHANGELOG.md @@ -0,0 +1,705 @@ +# v1.40.5 (2025-09-10) + +* No change notes available for this release. + +# v1.40.4 (2025-09-08) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.3 (2025-08-29) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.2 (2025-08-27) + +* **Dependency Update**: Update to smithy-go v1.23.0. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.1 (2025-08-21) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.40.0 (2025-08-20) + +* **Feature**: Remove incorrect endpoint tests +* **Bug Fix**: Remove unused deserialization code. + +# v1.39.0 (2025-08-11) + +* **Feature**: Add support for configuring per-service Options via callback on global config. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.38.0 (2025-08-04) + +* **Feature**: Support configurable auth scheme preferences in service clients via AWS_AUTH_SCHEME_PREFERENCE in the environment, auth_scheme_preference in the config file, and through in-code settings on LoadDefaultConfig and client constructor methods. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.1 (2025-07-30) + +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.37.0 (2025-07-28) + +* **Feature**: Add support for HTTP interceptors. +* **Dependency Update**: Updated to the latest SDK module versions + +# v1.36.3 (2025-07-19) + +* **Dependency Update**: Updated to the latest SDK module versions + +# 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..4fe5359a57 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_client.go @@ -0,0 +1,1036 @@ +// 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, + AuthSchemePreference: cfg.AuthSchemePreference, + } + resolveAWSRetryerProvider(cfg, &opts) + resolveAWSRetryMaxAttempts(cfg, &opts) + resolveAWSRetryMode(cfg, &opts) + resolveAWSEndpointResolver(cfg, &opts) + resolveInterceptors(cfg, &opts) + resolveUseDualStackEndpoint(cfg, &opts) + resolveUseFIPSEndpoint(cfg, &opts) + resolveBaseEndpoint(cfg, &opts) + return New(opts, func(o *Options) { + for _, opt := range cfg.ServiceOptions { + opt(ServiceID, o) + } + for _, opt := range optFns { + opt(o) + } + }) +} + +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 resolveInterceptors(cfg aws.Config, o *Options) { + o.Interceptors = cfg.Interceptors.Copy() +} + +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) +} + +func addInterceptBeforeRetryLoop(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptBeforeRetryLoop{ + Interceptors: opts.Interceptors.BeforeRetryLoop, + }, "Retry", middleware.Before) +} + +func addInterceptAttempt(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptAttempt{ + BeforeAttempt: opts.Interceptors.BeforeAttempt, + AfterAttempt: opts.Interceptors.AfterAttempt, + }, "Retry", middleware.After) +} + +func addInterceptExecution(stack *middleware.Stack, opts Options) error { + return stack.Initialize.Add(&smithyhttp.InterceptExecution{ + BeforeExecution: opts.Interceptors.BeforeExecution, + AfterExecution: opts.Interceptors.AfterExecution, + }, middleware.Before) +} + +func addInterceptBeforeSerialization(stack *middleware.Stack, opts Options) error { + return stack.Serialize.Insert(&smithyhttp.InterceptBeforeSerialization{ + Interceptors: opts.Interceptors.BeforeSerialization, + }, "OperationSerializer", middleware.Before) +} + +func addInterceptAfterSerialization(stack *middleware.Stack, opts Options) error { + return stack.Serialize.Insert(&smithyhttp.InterceptAfterSerialization{ + Interceptors: opts.Interceptors.AfterSerialization, + }, "OperationSerializer", middleware.After) +} + +func addInterceptBeforeSigning(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptBeforeSigning{ + Interceptors: opts.Interceptors.BeforeSigning, + }, "Signing", middleware.Before) +} + +func addInterceptAfterSigning(stack *middleware.Stack, opts Options) error { + return stack.Finalize.Insert(&smithyhttp.InterceptAfterSigning{ + Interceptors: opts.Interceptors.AfterSigning, + }, "Signing", middleware.After) +} + +func addInterceptTransmit(stack *middleware.Stack, opts Options) error { + return stack.Deserialize.Add(&smithyhttp.InterceptTransmit{ + BeforeTransmit: opts.Interceptors.BeforeTransmit, + AfterTransmit: opts.Interceptors.AfterTransmit, + }, middleware.After) +} + +func addInterceptBeforeDeserialization(stack *middleware.Stack, opts Options) error { + return stack.Deserialize.Insert(&smithyhttp.InterceptBeforeDeserialization{ + Interceptors: opts.Interceptors.BeforeDeserialization, + }, "OperationDeserializer", middleware.After) // (deserialize stack is called in reverse) +} + +func addInterceptAfterDeserialization(stack *middleware.Stack, opts Options) error { + return stack.Deserialize.Insert(&smithyhttp.InterceptAfterDeserialization{ + Interceptors: opts.Interceptors.AfterDeserialization, + }, "OperationDeserializer", middleware.Before) +} + +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..54cbdaf150 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateAccessPoint.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" + "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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..f65745a78d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateFileSystem.go @@ -0,0 +1,483 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..f04b25151b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateMountTarget.go @@ -0,0 +1,377 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..58dad52062 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateReplicationConfiguration.go @@ -0,0 +1,256 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..f74331c1b6 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_CreateTags.go @@ -0,0 +1,203 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..cc0f0f09bd --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteAccessPoint.go @@ -0,0 +1,191 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..3a6fdea05b --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteFileSystem.go @@ -0,0 +1,206 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..978731c61a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteFileSystemPolicy.go @@ -0,0 +1,192 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..45ad1b6439 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteMountTarget.go @@ -0,0 +1,207 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..d5f1a98219 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteReplicationConfiguration.go @@ -0,0 +1,211 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..90ca4d849f --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DeleteTags.go @@ -0,0 +1,202 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..57c3987133 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeAccessPoints.go @@ -0,0 +1,306 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..b19c1c4fab --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeAccountPreferences.go @@ -0,0 +1,200 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..a9f28ab7f4 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeBackupPolicy.go @@ -0,0 +1,191 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..f2047cc789 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeFileSystemPolicy.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" +) + +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..78455c6322 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeFileSystems.go @@ -0,0 +1,327 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..ccc1894f82 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeLifecycleConfiguration.go @@ -0,0 +1,198 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..7113db41c7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeMountTargetSecurityGroups.go @@ -0,0 +1,201 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..17746f6d77 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeMountTargets.go @@ -0,0 +1,322 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..809b384278 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeReplicationConfigurations.go @@ -0,0 +1,299 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..d2222d9641 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_DescribeTags.go @@ -0,0 +1,316 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..1fcbe131f7 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_ListTagsForResource.go @@ -0,0 +1,302 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..c11a051bb5 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_ModifyMountTargetSecurityGroups.go @@ -0,0 +1,203 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..83edb926b2 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutAccountPreferences.go @@ -0,0 +1,209 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..b8ebea6eac --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutBackupPolicy.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 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..3d08af0e7d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutFileSystemPolicy.go @@ -0,0 +1,225 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..7648f7a6cf --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_PutLifecycleConfiguration.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" +) + +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..86b5d1e166 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_TagResource.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/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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..ae1b19024e --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UntagResource.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" +) + +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..f9f2e26209 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UpdateFileSystem.go @@ -0,0 +1,303 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..2c11cf1896 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/api_op_UpdateFileSystemProtection.go @@ -0,0 +1,227 @@ +// 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 = addInterceptBeforeRetryLoop(stack, options); err != nil { + return err + } + if err = addInterceptAttempt(stack, options); err != nil { + return err + } + if err = addInterceptExecution(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSerialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterSerialization(stack, options); err != nil { + return err + } + if err = addInterceptBeforeSigning(stack, options); err != nil { + return err + } + if err = addInterceptAfterSigning(stack, options); err != nil { + return err + } + if err = addInterceptTransmit(stack, options); err != nil { + return err + } + if err = addInterceptBeforeDeserialization(stack, options); err != nil { + return err + } + if err = addInterceptAfterDeserialization(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..b686de3a50 --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/auth.go @@ -0,0 +1,339 @@ +// 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" + "slices" + "strings" +) + +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) { + sorted := sortAuthOptions(options, m.options.AuthSchemePreference) + for _, option := range sorted { + 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 +} + +func sortAuthOptions(options []*smithyauth.Option, preferred []string) []*smithyauth.Option { + byPriority := make([]*smithyauth.Option, 0, len(options)) + for _, prefName := range preferred { + for _, option := range options { + optName := option.SchemeID + if parts := strings.Split(option.SchemeID, "#"); len(parts) == 2 { + optName = parts[1] + } + if prefName == optName { + byPriority = append(byPriority, option) + } + } + } + for _, option := range options { + if !slices.ContainsFunc(byPriority, func(o *smithyauth.Option) bool { + return o.SchemeID == option.SchemeID + }) { + byPriority = append(byPriority, option) + } + } + return byPriority +} + +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..4c9056f86d --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/deserializers.go @@ -0,0 +1,9465 @@ +// 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" +) + +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..069a41506a --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/endpoints.go @@ -0,0 +1,687 @@ +// 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 + _ = _UseDualStack + _UseFIPS := *params.UseFIPS + _ = _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..bb914c1e2a --- /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.40.5" 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..7a8434374c --- /dev/null +++ b/vendor/github.com/aws/aws-sdk-go-v2/service/efs/options.go @@ -0,0 +1,243 @@ +// 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 + + // Client registry of operation interceptors. + Interceptors smithyhttp.InterceptorRegistry + + // 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 + + // Priority list of preferred auth scheme names (e.g. sigv4a). + AuthSchemePreference []string +} + +// 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) + to.Interceptors = o.Interceptors.Copy() + + 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/elb/api.go b/vendor/github.com/aws/aws-sdk-go/service/elb/api.go deleted file mode 100644 index 8d6bcf5f8b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/api.go +++ /dev/null @@ -1,7168 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elb - -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/query" -) - -const opAddTags = "AddTags" - -// AddTagsRequest generates a "aws/request.Request" representing the -// client's request for the AddTags 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 AddTags for more information on using the AddTags -// 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 AddTagsRequest method. -// req, resp := client.AddTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AddTags -func (c *ELB) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { - op := &request.Operation{ - Name: opAddTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsInput{} - } - - output = &AddTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTags API operation for Elastic Load Balancing. -// -// Adds the specified tags to the specified load balancer. Each load balancer -// can have a maximum of 10 tags. -// -// Each tag consists of a key and an optional value. If a tag with the same -// key is already associated with the load balancer, AddTags updates its value. -// -// For more information, see Tag Your Classic Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation AddTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeTooManyTagsException "TooManyTags" -// The quota for the number of tags that can be assigned to a load balancer -// has been reached. -// -// - ErrCodeDuplicateTagKeysException "DuplicateTagKeys" -// A tag key was specified more than once. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AddTags -func (c *ELB) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - return out, req.Send() -} - -// AddTagsWithContext is the same as AddTags with the addition of -// the ability to pass a context and additional request options. -// -// See AddTags 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 *ELB) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opApplySecurityGroupsToLoadBalancer = "ApplySecurityGroupsToLoadBalancer" - -// ApplySecurityGroupsToLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the ApplySecurityGroupsToLoadBalancer 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 ApplySecurityGroupsToLoadBalancer for more information on using the ApplySecurityGroupsToLoadBalancer -// 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 ApplySecurityGroupsToLoadBalancerRequest method. -// req, resp := client.ApplySecurityGroupsToLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ApplySecurityGroupsToLoadBalancer -func (c *ELB) ApplySecurityGroupsToLoadBalancerRequest(input *ApplySecurityGroupsToLoadBalancerInput) (req *request.Request, output *ApplySecurityGroupsToLoadBalancerOutput) { - op := &request.Operation{ - Name: opApplySecurityGroupsToLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ApplySecurityGroupsToLoadBalancerInput{} - } - - output = &ApplySecurityGroupsToLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// ApplySecurityGroupsToLoadBalancer API operation for Elastic Load Balancing. -// -// Associates one or more security groups with your load balancer in a virtual -// private cloud (VPC). The specified security groups override the previously -// associated security groups. -// -// For more information, see Security Groups for Load Balancers in a VPC (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-security-groups.html#elb-vpc-security-groups) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation ApplySecurityGroupsToLoadBalancer for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// - ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup" -// One or more of the specified security groups do not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ApplySecurityGroupsToLoadBalancer -func (c *ELB) ApplySecurityGroupsToLoadBalancer(input *ApplySecurityGroupsToLoadBalancerInput) (*ApplySecurityGroupsToLoadBalancerOutput, error) { - req, out := c.ApplySecurityGroupsToLoadBalancerRequest(input) - return out, req.Send() -} - -// ApplySecurityGroupsToLoadBalancerWithContext is the same as ApplySecurityGroupsToLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See ApplySecurityGroupsToLoadBalancer 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 *ELB) ApplySecurityGroupsToLoadBalancerWithContext(ctx aws.Context, input *ApplySecurityGroupsToLoadBalancerInput, opts ...request.Option) (*ApplySecurityGroupsToLoadBalancerOutput, error) { - req, out := c.ApplySecurityGroupsToLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAttachLoadBalancerToSubnets = "AttachLoadBalancerToSubnets" - -// AttachLoadBalancerToSubnetsRequest generates a "aws/request.Request" representing the -// client's request for the AttachLoadBalancerToSubnets 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 AttachLoadBalancerToSubnets for more information on using the AttachLoadBalancerToSubnets -// 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 AttachLoadBalancerToSubnetsRequest method. -// req, resp := client.AttachLoadBalancerToSubnetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AttachLoadBalancerToSubnets -func (c *ELB) AttachLoadBalancerToSubnetsRequest(input *AttachLoadBalancerToSubnetsInput) (req *request.Request, output *AttachLoadBalancerToSubnetsOutput) { - op := &request.Operation{ - Name: opAttachLoadBalancerToSubnets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AttachLoadBalancerToSubnetsInput{} - } - - output = &AttachLoadBalancerToSubnetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AttachLoadBalancerToSubnets API operation for Elastic Load Balancing. -// -// Adds one or more subnets to the set of configured subnets for the specified -// load balancer. -// -// The load balancer evenly distributes requests across all registered subnets. -// For more information, see Add or Remove Subnets for Your Load Balancer in -// a VPC (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-manage-subnets.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation AttachLoadBalancerToSubnets for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// - ErrCodeSubnetNotFoundException "SubnetNotFound" -// One or more of the specified subnets do not exist. -// -// - ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified VPC has no associated Internet gateway. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/AttachLoadBalancerToSubnets -func (c *ELB) AttachLoadBalancerToSubnets(input *AttachLoadBalancerToSubnetsInput) (*AttachLoadBalancerToSubnetsOutput, error) { - req, out := c.AttachLoadBalancerToSubnetsRequest(input) - return out, req.Send() -} - -// AttachLoadBalancerToSubnetsWithContext is the same as AttachLoadBalancerToSubnets with the addition of -// the ability to pass a context and additional request options. -// -// See AttachLoadBalancerToSubnets 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 *ELB) AttachLoadBalancerToSubnetsWithContext(ctx aws.Context, input *AttachLoadBalancerToSubnetsInput, opts ...request.Option) (*AttachLoadBalancerToSubnetsOutput, error) { - req, out := c.AttachLoadBalancerToSubnetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opConfigureHealthCheck = "ConfigureHealthCheck" - -// ConfigureHealthCheckRequest generates a "aws/request.Request" representing the -// client's request for the ConfigureHealthCheck 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 ConfigureHealthCheck for more information on using the ConfigureHealthCheck -// 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 ConfigureHealthCheckRequest method. -// req, resp := client.ConfigureHealthCheckRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ConfigureHealthCheck -func (c *ELB) ConfigureHealthCheckRequest(input *ConfigureHealthCheckInput) (req *request.Request, output *ConfigureHealthCheckOutput) { - op := &request.Operation{ - Name: opConfigureHealthCheck, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ConfigureHealthCheckInput{} - } - - output = &ConfigureHealthCheckOutput{} - req = c.newRequest(op, input, output) - return -} - -// ConfigureHealthCheck API operation for Elastic Load Balancing. -// -// Specifies the health check settings to use when evaluating the health state -// of your EC2 instances. -// -// For more information, see Configure Health Checks for Your Load Balancer -// (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-healthchecks.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation ConfigureHealthCheck for usage and error information. -// -// Returned Error Codes: -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ConfigureHealthCheck -func (c *ELB) ConfigureHealthCheck(input *ConfigureHealthCheckInput) (*ConfigureHealthCheckOutput, error) { - req, out := c.ConfigureHealthCheckRequest(input) - return out, req.Send() -} - -// ConfigureHealthCheckWithContext is the same as ConfigureHealthCheck with the addition of -// the ability to pass a context and additional request options. -// -// See ConfigureHealthCheck 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 *ELB) ConfigureHealthCheckWithContext(ctx aws.Context, input *ConfigureHealthCheckInput, opts ...request.Option) (*ConfigureHealthCheckOutput, error) { - req, out := c.ConfigureHealthCheckRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateAppCookieStickinessPolicy = "CreateAppCookieStickinessPolicy" - -// CreateAppCookieStickinessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateAppCookieStickinessPolicy 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 CreateAppCookieStickinessPolicy for more information on using the CreateAppCookieStickinessPolicy -// 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 CreateAppCookieStickinessPolicyRequest method. -// req, resp := client.CreateAppCookieStickinessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateAppCookieStickinessPolicy -func (c *ELB) CreateAppCookieStickinessPolicyRequest(input *CreateAppCookieStickinessPolicyInput) (req *request.Request, output *CreateAppCookieStickinessPolicyOutput) { - op := &request.Operation{ - Name: opCreateAppCookieStickinessPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateAppCookieStickinessPolicyInput{} - } - - output = &CreateAppCookieStickinessPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateAppCookieStickinessPolicy API operation for Elastic Load Balancing. -// -// Generates a stickiness policy with sticky session lifetimes that follow that -// of an application-generated cookie. This policy can be associated only with -// HTTP/HTTPS listeners. -// -// This policy is similar to the policy created by CreateLBCookieStickinessPolicy, -// except that the lifetime of the special Elastic Load Balancing cookie, AWSELB, -// follows the lifetime of the application-generated cookie specified in the -// policy configuration. The load balancer only inserts a new stickiness cookie -// when the application response includes a new application cookie. -// -// If the application cookie is explicitly removed or expires, the session stops -// being sticky until a new application cookie is issued. -// -// For more information, see Application-Controlled Session Stickiness (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation CreateAppCookieStickinessPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeDuplicatePolicyNameException "DuplicatePolicyName" -// A policy with the specified name already exists for this load balancer. -// -// - ErrCodeTooManyPoliciesException "TooManyPolicies" -// The quota for the number of policies for this load balancer has been reached. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateAppCookieStickinessPolicy -func (c *ELB) CreateAppCookieStickinessPolicy(input *CreateAppCookieStickinessPolicyInput) (*CreateAppCookieStickinessPolicyOutput, error) { - req, out := c.CreateAppCookieStickinessPolicyRequest(input) - return out, req.Send() -} - -// CreateAppCookieStickinessPolicyWithContext is the same as CreateAppCookieStickinessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateAppCookieStickinessPolicy 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 *ELB) CreateAppCookieStickinessPolicyWithContext(ctx aws.Context, input *CreateAppCookieStickinessPolicyInput, opts ...request.Option) (*CreateAppCookieStickinessPolicyOutput, error) { - req, out := c.CreateAppCookieStickinessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLBCookieStickinessPolicy = "CreateLBCookieStickinessPolicy" - -// CreateLBCookieStickinessPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateLBCookieStickinessPolicy 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 CreateLBCookieStickinessPolicy for more information on using the CreateLBCookieStickinessPolicy -// 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 CreateLBCookieStickinessPolicyRequest method. -// req, resp := client.CreateLBCookieStickinessPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLBCookieStickinessPolicy -func (c *ELB) CreateLBCookieStickinessPolicyRequest(input *CreateLBCookieStickinessPolicyInput) (req *request.Request, output *CreateLBCookieStickinessPolicyOutput) { - op := &request.Operation{ - Name: opCreateLBCookieStickinessPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLBCookieStickinessPolicyInput{} - } - - output = &CreateLBCookieStickinessPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLBCookieStickinessPolicy API operation for Elastic Load Balancing. -// -// Generates a stickiness policy with sticky session lifetimes controlled by -// the lifetime of the browser (user-agent) or a specified expiration period. -// This policy can be associated only with HTTP/HTTPS listeners. -// -// When a load balancer implements this policy, the load balancer uses a special -// cookie to track the instance for each request. When the load balancer receives -// a request, it first checks to see if this cookie is present in the request. -// If so, the load balancer sends the request to the application server specified -// in the cookie. If not, the load balancer sends the request to a server that -// is chosen based on the existing load-balancing algorithm. -// -// A cookie is inserted into the response for binding subsequent requests from -// the same user to that server. The validity of the cookie is based on the -// cookie expiration time, which is specified in the policy configuration. -// -// For more information, see Duration-Based Session Stickiness (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation CreateLBCookieStickinessPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeDuplicatePolicyNameException "DuplicatePolicyName" -// A policy with the specified name already exists for this load balancer. -// -// - ErrCodeTooManyPoliciesException "TooManyPolicies" -// The quota for the number of policies for this load balancer has been reached. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLBCookieStickinessPolicy -func (c *ELB) CreateLBCookieStickinessPolicy(input *CreateLBCookieStickinessPolicyInput) (*CreateLBCookieStickinessPolicyOutput, error) { - req, out := c.CreateLBCookieStickinessPolicyRequest(input) - return out, req.Send() -} - -// CreateLBCookieStickinessPolicyWithContext is the same as CreateLBCookieStickinessPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLBCookieStickinessPolicy 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 *ELB) CreateLBCookieStickinessPolicyWithContext(ctx aws.Context, input *CreateLBCookieStickinessPolicyInput, opts ...request.Option) (*CreateLBCookieStickinessPolicyOutput, error) { - req, out := c.CreateLBCookieStickinessPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancer = "CreateLoadBalancer" - -// CreateLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancer 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 CreateLoadBalancer for more information on using the CreateLoadBalancer -// 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 CreateLoadBalancerRequest method. -// req, resp := client.CreateLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancer -func (c *ELB) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *request.Request, output *CreateLoadBalancerOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerInput{} - } - - output = &CreateLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLoadBalancer API operation for Elastic Load Balancing. -// -// Creates a Classic Load Balancer. -// -// You can add listeners, security groups, subnets, and tags when you create -// your load balancer, or you can add them later using CreateLoadBalancerListeners, -// ApplySecurityGroupsToLoadBalancer, AttachLoadBalancerToSubnets, and AddTags. -// -// To describe your current load balancers, see DescribeLoadBalancers. When -// you are finished with a load balancer, you can delete it using DeleteLoadBalancer. -// -// You can create up to 20 load balancers per region per account. You can request -// an increase for the number of load balancers for your account. For more information, -// see Limits for Your Classic Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation CreateLoadBalancer for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeDuplicateAccessPointNameException "DuplicateLoadBalancerName" -// The specified load balancer name already exists for this account. -// -// - ErrCodeTooManyAccessPointsException "TooManyLoadBalancers" -// The quota for the number of load balancers has been reached. -// -// - ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified ARN does not refer to a valid SSL certificate in AWS Identity -// and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if -// you recently uploaded the certificate to IAM, this error might indicate that -// the certificate is not fully available yet. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// - ErrCodeSubnetNotFoundException "SubnetNotFound" -// One or more of the specified subnets do not exist. -// -// - ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified VPC has no associated Internet gateway. -// -// - ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup" -// One or more of the specified security groups do not exist. -// -// - ErrCodeInvalidSchemeException "InvalidScheme" -// The specified value for the schema is not valid. You can only specify a scheme -// for load balancers in a VPC. -// -// - ErrCodeTooManyTagsException "TooManyTags" -// The quota for the number of tags that can be assigned to a load balancer -// has been reached. -// -// - ErrCodeDuplicateTagKeysException "DuplicateTagKeys" -// A tag key was specified more than once. -// -// - ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol or signature version is not supported. -// -// - ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancer -func (c *ELB) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerWithContext is the same as CreateLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancer 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 *ELB) CreateLoadBalancerWithContext(ctx aws.Context, input *CreateLoadBalancerInput, opts ...request.Option) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancerListeners = "CreateLoadBalancerListeners" - -// CreateLoadBalancerListenersRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancerListeners 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 CreateLoadBalancerListeners for more information on using the CreateLoadBalancerListeners -// 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 CreateLoadBalancerListenersRequest method. -// req, resp := client.CreateLoadBalancerListenersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerListeners -func (c *ELB) CreateLoadBalancerListenersRequest(input *CreateLoadBalancerListenersInput) (req *request.Request, output *CreateLoadBalancerListenersOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancerListeners, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerListenersInput{} - } - - output = &CreateLoadBalancerListenersOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLoadBalancerListeners API operation for Elastic Load Balancing. -// -// Creates one or more listeners for the specified load balancer. If a listener -// with the specified port does not already exist, it is created; otherwise, -// the properties of the new listener must match the properties of the existing -// listener. -// -// For more information, see Listeners for Your Classic Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation CreateLoadBalancerListeners for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeDuplicateListenerException "DuplicateListener" -// A listener already exists for the specified load balancer name and port, -// but with a different instance port, protocol, or SSL certificate. -// -// - ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified ARN does not refer to a valid SSL certificate in AWS Identity -// and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if -// you recently uploaded the certificate to IAM, this error might indicate that -// the certificate is not fully available yet. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// - ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol or signature version is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerListeners -func (c *ELB) CreateLoadBalancerListeners(input *CreateLoadBalancerListenersInput) (*CreateLoadBalancerListenersOutput, error) { - req, out := c.CreateLoadBalancerListenersRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerListenersWithContext is the same as CreateLoadBalancerListeners with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancerListeners 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 *ELB) CreateLoadBalancerListenersWithContext(ctx aws.Context, input *CreateLoadBalancerListenersInput, opts ...request.Option) (*CreateLoadBalancerListenersOutput, error) { - req, out := c.CreateLoadBalancerListenersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancerPolicy = "CreateLoadBalancerPolicy" - -// CreateLoadBalancerPolicyRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancerPolicy 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 CreateLoadBalancerPolicy for more information on using the CreateLoadBalancerPolicy -// 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 CreateLoadBalancerPolicyRequest method. -// req, resp := client.CreateLoadBalancerPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerPolicy -func (c *ELB) CreateLoadBalancerPolicyRequest(input *CreateLoadBalancerPolicyInput) (req *request.Request, output *CreateLoadBalancerPolicyOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancerPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerPolicyInput{} - } - - output = &CreateLoadBalancerPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// CreateLoadBalancerPolicy API operation for Elastic Load Balancing. -// -// Creates a policy with the specified attributes for the specified load balancer. -// -// Policies are settings that are saved for your load balancer and that can -// be applied to the listener or the application server, depending on the policy -// type. -// -// 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 Elastic Load Balancing's -// API operation CreateLoadBalancerPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodePolicyTypeNotFoundException "PolicyTypeNotFound" -// One or more of the specified policy types do not exist. -// -// - ErrCodeDuplicatePolicyNameException "DuplicatePolicyName" -// A policy with the specified name already exists for this load balancer. -// -// - ErrCodeTooManyPoliciesException "TooManyPolicies" -// The quota for the number of policies for this load balancer has been reached. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/CreateLoadBalancerPolicy -func (c *ELB) CreateLoadBalancerPolicy(input *CreateLoadBalancerPolicyInput) (*CreateLoadBalancerPolicyOutput, error) { - req, out := c.CreateLoadBalancerPolicyRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerPolicyWithContext is the same as CreateLoadBalancerPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancerPolicy 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 *ELB) CreateLoadBalancerPolicyWithContext(ctx aws.Context, input *CreateLoadBalancerPolicyInput, opts ...request.Option) (*CreateLoadBalancerPolicyOutput, error) { - req, out := c.CreateLoadBalancerPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancer = "DeleteLoadBalancer" - -// DeleteLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancer 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 DeleteLoadBalancer for more information on using the DeleteLoadBalancer -// 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 DeleteLoadBalancerRequest method. -// req, resp := client.DeleteLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancer -func (c *ELB) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerInput{} - } - - output = &DeleteLoadBalancerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoadBalancer API operation for Elastic Load Balancing. -// -// Deletes the specified load balancer. -// -// If you are attempting to recreate a load balancer, you must reconfigure all -// settings. The DNS name associated with a deleted load balancer are no longer -// usable. The name and associated DNS record of the deleted load balancer no -// longer exist and traffic sent to any of its IP addresses is no longer delivered -// to your instances. -// -// If the load balancer does not exist or has already been deleted, the call -// to DeleteLoadBalancer still succeeds. -// -// 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 Elastic Load Balancing's -// API operation DeleteLoadBalancer for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancer -func (c *ELB) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerWithContext is the same as DeleteLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancer 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 *ELB) DeleteLoadBalancerWithContext(ctx aws.Context, input *DeleteLoadBalancerInput, opts ...request.Option) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancerListeners = "DeleteLoadBalancerListeners" - -// DeleteLoadBalancerListenersRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancerListeners 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 DeleteLoadBalancerListeners for more information on using the DeleteLoadBalancerListeners -// 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 DeleteLoadBalancerListenersRequest method. -// req, resp := client.DeleteLoadBalancerListenersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerListeners -func (c *ELB) DeleteLoadBalancerListenersRequest(input *DeleteLoadBalancerListenersInput) (req *request.Request, output *DeleteLoadBalancerListenersOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancerListeners, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerListenersInput{} - } - - output = &DeleteLoadBalancerListenersOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoadBalancerListeners API operation for Elastic Load Balancing. -// -// Deletes the specified listeners from the specified load balancer. -// -// 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 Elastic Load Balancing's -// API operation DeleteLoadBalancerListeners for usage and error information. -// -// Returned Error Codes: -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerListeners -func (c *ELB) DeleteLoadBalancerListeners(input *DeleteLoadBalancerListenersInput) (*DeleteLoadBalancerListenersOutput, error) { - req, out := c.DeleteLoadBalancerListenersRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerListenersWithContext is the same as DeleteLoadBalancerListeners with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancerListeners 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 *ELB) DeleteLoadBalancerListenersWithContext(ctx aws.Context, input *DeleteLoadBalancerListenersInput, opts ...request.Option) (*DeleteLoadBalancerListenersOutput, error) { - req, out := c.DeleteLoadBalancerListenersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancerPolicy = "DeleteLoadBalancerPolicy" - -// DeleteLoadBalancerPolicyRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancerPolicy 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 DeleteLoadBalancerPolicy for more information on using the DeleteLoadBalancerPolicy -// 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 DeleteLoadBalancerPolicyRequest method. -// req, resp := client.DeleteLoadBalancerPolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerPolicy -func (c *ELB) DeleteLoadBalancerPolicyRequest(input *DeleteLoadBalancerPolicyInput) (req *request.Request, output *DeleteLoadBalancerPolicyOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancerPolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerPolicyInput{} - } - - output = &DeleteLoadBalancerPolicyOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoadBalancerPolicy API operation for Elastic Load Balancing. -// -// Deletes the specified policy from the specified load balancer. This policy -// must not be enabled for any listeners. -// -// 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 Elastic Load Balancing's -// API operation DeleteLoadBalancerPolicy for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeleteLoadBalancerPolicy -func (c *ELB) DeleteLoadBalancerPolicy(input *DeleteLoadBalancerPolicyInput) (*DeleteLoadBalancerPolicyOutput, error) { - req, out := c.DeleteLoadBalancerPolicyRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerPolicyWithContext is the same as DeleteLoadBalancerPolicy with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancerPolicy 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 *ELB) DeleteLoadBalancerPolicyWithContext(ctx aws.Context, input *DeleteLoadBalancerPolicyInput, opts ...request.Option) (*DeleteLoadBalancerPolicyOutput, error) { - req, out := c.DeleteLoadBalancerPolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterInstancesFromLoadBalancer = "DeregisterInstancesFromLoadBalancer" - -// DeregisterInstancesFromLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterInstancesFromLoadBalancer 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 DeregisterInstancesFromLoadBalancer for more information on using the DeregisterInstancesFromLoadBalancer -// 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 DeregisterInstancesFromLoadBalancerRequest method. -// req, resp := client.DeregisterInstancesFromLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeregisterInstancesFromLoadBalancer -func (c *ELB) DeregisterInstancesFromLoadBalancerRequest(input *DeregisterInstancesFromLoadBalancerInput) (req *request.Request, output *DeregisterInstancesFromLoadBalancerOutput) { - op := &request.Operation{ - Name: opDeregisterInstancesFromLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterInstancesFromLoadBalancerInput{} - } - - output = &DeregisterInstancesFromLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DeregisterInstancesFromLoadBalancer API operation for Elastic Load Balancing. -// -// Deregisters the specified instances from the specified load balancer. After -// the instance is deregistered, it no longer receives traffic from the load -// balancer. -// -// You can use DescribeLoadBalancers to verify that the instance is deregistered -// from the load balancer. -// -// For more information, see Register or De-Register EC2 Instances (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation DeregisterInstancesFromLoadBalancer for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidEndPointException "InvalidInstance" -// The specified endpoint is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DeregisterInstancesFromLoadBalancer -func (c *ELB) DeregisterInstancesFromLoadBalancer(input *DeregisterInstancesFromLoadBalancerInput) (*DeregisterInstancesFromLoadBalancerOutput, error) { - req, out := c.DeregisterInstancesFromLoadBalancerRequest(input) - return out, req.Send() -} - -// DeregisterInstancesFromLoadBalancerWithContext is the same as DeregisterInstancesFromLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterInstancesFromLoadBalancer 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 *ELB) DeregisterInstancesFromLoadBalancerWithContext(ctx aws.Context, input *DeregisterInstancesFromLoadBalancerInput, opts ...request.Option) (*DeregisterInstancesFromLoadBalancerOutput, error) { - req, out := c.DeregisterInstancesFromLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountLimits = "DescribeAccountLimits" - -// DescribeAccountLimitsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountLimits 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 DescribeAccountLimits for more information on using the DescribeAccountLimits -// 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 DescribeAccountLimitsRequest method. -// req, resp := client.DescribeAccountLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeAccountLimits -func (c *ELB) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) { - op := &request.Operation{ - Name: opDescribeAccountLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountLimitsInput{} - } - - output = &DescribeAccountLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountLimits API operation for Elastic Load Balancing. -// -// Describes the current Elastic Load Balancing resource limits for your AWS -// account. -// -// For more information, see Limits for Your Classic Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-limits.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation DescribeAccountLimits for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeAccountLimits -func (c *ELB) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - return out, req.Send() -} - -// DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountLimits 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 *ELB) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeInstanceHealth = "DescribeInstanceHealth" - -// DescribeInstanceHealthRequest generates a "aws/request.Request" representing the -// client's request for the DescribeInstanceHealth 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 DescribeInstanceHealth for more information on using the DescribeInstanceHealth -// 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 DescribeInstanceHealthRequest method. -// req, resp := client.DescribeInstanceHealthRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeInstanceHealth -func (c *ELB) DescribeInstanceHealthRequest(input *DescribeInstanceHealthInput) (req *request.Request, output *DescribeInstanceHealthOutput) { - op := &request.Operation{ - Name: opDescribeInstanceHealth, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeInstanceHealthInput{} - } - - output = &DescribeInstanceHealthOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeInstanceHealth API operation for Elastic Load Balancing. -// -// Describes the state of the specified instances with respect to the specified -// load balancer. If no instances are specified, the call describes the state -// of all instances that are currently registered with the load balancer. If -// instances are specified, their state is returned even if they are no longer -// registered with the load balancer. The state of terminated instances is not -// 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 Elastic Load Balancing's -// API operation DescribeInstanceHealth for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidEndPointException "InvalidInstance" -// The specified endpoint is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeInstanceHealth -func (c *ELB) DescribeInstanceHealth(input *DescribeInstanceHealthInput) (*DescribeInstanceHealthOutput, error) { - req, out := c.DescribeInstanceHealthRequest(input) - return out, req.Send() -} - -// DescribeInstanceHealthWithContext is the same as DescribeInstanceHealth with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeInstanceHealth 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 *ELB) DescribeInstanceHealthWithContext(ctx aws.Context, input *DescribeInstanceHealthInput, opts ...request.Option) (*DescribeInstanceHealthOutput, error) { - req, out := c.DescribeInstanceHealthRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" - -// DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancerAttributes 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 DescribeLoadBalancerAttributes for more information on using the DescribeLoadBalancerAttributes -// 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 DescribeLoadBalancerAttributesRequest method. -// req, resp := client.DescribeLoadBalancerAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerAttributes -func (c *ELB) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) (req *request.Request, output *DescribeLoadBalancerAttributesOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancerAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancerAttributesInput{} - } - - output = &DescribeLoadBalancerAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancerAttributes API operation for Elastic Load Balancing. -// -// Describes the attributes for the specified load balancer. -// -// 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 Elastic Load Balancing's -// API operation DescribeLoadBalancerAttributes for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeLoadBalancerAttributeNotFoundException "LoadBalancerAttributeNotFound" -// The specified load balancer attribute does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerAttributes -func (c *ELB) DescribeLoadBalancerAttributes(input *DescribeLoadBalancerAttributesInput) (*DescribeLoadBalancerAttributesOutput, error) { - req, out := c.DescribeLoadBalancerAttributesRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancerAttributesWithContext is the same as DescribeLoadBalancerAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancerAttributes 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 *ELB) DescribeLoadBalancerAttributesWithContext(ctx aws.Context, input *DescribeLoadBalancerAttributesInput, opts ...request.Option) (*DescribeLoadBalancerAttributesOutput, error) { - req, out := c.DescribeLoadBalancerAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancerPolicies = "DescribeLoadBalancerPolicies" - -// DescribeLoadBalancerPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancerPolicies 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 DescribeLoadBalancerPolicies for more information on using the DescribeLoadBalancerPolicies -// 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 DescribeLoadBalancerPoliciesRequest method. -// req, resp := client.DescribeLoadBalancerPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicies -func (c *ELB) DescribeLoadBalancerPoliciesRequest(input *DescribeLoadBalancerPoliciesInput) (req *request.Request, output *DescribeLoadBalancerPoliciesOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancerPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancerPoliciesInput{} - } - - output = &DescribeLoadBalancerPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancerPolicies API operation for Elastic Load Balancing. -// -// Describes the specified policies. -// -// If you specify a load balancer name, the action returns the descriptions -// of all policies created for the load balancer. If you specify a policy name -// associated with your load balancer, the action returns the description of -// that policy. If you don't specify a load balancer name, the action returns -// descriptions of the specified sample policies, or descriptions of all sample -// policies. The names of the sample policies have the ELBSample- prefix. -// -// 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 Elastic Load Balancing's -// API operation DescribeLoadBalancerPolicies for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodePolicyNotFoundException "PolicyNotFound" -// One or more of the specified policies do not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicies -func (c *ELB) DescribeLoadBalancerPolicies(input *DescribeLoadBalancerPoliciesInput) (*DescribeLoadBalancerPoliciesOutput, error) { - req, out := c.DescribeLoadBalancerPoliciesRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancerPoliciesWithContext is the same as DescribeLoadBalancerPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancerPolicies 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 *ELB) DescribeLoadBalancerPoliciesWithContext(ctx aws.Context, input *DescribeLoadBalancerPoliciesInput, opts ...request.Option) (*DescribeLoadBalancerPoliciesOutput, error) { - req, out := c.DescribeLoadBalancerPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancerPolicyTypes = "DescribeLoadBalancerPolicyTypes" - -// DescribeLoadBalancerPolicyTypesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancerPolicyTypes 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 DescribeLoadBalancerPolicyTypes for more information on using the DescribeLoadBalancerPolicyTypes -// 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 DescribeLoadBalancerPolicyTypesRequest method. -// req, resp := client.DescribeLoadBalancerPolicyTypesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicyTypes -func (c *ELB) DescribeLoadBalancerPolicyTypesRequest(input *DescribeLoadBalancerPolicyTypesInput) (req *request.Request, output *DescribeLoadBalancerPolicyTypesOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancerPolicyTypes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancerPolicyTypesInput{} - } - - output = &DescribeLoadBalancerPolicyTypesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancerPolicyTypes API operation for Elastic Load Balancing. -// -// Describes the specified load balancer policy types or all load balancer policy -// types. -// -// The description of each type indicates how it can be used. For example, some -// policies can be used only with layer 7 listeners, some policies can be used -// only with layer 4 listeners, and some policies can be used only with your -// EC2 instances. -// -// You can use CreateLoadBalancerPolicy to create a policy configuration for -// any of these policy types. Then, depending on the policy type, use either -// SetLoadBalancerPoliciesOfListener or SetLoadBalancerPoliciesForBackendServer -// to set the policy. -// -// 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 Elastic Load Balancing's -// API operation DescribeLoadBalancerPolicyTypes for usage and error information. -// -// Returned Error Codes: -// - ErrCodePolicyTypeNotFoundException "PolicyTypeNotFound" -// One or more of the specified policy types do not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancerPolicyTypes -func (c *ELB) DescribeLoadBalancerPolicyTypes(input *DescribeLoadBalancerPolicyTypesInput) (*DescribeLoadBalancerPolicyTypesOutput, error) { - req, out := c.DescribeLoadBalancerPolicyTypesRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancerPolicyTypesWithContext is the same as DescribeLoadBalancerPolicyTypes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancerPolicyTypes 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 *ELB) DescribeLoadBalancerPolicyTypesWithContext(ctx aws.Context, input *DescribeLoadBalancerPolicyTypesInput, opts ...request.Option) (*DescribeLoadBalancerPolicyTypesOutput, error) { - req, out := c.DescribeLoadBalancerPolicyTypesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancers = "DescribeLoadBalancers" - -// DescribeLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancers 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 DescribeLoadBalancers for more information on using the DescribeLoadBalancers -// 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 DescribeLoadBalancersRequest method. -// req, resp := client.DescribeLoadBalancersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancers -func (c *ELB) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeLoadBalancersInput{} - } - - output = &DescribeLoadBalancersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancers API operation for Elastic Load Balancing. -// -// Describes the specified the load balancers. If no load balancers are specified, -// the call describes all of your load balancers. -// -// 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 Elastic Load Balancing's -// API operation DescribeLoadBalancers for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeDependencyThrottleException "DependencyThrottle" -// A request made by Elastic Load Balancing to another service exceeds the maximum -// request rate permitted for your account. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeLoadBalancers -func (c *ELB) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancersWithContext is the same as DescribeLoadBalancers with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancers 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 *ELB) DescribeLoadBalancersWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.Option) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeLoadBalancersPages iterates over the pages of a DescribeLoadBalancers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeLoadBalancers 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 DescribeLoadBalancers operation. -// pageNum := 0 -// err := client.DescribeLoadBalancersPages(params, -// func(page *elb.DescribeLoadBalancersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ELB) DescribeLoadBalancersPages(input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool) error { - return c.DescribeLoadBalancersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeLoadBalancersPagesWithContext same as DescribeLoadBalancersPages 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 *ELB) DescribeLoadBalancersPagesWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeLoadBalancersOutput), !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/elasticloadbalancing-2012-06-01/DescribeTags -func (c *ELB) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Elastic Load Balancing. -// -// Describes the tags associated with the specified load balancers. -// -// 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 Elastic Load Balancing's -// API operation DescribeTags for usage and error information. -// -// Returned Error Codes: -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DescribeTags -func (c *ELB) 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. -func (c *ELB) 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() -} - -const opDetachLoadBalancerFromSubnets = "DetachLoadBalancerFromSubnets" - -// DetachLoadBalancerFromSubnetsRequest generates a "aws/request.Request" representing the -// client's request for the DetachLoadBalancerFromSubnets 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 DetachLoadBalancerFromSubnets for more information on using the DetachLoadBalancerFromSubnets -// 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 DetachLoadBalancerFromSubnetsRequest method. -// req, resp := client.DetachLoadBalancerFromSubnetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DetachLoadBalancerFromSubnets -func (c *ELB) DetachLoadBalancerFromSubnetsRequest(input *DetachLoadBalancerFromSubnetsInput) (req *request.Request, output *DetachLoadBalancerFromSubnetsOutput) { - op := &request.Operation{ - Name: opDetachLoadBalancerFromSubnets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DetachLoadBalancerFromSubnetsInput{} - } - - output = &DetachLoadBalancerFromSubnetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DetachLoadBalancerFromSubnets API operation for Elastic Load Balancing. -// -// Removes the specified subnets from the set of configured subnets for the -// load balancer. -// -// After a subnet is removed, all EC2 instances registered with the load balancer -// in the removed subnet go into the OutOfService state. Then, the load balancer -// balances the traffic among the remaining routable subnets. -// -// 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 Elastic Load Balancing's -// API operation DetachLoadBalancerFromSubnets for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DetachLoadBalancerFromSubnets -func (c *ELB) DetachLoadBalancerFromSubnets(input *DetachLoadBalancerFromSubnetsInput) (*DetachLoadBalancerFromSubnetsOutput, error) { - req, out := c.DetachLoadBalancerFromSubnetsRequest(input) - return out, req.Send() -} - -// DetachLoadBalancerFromSubnetsWithContext is the same as DetachLoadBalancerFromSubnets with the addition of -// the ability to pass a context and additional request options. -// -// See DetachLoadBalancerFromSubnets 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 *ELB) DetachLoadBalancerFromSubnetsWithContext(ctx aws.Context, input *DetachLoadBalancerFromSubnetsInput, opts ...request.Option) (*DetachLoadBalancerFromSubnetsOutput, error) { - req, out := c.DetachLoadBalancerFromSubnetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDisableAvailabilityZonesForLoadBalancer = "DisableAvailabilityZonesForLoadBalancer" - -// DisableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DisableAvailabilityZonesForLoadBalancer 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 DisableAvailabilityZonesForLoadBalancer for more information on using the DisableAvailabilityZonesForLoadBalancer -// 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 DisableAvailabilityZonesForLoadBalancerRequest method. -// req, resp := client.DisableAvailabilityZonesForLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DisableAvailabilityZonesForLoadBalancer -func (c *ELB) DisableAvailabilityZonesForLoadBalancerRequest(input *DisableAvailabilityZonesForLoadBalancerInput) (req *request.Request, output *DisableAvailabilityZonesForLoadBalancerOutput) { - op := &request.Operation{ - Name: opDisableAvailabilityZonesForLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DisableAvailabilityZonesForLoadBalancerInput{} - } - - output = &DisableAvailabilityZonesForLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// DisableAvailabilityZonesForLoadBalancer API operation for Elastic Load Balancing. -// -// Removes the specified Availability Zones from the set of Availability Zones -// for the specified load balancer in EC2-Classic or a default VPC. -// -// For load balancers in a non-default VPC, use DetachLoadBalancerFromSubnets. -// -// There must be at least one Availability Zone registered with a load balancer -// at all times. After an Availability Zone is removed, all instances registered -// with the load balancer that are in the removed Availability Zone go into -// the OutOfService state. Then, the load balancer attempts to equally balance -// the traffic among its remaining Availability Zones. -// -// For more information, see Add or Remove Availability Zones (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation DisableAvailabilityZonesForLoadBalancer for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/DisableAvailabilityZonesForLoadBalancer -func (c *ELB) DisableAvailabilityZonesForLoadBalancer(input *DisableAvailabilityZonesForLoadBalancerInput) (*DisableAvailabilityZonesForLoadBalancerOutput, error) { - req, out := c.DisableAvailabilityZonesForLoadBalancerRequest(input) - return out, req.Send() -} - -// DisableAvailabilityZonesForLoadBalancerWithContext is the same as DisableAvailabilityZonesForLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DisableAvailabilityZonesForLoadBalancer 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 *ELB) DisableAvailabilityZonesForLoadBalancerWithContext(ctx aws.Context, input *DisableAvailabilityZonesForLoadBalancerInput, opts ...request.Option) (*DisableAvailabilityZonesForLoadBalancerOutput, error) { - req, out := c.DisableAvailabilityZonesForLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opEnableAvailabilityZonesForLoadBalancer = "EnableAvailabilityZonesForLoadBalancer" - -// EnableAvailabilityZonesForLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the EnableAvailabilityZonesForLoadBalancer 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 EnableAvailabilityZonesForLoadBalancer for more information on using the EnableAvailabilityZonesForLoadBalancer -// 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 EnableAvailabilityZonesForLoadBalancerRequest method. -// req, resp := client.EnableAvailabilityZonesForLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/EnableAvailabilityZonesForLoadBalancer -func (c *ELB) EnableAvailabilityZonesForLoadBalancerRequest(input *EnableAvailabilityZonesForLoadBalancerInput) (req *request.Request, output *EnableAvailabilityZonesForLoadBalancerOutput) { - op := &request.Operation{ - Name: opEnableAvailabilityZonesForLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &EnableAvailabilityZonesForLoadBalancerInput{} - } - - output = &EnableAvailabilityZonesForLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// EnableAvailabilityZonesForLoadBalancer API operation for Elastic Load Balancing. -// -// Adds the specified Availability Zones to the set of Availability Zones for -// the specified load balancer in EC2-Classic or a default VPC. -// -// For load balancers in a non-default VPC, use AttachLoadBalancerToSubnets. -// -// The load balancer evenly distributes requests across all its registered Availability -// Zones that contain instances. For more information, see Add or Remove Availability -// Zones (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-az.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation EnableAvailabilityZonesForLoadBalancer for usage and error information. -// -// Returned Error Codes: -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/EnableAvailabilityZonesForLoadBalancer -func (c *ELB) EnableAvailabilityZonesForLoadBalancer(input *EnableAvailabilityZonesForLoadBalancerInput) (*EnableAvailabilityZonesForLoadBalancerOutput, error) { - req, out := c.EnableAvailabilityZonesForLoadBalancerRequest(input) - return out, req.Send() -} - -// EnableAvailabilityZonesForLoadBalancerWithContext is the same as EnableAvailabilityZonesForLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See EnableAvailabilityZonesForLoadBalancer 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 *ELB) EnableAvailabilityZonesForLoadBalancerWithContext(ctx aws.Context, input *EnableAvailabilityZonesForLoadBalancerInput, opts ...request.Option) (*EnableAvailabilityZonesForLoadBalancerOutput, error) { - req, out := c.EnableAvailabilityZonesForLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" - -// ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyLoadBalancerAttributes 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 ModifyLoadBalancerAttributes for more information on using the ModifyLoadBalancerAttributes -// 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 ModifyLoadBalancerAttributesRequest method. -// req, resp := client.ModifyLoadBalancerAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ModifyLoadBalancerAttributes -func (c *ELB) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *request.Request, output *ModifyLoadBalancerAttributesOutput) { - op := &request.Operation{ - Name: opModifyLoadBalancerAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyLoadBalancerAttributesInput{} - } - - output = &ModifyLoadBalancerAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyLoadBalancerAttributes API operation for Elastic Load Balancing. -// -// Modifies the attributes of the specified load balancer. -// -// You can modify the load balancer attributes, such as AccessLogs, ConnectionDraining, -// and CrossZoneLoadBalancing by either enabling or disabling them. Or, you -// can modify the load balancer attribute ConnectionSettings by specifying an -// idle connection timeout value for your load balancer. -// -// For more information, see the following in the Classic Load Balancers Guide: -// -// - Cross-Zone Load Balancing (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html) -// -// - Connection Draining (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html) -// -// - Access Logs (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/access-log-collection.html) -// -// - Idle Connection Timeout (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.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 Elastic Load Balancing's -// API operation ModifyLoadBalancerAttributes for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeLoadBalancerAttributeNotFoundException "LoadBalancerAttributeNotFound" -// The specified load balancer attribute does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/ModifyLoadBalancerAttributes -func (c *ELB) ModifyLoadBalancerAttributes(input *ModifyLoadBalancerAttributesInput) (*ModifyLoadBalancerAttributesOutput, error) { - req, out := c.ModifyLoadBalancerAttributesRequest(input) - return out, req.Send() -} - -// ModifyLoadBalancerAttributesWithContext is the same as ModifyLoadBalancerAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyLoadBalancerAttributes 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 *ELB) ModifyLoadBalancerAttributesWithContext(ctx aws.Context, input *ModifyLoadBalancerAttributesInput, opts ...request.Option) (*ModifyLoadBalancerAttributesOutput, error) { - req, out := c.ModifyLoadBalancerAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterInstancesWithLoadBalancer = "RegisterInstancesWithLoadBalancer" - -// RegisterInstancesWithLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the RegisterInstancesWithLoadBalancer 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 RegisterInstancesWithLoadBalancer for more information on using the RegisterInstancesWithLoadBalancer -// 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 RegisterInstancesWithLoadBalancerRequest method. -// req, resp := client.RegisterInstancesWithLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RegisterInstancesWithLoadBalancer -func (c *ELB) RegisterInstancesWithLoadBalancerRequest(input *RegisterInstancesWithLoadBalancerInput) (req *request.Request, output *RegisterInstancesWithLoadBalancerOutput) { - op := &request.Operation{ - Name: opRegisterInstancesWithLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterInstancesWithLoadBalancerInput{} - } - - output = &RegisterInstancesWithLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// RegisterInstancesWithLoadBalancer API operation for Elastic Load Balancing. -// -// Adds the specified instances to the specified load balancer. -// -// The instance must be a running instance in the same network as the load balancer -// (EC2-Classic or the same VPC). If you have EC2-Classic instances and a load -// balancer in a VPC with ClassicLink enabled, you can link the EC2-Classic -// instances to that VPC and then register the linked EC2-Classic instances -// with the load balancer in the VPC. -// -// Note that RegisterInstanceWithLoadBalancer completes when the request has -// been registered. Instance registration takes a little time to complete. To -// check the state of the registered instances, use DescribeLoadBalancers or -// DescribeInstanceHealth. -// -// After the instance is registered, it starts receiving traffic and requests -// from the load balancer. Any instance that is not in one of the Availability -// Zones registered for the load balancer is moved to the OutOfService state. -// If an Availability Zone is added to the load balancer later, any instances -// registered with the load balancer move to the InService state. -// -// To deregister instances from a load balancer, use DeregisterInstancesFromLoadBalancer. -// -// For more information, see Register or De-Register EC2 Instances (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-deregister-register-instances.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation RegisterInstancesWithLoadBalancer for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidEndPointException "InvalidInstance" -// The specified endpoint is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RegisterInstancesWithLoadBalancer -func (c *ELB) RegisterInstancesWithLoadBalancer(input *RegisterInstancesWithLoadBalancerInput) (*RegisterInstancesWithLoadBalancerOutput, error) { - req, out := c.RegisterInstancesWithLoadBalancerRequest(input) - return out, req.Send() -} - -// RegisterInstancesWithLoadBalancerWithContext is the same as RegisterInstancesWithLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterInstancesWithLoadBalancer 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 *ELB) RegisterInstancesWithLoadBalancerWithContext(ctx aws.Context, input *RegisterInstancesWithLoadBalancerInput, opts ...request.Option) (*RegisterInstancesWithLoadBalancerOutput, error) { - req, out := c.RegisterInstancesWithLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTags = "RemoveTags" - -// RemoveTagsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTags 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 RemoveTags for more information on using the RemoveTags -// 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 RemoveTagsRequest method. -// req, resp := client.RemoveTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RemoveTags -func (c *ELB) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { - op := &request.Operation{ - Name: opRemoveTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsInput{} - } - - output = &RemoveTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTags API operation for Elastic Load Balancing. -// -// Removes one or more tags from the specified load balancer. -// -// 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 Elastic Load Balancing's -// API operation RemoveTags for usage and error information. -// -// Returned Error Codes: -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/RemoveTags -func (c *ELB) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - return out, req.Send() -} - -// RemoveTagsWithContext is the same as RemoveTags with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTags 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 *ELB) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetLoadBalancerListenerSSLCertificate = "SetLoadBalancerListenerSSLCertificate" - -// SetLoadBalancerListenerSSLCertificateRequest generates a "aws/request.Request" representing the -// client's request for the SetLoadBalancerListenerSSLCertificate 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 SetLoadBalancerListenerSSLCertificate for more information on using the SetLoadBalancerListenerSSLCertificate -// 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 SetLoadBalancerListenerSSLCertificateRequest method. -// req, resp := client.SetLoadBalancerListenerSSLCertificateRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerListenerSSLCertificate -func (c *ELB) SetLoadBalancerListenerSSLCertificateRequest(input *SetLoadBalancerListenerSSLCertificateInput) (req *request.Request, output *SetLoadBalancerListenerSSLCertificateOutput) { - op := &request.Operation{ - Name: opSetLoadBalancerListenerSSLCertificate, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetLoadBalancerListenerSSLCertificateInput{} - } - - output = &SetLoadBalancerListenerSSLCertificateOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetLoadBalancerListenerSSLCertificate API operation for Elastic Load Balancing. -// -// Sets the certificate that terminates the specified listener's SSL connections. -// The specified certificate replaces any prior certificate that was used on -// the same load balancer and port. -// -// For more information about updating your SSL certificate, see Replace the -// SSL Certificate for Your Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-update-ssl-cert.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation SetLoadBalancerListenerSSLCertificate for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified ARN does not refer to a valid SSL certificate in AWS Identity -// and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if -// you recently uploaded the certificate to IAM, this error might indicate that -// the certificate is not fully available yet. -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The load balancer does not have a listener configured at the specified port. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// - ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol or signature version is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerListenerSSLCertificate -func (c *ELB) SetLoadBalancerListenerSSLCertificate(input *SetLoadBalancerListenerSSLCertificateInput) (*SetLoadBalancerListenerSSLCertificateOutput, error) { - req, out := c.SetLoadBalancerListenerSSLCertificateRequest(input) - return out, req.Send() -} - -// SetLoadBalancerListenerSSLCertificateWithContext is the same as SetLoadBalancerListenerSSLCertificate with the addition of -// the ability to pass a context and additional request options. -// -// See SetLoadBalancerListenerSSLCertificate 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 *ELB) SetLoadBalancerListenerSSLCertificateWithContext(ctx aws.Context, input *SetLoadBalancerListenerSSLCertificateInput, opts ...request.Option) (*SetLoadBalancerListenerSSLCertificateOutput, error) { - req, out := c.SetLoadBalancerListenerSSLCertificateRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetLoadBalancerPoliciesForBackendServer = "SetLoadBalancerPoliciesForBackendServer" - -// SetLoadBalancerPoliciesForBackendServerRequest generates a "aws/request.Request" representing the -// client's request for the SetLoadBalancerPoliciesForBackendServer 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 SetLoadBalancerPoliciesForBackendServer for more information on using the SetLoadBalancerPoliciesForBackendServer -// 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 SetLoadBalancerPoliciesForBackendServerRequest method. -// req, resp := client.SetLoadBalancerPoliciesForBackendServerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesForBackendServer -func (c *ELB) SetLoadBalancerPoliciesForBackendServerRequest(input *SetLoadBalancerPoliciesForBackendServerInput) (req *request.Request, output *SetLoadBalancerPoliciesForBackendServerOutput) { - op := &request.Operation{ - Name: opSetLoadBalancerPoliciesForBackendServer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetLoadBalancerPoliciesForBackendServerInput{} - } - - output = &SetLoadBalancerPoliciesForBackendServerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetLoadBalancerPoliciesForBackendServer API operation for Elastic Load Balancing. -// -// Replaces the set of policies associated with the specified port on which -// the EC2 instance is listening with a new set of policies. At this time, only -// the back-end server authentication policy type can be applied to the instance -// ports; this policy type is composed of multiple public key policies. -// -// Each time you use SetLoadBalancerPoliciesForBackendServer to enable the policies, -// use the PolicyNames parameter to list the policies that you want to enable. -// -// You can use DescribeLoadBalancers or DescribeLoadBalancerPolicies to verify -// that the policy is associated with the EC2 instance. -// -// For more information about enabling back-end instance authentication, see -// Configure Back-end Instance Authentication (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-create-https-ssl-load-balancer.html#configure_backendauth_clt) -// in the Classic Load Balancers Guide. For more information about Proxy Protocol, -// see Configure Proxy Protocol Support (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-proxy-protocol.html) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation SetLoadBalancerPoliciesForBackendServer for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodePolicyNotFoundException "PolicyNotFound" -// One or more of the specified policies do not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesForBackendServer -func (c *ELB) SetLoadBalancerPoliciesForBackendServer(input *SetLoadBalancerPoliciesForBackendServerInput) (*SetLoadBalancerPoliciesForBackendServerOutput, error) { - req, out := c.SetLoadBalancerPoliciesForBackendServerRequest(input) - return out, req.Send() -} - -// SetLoadBalancerPoliciesForBackendServerWithContext is the same as SetLoadBalancerPoliciesForBackendServer with the addition of -// the ability to pass a context and additional request options. -// -// See SetLoadBalancerPoliciesForBackendServer 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 *ELB) SetLoadBalancerPoliciesForBackendServerWithContext(ctx aws.Context, input *SetLoadBalancerPoliciesForBackendServerInput, opts ...request.Option) (*SetLoadBalancerPoliciesForBackendServerOutput, error) { - req, out := c.SetLoadBalancerPoliciesForBackendServerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetLoadBalancerPoliciesOfListener = "SetLoadBalancerPoliciesOfListener" - -// SetLoadBalancerPoliciesOfListenerRequest generates a "aws/request.Request" representing the -// client's request for the SetLoadBalancerPoliciesOfListener 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 SetLoadBalancerPoliciesOfListener for more information on using the SetLoadBalancerPoliciesOfListener -// 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 SetLoadBalancerPoliciesOfListenerRequest method. -// req, resp := client.SetLoadBalancerPoliciesOfListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesOfListener -func (c *ELB) SetLoadBalancerPoliciesOfListenerRequest(input *SetLoadBalancerPoliciesOfListenerInput) (req *request.Request, output *SetLoadBalancerPoliciesOfListenerOutput) { - op := &request.Operation{ - Name: opSetLoadBalancerPoliciesOfListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetLoadBalancerPoliciesOfListenerInput{} - } - - output = &SetLoadBalancerPoliciesOfListenerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// SetLoadBalancerPoliciesOfListener API operation for Elastic Load Balancing. -// -// Replaces the current set of policies for the specified load balancer port -// with the specified set of policies. -// -// To enable back-end server authentication, use SetLoadBalancerPoliciesForBackendServer. -// -// For more information about setting policies, see Update the SSL Negotiation -// Configuration (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/ssl-config-update.html), -// Duration-Based Session Stickiness (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-duration), -// and Application-Controlled Session Stickiness (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-sticky-sessions.html#enable-sticky-sessions-application) -// in the Classic Load Balancers 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 Elastic Load Balancing's -// API operation SetLoadBalancerPoliciesOfListener for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeAccessPointNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodePolicyNotFoundException "PolicyNotFound" -// One or more of the specified policies do not exist. -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The load balancer does not have a listener configured at the specified port. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration change is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01/SetLoadBalancerPoliciesOfListener -func (c *ELB) SetLoadBalancerPoliciesOfListener(input *SetLoadBalancerPoliciesOfListenerInput) (*SetLoadBalancerPoliciesOfListenerOutput, error) { - req, out := c.SetLoadBalancerPoliciesOfListenerRequest(input) - return out, req.Send() -} - -// SetLoadBalancerPoliciesOfListenerWithContext is the same as SetLoadBalancerPoliciesOfListener with the addition of -// the ability to pass a context and additional request options. -// -// See SetLoadBalancerPoliciesOfListener 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 *ELB) SetLoadBalancerPoliciesOfListenerWithContext(ctx aws.Context, input *SetLoadBalancerPoliciesOfListenerInput, opts ...request.Option) (*SetLoadBalancerPoliciesOfListenerOutput, error) { - req, out := c.SetLoadBalancerPoliciesOfListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Information about the AccessLog attribute. -type AccessLog struct { - _ struct{} `type:"structure"` - - // The interval for publishing the access logs. You can specify an interval - // of either 5 minutes or 60 minutes. - // - // Default: 60 minutes - EmitInterval *int64 `type:"integer"` - - // Specifies whether access logs are enabled for the load balancer. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // The name of the Amazon S3 bucket where the access logs are stored. - S3BucketName *string `type:"string"` - - // The logical hierarchy you created for your Amazon S3 bucket, for example - // my-bucket-prefix/prod. If the prefix is not provided, the log is placed at - // the root level of the bucket. - S3BucketPrefix *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 AccessLog) 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 AccessLog) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AccessLog) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AccessLog"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEmitInterval sets the EmitInterval field's value. -func (s *AccessLog) SetEmitInterval(v int64) *AccessLog { - s.EmitInterval = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *AccessLog) SetEnabled(v bool) *AccessLog { - s.Enabled = &v - return s -} - -// SetS3BucketName sets the S3BucketName field's value. -func (s *AccessLog) SetS3BucketName(v string) *AccessLog { - s.S3BucketName = &v - return s -} - -// SetS3BucketPrefix sets the S3BucketPrefix field's value. -func (s *AccessLog) SetS3BucketPrefix(v string) *AccessLog { - s.S3BucketPrefix = &v - return s -} - -// Contains the parameters for AddTags. -type AddTagsInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. You can specify one load balancer only. - // - // LoadBalancerNames is a required field - LoadBalancerNames []*string `type:"list" required:"true"` - - // The tags. - // - // Tags is a required field - Tags []*Tag `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 AddTagsInput) 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 AddTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} - if s.LoadBalancerNames == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 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 -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *AddTagsInput) SetLoadBalancerNames(v []*string) *AddTagsInput { - s.LoadBalancerNames = v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput { - s.Tags = v - return s -} - -// Contains the output of AddTags. -type AddTagsOutput 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 AddTagsOutput) 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 AddTagsOutput) GoString() string { - return s.String() -} - -// Information about additional load balancer attributes. -type AdditionalAttribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - // - // The following attribute is supported. - // - // * elb.http.desyncmitigationmode - Determines how the load balancer handles - // requests that might pose a security risk to your application. The possible - // values are monitor, defensive, and strictest. The default is defensive. - Key *string `type:"string"` - - // This value of the attribute. - Value *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 AdditionalAttribute) 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 AdditionalAttribute) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *AdditionalAttribute) SetKey(v string) *AdditionalAttribute { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *AdditionalAttribute) SetValue(v string) *AdditionalAttribute { - s.Value = &v - return s -} - -// Information about a policy for application-controlled session stickiness. -type AppCookieStickinessPolicy struct { - _ struct{} `type:"structure"` - - // The name of the application cookie used for stickiness. - CookieName *string `type:"string"` - - // The mnemonic name for the policy being created. The name must be unique within - // a set of policies for this load balancer. - PolicyName *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 AppCookieStickinessPolicy) 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 AppCookieStickinessPolicy) GoString() string { - return s.String() -} - -// SetCookieName sets the CookieName field's value. -func (s *AppCookieStickinessPolicy) SetCookieName(v string) *AppCookieStickinessPolicy { - s.CookieName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *AppCookieStickinessPolicy) SetPolicyName(v string) *AppCookieStickinessPolicy { - s.PolicyName = &v - return s -} - -// Contains the parameters for ApplySecurityGroupsToLoadBalancer. -type ApplySecurityGroupsToLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The IDs of the security groups to associate with the load balancer. Note - // that you cannot specify the name of the security group. - // - // 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 ApplySecurityGroupsToLoadBalancerInput) 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 ApplySecurityGroupsToLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ApplySecurityGroupsToLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ApplySecurityGroupsToLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.SecurityGroups == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroups")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *ApplySecurityGroupsToLoadBalancerInput) SetLoadBalancerName(v string) *ApplySecurityGroupsToLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *ApplySecurityGroupsToLoadBalancerInput) SetSecurityGroups(v []*string) *ApplySecurityGroupsToLoadBalancerInput { - s.SecurityGroups = v - return s -} - -// Contains the output of ApplySecurityGroupsToLoadBalancer. -type ApplySecurityGroupsToLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the security groups associated with the load balancer. - 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 ApplySecurityGroupsToLoadBalancerOutput) 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 ApplySecurityGroupsToLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *ApplySecurityGroupsToLoadBalancerOutput) SetSecurityGroups(v []*string) *ApplySecurityGroupsToLoadBalancerOutput { - s.SecurityGroups = v - return s -} - -// Contains the parameters for AttachLoaBalancerToSubnets. -type AttachLoadBalancerToSubnetsInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The IDs of the subnets to add. You can add only one subnet per Availability - // Zone. - // - // Subnets is a required field - Subnets []*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 AttachLoadBalancerToSubnetsInput) 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 AttachLoadBalancerToSubnetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AttachLoadBalancerToSubnetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AttachLoadBalancerToSubnetsInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *AttachLoadBalancerToSubnetsInput) SetLoadBalancerName(v string) *AttachLoadBalancerToSubnetsInput { - s.LoadBalancerName = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *AttachLoadBalancerToSubnetsInput) SetSubnets(v []*string) *AttachLoadBalancerToSubnetsInput { - s.Subnets = v - return s -} - -// Contains the output of AttachLoadBalancerToSubnets. -type AttachLoadBalancerToSubnetsOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the subnets attached to the load balancer. - Subnets []*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 AttachLoadBalancerToSubnetsOutput) 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 AttachLoadBalancerToSubnetsOutput) GoString() string { - return s.String() -} - -// SetSubnets sets the Subnets field's value. -func (s *AttachLoadBalancerToSubnetsOutput) SetSubnets(v []*string) *AttachLoadBalancerToSubnetsOutput { - s.Subnets = v - return s -} - -// Information about the configuration of an EC2 instance. -type BackendServerDescription struct { - _ struct{} `type:"structure"` - - // The port on which the EC2 instance is listening. - InstancePort *int64 `min:"1" type:"integer"` - - // The names of the policies enabled for the EC2 instance. - PolicyNames []*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 BackendServerDescription) 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 BackendServerDescription) GoString() string { - return s.String() -} - -// SetInstancePort sets the InstancePort field's value. -func (s *BackendServerDescription) SetInstancePort(v int64) *BackendServerDescription { - s.InstancePort = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *BackendServerDescription) SetPolicyNames(v []*string) *BackendServerDescription { - s.PolicyNames = v - return s -} - -// Contains the parameters for ConfigureHealthCheck. -type ConfigureHealthCheckInput struct { - _ struct{} `type:"structure"` - - // The configuration information. - // - // HealthCheck is a required field - HealthCheck *HealthCheck `type:"structure" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 ConfigureHealthCheckInput) 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 ConfigureHealthCheckInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConfigureHealthCheckInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConfigureHealthCheckInput"} - if s.HealthCheck == nil { - invalidParams.Add(request.NewErrParamRequired("HealthCheck")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.HealthCheck != nil { - if err := s.HealthCheck.Validate(); err != nil { - invalidParams.AddNested("HealthCheck", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *ConfigureHealthCheckInput) SetHealthCheck(v *HealthCheck) *ConfigureHealthCheckInput { - s.HealthCheck = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *ConfigureHealthCheckInput) SetLoadBalancerName(v string) *ConfigureHealthCheckInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of ConfigureHealthCheck. -type ConfigureHealthCheckOutput struct { - _ struct{} `type:"structure"` - - // The updated health check. - HealthCheck *HealthCheck `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 ConfigureHealthCheckOutput) 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 ConfigureHealthCheckOutput) GoString() string { - return s.String() -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *ConfigureHealthCheckOutput) SetHealthCheck(v *HealthCheck) *ConfigureHealthCheckOutput { - s.HealthCheck = v - return s -} - -// Information about the ConnectionDraining attribute. -type ConnectionDraining struct { - _ struct{} `type:"structure"` - - // Specifies whether connection draining is enabled for the load balancer. - // - // Enabled is a required field - Enabled *bool `type:"boolean" required:"true"` - - // The maximum time, in seconds, to keep the existing connections open before - // deregistering the instances. - Timeout *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 ConnectionDraining) 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 ConnectionDraining) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConnectionDraining) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConnectionDraining"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *ConnectionDraining) SetEnabled(v bool) *ConnectionDraining { - s.Enabled = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *ConnectionDraining) SetTimeout(v int64) *ConnectionDraining { - s.Timeout = &v - return s -} - -// Information about the ConnectionSettings attribute. -type ConnectionSettings struct { - _ struct{} `type:"structure"` - - // The time, in seconds, that the connection is allowed to be idle (no data - // has been sent over the connection) before it is closed by the load balancer. - // - // IdleTimeout is a required field - IdleTimeout *int64 `min:"1" type:"integer" 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 ConnectionSettings) 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 ConnectionSettings) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ConnectionSettings) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ConnectionSettings"} - if s.IdleTimeout == nil { - invalidParams.Add(request.NewErrParamRequired("IdleTimeout")) - } - if s.IdleTimeout != nil && *s.IdleTimeout < 1 { - invalidParams.Add(request.NewErrParamMinValue("IdleTimeout", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIdleTimeout sets the IdleTimeout field's value. -func (s *ConnectionSettings) SetIdleTimeout(v int64) *ConnectionSettings { - s.IdleTimeout = &v - return s -} - -// Contains the parameters for CreateAppCookieStickinessPolicy. -type CreateAppCookieStickinessPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the application cookie used for stickiness. - // - // CookieName is a required field - CookieName *string `type:"string" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The name of the policy being created. Policy names must consist of alphanumeric - // characters and dashes (-). This name must be unique within the set of policies - // for this load balancer. - // - // PolicyName is a required field - PolicyName *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 CreateAppCookieStickinessPolicyInput) 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 CreateAppCookieStickinessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateAppCookieStickinessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateAppCookieStickinessPolicyInput"} - if s.CookieName == nil { - invalidParams.Add(request.NewErrParamRequired("CookieName")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCookieName sets the CookieName field's value. -func (s *CreateAppCookieStickinessPolicyInput) SetCookieName(v string) *CreateAppCookieStickinessPolicyInput { - s.CookieName = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateAppCookieStickinessPolicyInput) SetLoadBalancerName(v string) *CreateAppCookieStickinessPolicyInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreateAppCookieStickinessPolicyInput) SetPolicyName(v string) *CreateAppCookieStickinessPolicyInput { - s.PolicyName = &v - return s -} - -// Contains the output for CreateAppCookieStickinessPolicy. -type CreateAppCookieStickinessPolicyOutput 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 CreateAppCookieStickinessPolicyOutput) 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 CreateAppCookieStickinessPolicyOutput) GoString() string { - return s.String() -} - -// Contains the parameters for CreateLBCookieStickinessPolicy. -type CreateLBCookieStickinessPolicyInput struct { - _ struct{} `type:"structure"` - - // The time period, in seconds, after which the cookie should be considered - // stale. If you do not specify this parameter, the default value is 0, which - // indicates that the sticky session should last for the duration of the browser - // session. - CookieExpirationPeriod *int64 `type:"long"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The name of the policy being created. Policy names must consist of alphanumeric - // characters and dashes (-). This name must be unique within the set of policies - // for this load balancer. - // - // PolicyName is a required field - PolicyName *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 CreateLBCookieStickinessPolicyInput) 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 CreateLBCookieStickinessPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLBCookieStickinessPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLBCookieStickinessPolicyInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCookieExpirationPeriod sets the CookieExpirationPeriod field's value. -func (s *CreateLBCookieStickinessPolicyInput) SetCookieExpirationPeriod(v int64) *CreateLBCookieStickinessPolicyInput { - s.CookieExpirationPeriod = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLBCookieStickinessPolicyInput) SetLoadBalancerName(v string) *CreateLBCookieStickinessPolicyInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreateLBCookieStickinessPolicyInput) SetPolicyName(v string) *CreateLBCookieStickinessPolicyInput { - s.PolicyName = &v - return s -} - -// Contains the output for CreateLBCookieStickinessPolicy. -type CreateLBCookieStickinessPolicyOutput 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 CreateLBCookieStickinessPolicyOutput) 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 CreateLBCookieStickinessPolicyOutput) GoString() string { - return s.String() -} - -// Contains the parameters for CreateLoadBalancer. -type CreateLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // One or more Availability Zones from the same region as the load balancer. - // - // You must specify at least one Availability Zone. - // - // You can add more Availability Zones after you create the load balancer using - // EnableAvailabilityZonesForLoadBalancer. - AvailabilityZones []*string `type:"list"` - - // The listeners. - // - // For more information, see Listeners for Your Classic Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) - // in the Classic Load Balancers Guide. - // - // Listeners is a required field - Listeners []*Listener `type:"list" required:"true"` - - // The name of the load balancer. - // - // This name must be unique within your set of load balancers for the region, - // must have a maximum of 32 characters, must contain only alphanumeric characters - // or hyphens, and cannot begin or end with a hyphen. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The type of a load balancer. Valid only for load balancers in a VPC. - // - // By default, Elastic Load Balancing creates an Internet-facing load balancer - // with a DNS name that resolves to public IP addresses. For more information - // about Internet-facing and Internal load balancers, see Load Balancer Scheme - // (https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/how-elastic-load-balancing-works.html#load-balancer-scheme) - // in the Elastic Load Balancing User Guide. - // - // Specify internal to create a load balancer with a DNS name that resolves - // to private IP addresses. - Scheme *string `type:"string"` - - // The IDs of the security groups to assign to the load balancer. - SecurityGroups []*string `type:"list"` - - // The IDs of the subnets in your VPC to attach to the load balancer. Specify - // one subnet per Availability Zone specified in AvailabilityZones. - Subnets []*string `type:"list"` - - // A list of tags to assign to the load balancer. - // - // For more information about tagging your load balancer, see Tag Your Classic - // Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/add-remove-tags.html) - // in the Classic Load Balancers Guide. - Tags []*Tag `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 CreateLoadBalancerInput) 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 CreateLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} - if s.Listeners == nil { - invalidParams.Add(request.NewErrParamRequired("Listeners")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Listeners != nil { - for i, v := range s.Listeners { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Listeners", i), 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 -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *CreateLoadBalancerInput) SetAvailabilityZones(v []*string) *CreateLoadBalancerInput { - s.AvailabilityZones = v - return s -} - -// SetListeners sets the Listeners field's value. -func (s *CreateLoadBalancerInput) SetListeners(v []*Listener) *CreateLoadBalancerInput { - s.Listeners = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerInput) SetLoadBalancerName(v string) *CreateLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// SetScheme sets the Scheme field's value. -func (s *CreateLoadBalancerInput) SetScheme(v string) *CreateLoadBalancerInput { - s.Scheme = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CreateLoadBalancerInput) SetSecurityGroups(v []*string) *CreateLoadBalancerInput { - s.SecurityGroups = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *CreateLoadBalancerInput) SetSubnets(v []*string) *CreateLoadBalancerInput { - s.Subnets = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput { - s.Tags = v - return s -} - -// Contains the parameters for CreateLoadBalancerListeners. -type CreateLoadBalancerListenersInput struct { - _ struct{} `type:"structure"` - - // The listeners. - // - // Listeners is a required field - Listeners []*Listener `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 CreateLoadBalancerListenersInput) 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 CreateLoadBalancerListenersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerListenersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerListenersInput"} - if s.Listeners == nil { - invalidParams.Add(request.NewErrParamRequired("Listeners")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.Listeners != nil { - for i, v := range s.Listeners { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Listeners", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListeners sets the Listeners field's value. -func (s *CreateLoadBalancerListenersInput) SetListeners(v []*Listener) *CreateLoadBalancerListenersInput { - s.Listeners = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerListenersInput) SetLoadBalancerName(v string) *CreateLoadBalancerListenersInput { - s.LoadBalancerName = &v - return s -} - -// Contains the parameters for CreateLoadBalancerListener. -type CreateLoadBalancerListenersOutput 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 CreateLoadBalancerListenersOutput) 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 CreateLoadBalancerListenersOutput) GoString() string { - return s.String() -} - -// Contains the output for CreateLoadBalancer. -type CreateLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The DNS name of the load balancer. - DNSName *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 CreateLoadBalancerOutput) 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 CreateLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetDNSName sets the DNSName field's value. -func (s *CreateLoadBalancerOutput) SetDNSName(v string) *CreateLoadBalancerOutput { - s.DNSName = &v - return s -} - -// Contains the parameters for CreateLoadBalancerPolicy. -type CreateLoadBalancerPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The policy attributes. - PolicyAttributes []*PolicyAttribute `type:"list"` - - // The name of the load balancer policy to be created. This name must be unique - // within the set of policies for this load balancer. - // - // PolicyName is a required field - PolicyName *string `type:"string" required:"true"` - - // The name of the base policy type. To get the list of policy types, use DescribeLoadBalancerPolicyTypes. - // - // PolicyTypeName is a required field - PolicyTypeName *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 CreateLoadBalancerPolicyInput) 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 CreateLoadBalancerPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerPolicyInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - if s.PolicyTypeName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyTypeName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *CreateLoadBalancerPolicyInput) SetLoadBalancerName(v string) *CreateLoadBalancerPolicyInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyAttributes sets the PolicyAttributes field's value. -func (s *CreateLoadBalancerPolicyInput) SetPolicyAttributes(v []*PolicyAttribute) *CreateLoadBalancerPolicyInput { - s.PolicyAttributes = v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *CreateLoadBalancerPolicyInput) SetPolicyName(v string) *CreateLoadBalancerPolicyInput { - s.PolicyName = &v - return s -} - -// SetPolicyTypeName sets the PolicyTypeName field's value. -func (s *CreateLoadBalancerPolicyInput) SetPolicyTypeName(v string) *CreateLoadBalancerPolicyInput { - s.PolicyTypeName = &v - return s -} - -// Contains the output of CreateLoadBalancerPolicy. -type CreateLoadBalancerPolicyOutput 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 CreateLoadBalancerPolicyOutput) 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 CreateLoadBalancerPolicyOutput) GoString() string { - return s.String() -} - -// Information about the CrossZoneLoadBalancing attribute. -type CrossZoneLoadBalancing struct { - _ struct{} `type:"structure"` - - // Specifies whether cross-zone load balancing is enabled for the load balancer. - // - // Enabled is a required field - Enabled *bool `type:"boolean" 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 CrossZoneLoadBalancing) 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 CrossZoneLoadBalancing) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CrossZoneLoadBalancing) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CrossZoneLoadBalancing"} - if s.Enabled == nil { - invalidParams.Add(request.NewErrParamRequired("Enabled")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnabled sets the Enabled field's value. -func (s *CrossZoneLoadBalancing) SetEnabled(v bool) *CrossZoneLoadBalancing { - s.Enabled = &v - return s -} - -// Contains the parameters for DeleteLoadBalancer. -type DeleteLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 DeleteLoadBalancerInput) 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 DeleteLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerInput) SetLoadBalancerName(v string) *DeleteLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the parameters for DeleteLoadBalancerListeners. -type DeleteLoadBalancerListenersInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The client port numbers of the listeners. - // - // LoadBalancerPorts is a required field - LoadBalancerPorts []*int64 `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 DeleteLoadBalancerListenersInput) 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 DeleteLoadBalancerListenersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerListenersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerListenersInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.LoadBalancerPorts == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerPorts")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerListenersInput) SetLoadBalancerName(v string) *DeleteLoadBalancerListenersInput { - s.LoadBalancerName = &v - return s -} - -// SetLoadBalancerPorts sets the LoadBalancerPorts field's value. -func (s *DeleteLoadBalancerListenersInput) SetLoadBalancerPorts(v []*int64) *DeleteLoadBalancerListenersInput { - s.LoadBalancerPorts = v - return s -} - -// Contains the output of DeleteLoadBalancerListeners. -type DeleteLoadBalancerListenersOutput 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 DeleteLoadBalancerListenersOutput) 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 DeleteLoadBalancerListenersOutput) GoString() string { - return s.String() -} - -// Contains the output of DeleteLoadBalancer. -type DeleteLoadBalancerOutput 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 DeleteLoadBalancerOutput) 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 DeleteLoadBalancerOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeleteLoadBalancerPolicy. -type DeleteLoadBalancerPolicyInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The name of the policy. - // - // PolicyName is a required field - PolicyName *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 DeleteLoadBalancerPolicyInput) 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 DeleteLoadBalancerPolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerPolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerPolicyInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyName == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeleteLoadBalancerPolicyInput) SetLoadBalancerName(v string) *DeleteLoadBalancerPolicyInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *DeleteLoadBalancerPolicyInput) SetPolicyName(v string) *DeleteLoadBalancerPolicyInput { - s.PolicyName = &v - return s -} - -// Contains the output of DeleteLoadBalancerPolicy. -type DeleteLoadBalancerPolicyOutput 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 DeleteLoadBalancerPolicyOutput) 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 DeleteLoadBalancerPolicyOutput) GoString() string { - return s.String() -} - -// Contains the parameters for DeregisterInstancesFromLoadBalancer. -type DeregisterInstancesFromLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The IDs of the instances. - // - // Instances is a required field - Instances []*Instance `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 DeregisterInstancesFromLoadBalancerInput) 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 DeregisterInstancesFromLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterInstancesFromLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterInstancesFromLoadBalancerInput"} - if s.Instances == nil { - invalidParams.Add(request.NewErrParamRequired("Instances")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstances sets the Instances field's value. -func (s *DeregisterInstancesFromLoadBalancerInput) SetInstances(v []*Instance) *DeregisterInstancesFromLoadBalancerInput { - s.Instances = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DeregisterInstancesFromLoadBalancerInput) SetLoadBalancerName(v string) *DeregisterInstancesFromLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of DeregisterInstancesFromLoadBalancer. -type DeregisterInstancesFromLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The remaining instances registered with the load balancer. - Instances []*Instance `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 DeregisterInstancesFromLoadBalancerOutput) 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 DeregisterInstancesFromLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *DeregisterInstancesFromLoadBalancerOutput) SetInstances(v []*Instance) *DeregisterInstancesFromLoadBalancerOutput { - s.Instances = v - return s -} - -type DescribeAccountLimitsInput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `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 DescribeAccountLimitsInput) 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 DescribeAccountLimitsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountLimitsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeAccountLimitsInput) SetMarker(v string) *DescribeAccountLimitsInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeAccountLimitsInput) SetPageSize(v int64) *DescribeAccountLimitsInput { - s.PageSize = &v - return s -} - -type DescribeAccountLimitsOutput struct { - _ struct{} `type:"structure"` - - // Information about the limits. - Limits []*Limit `type:"list"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *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 DescribeAccountLimitsOutput) 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 DescribeAccountLimitsOutput) GoString() string { - return s.String() -} - -// SetLimits sets the Limits field's value. -func (s *DescribeAccountLimitsOutput) SetLimits(v []*Limit) *DescribeAccountLimitsOutput { - s.Limits = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeAccountLimitsOutput) SetNextMarker(v string) *DescribeAccountLimitsOutput { - s.NextMarker = &v - return s -} - -// Contains the parameters for DescribeInstanceHealth. -type DescribeInstanceHealthInput struct { - _ struct{} `type:"structure"` - - // The IDs of the instances. - Instances []*Instance `type:"list"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 DescribeInstanceHealthInput) 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 DescribeInstanceHealthInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeInstanceHealthInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeInstanceHealthInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstances sets the Instances field's value. -func (s *DescribeInstanceHealthInput) SetInstances(v []*Instance) *DescribeInstanceHealthInput { - s.Instances = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DescribeInstanceHealthInput) SetLoadBalancerName(v string) *DescribeInstanceHealthInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output for DescribeInstanceHealth. -type DescribeInstanceHealthOutput struct { - _ struct{} `type:"structure"` - - // Information about the health of the instances. - InstanceStates []*InstanceState `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 DescribeInstanceHealthOutput) 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 DescribeInstanceHealthOutput) GoString() string { - return s.String() -} - -// SetInstanceStates sets the InstanceStates field's value. -func (s *DescribeInstanceHealthOutput) SetInstanceStates(v []*InstanceState) *DescribeInstanceHealthOutput { - s.InstanceStates = v - return s -} - -// Contains the parameters for DescribeLoadBalancerAttributes. -type DescribeLoadBalancerAttributesInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 DescribeLoadBalancerAttributesInput) 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 DescribeLoadBalancerAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancerAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerAttributesInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DescribeLoadBalancerAttributesInput) SetLoadBalancerName(v string) *DescribeLoadBalancerAttributesInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of DescribeLoadBalancerAttributes. -type DescribeLoadBalancerAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer attributes. - LoadBalancerAttributes *LoadBalancerAttributes `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 DescribeLoadBalancerAttributesOutput) 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 DescribeLoadBalancerAttributesOutput) GoString() string { - return s.String() -} - -// SetLoadBalancerAttributes sets the LoadBalancerAttributes field's value. -func (s *DescribeLoadBalancerAttributesOutput) SetLoadBalancerAttributes(v *LoadBalancerAttributes) *DescribeLoadBalancerAttributesOutput { - s.LoadBalancerAttributes = v - return s -} - -// Contains the parameters for DescribeLoadBalancerPolicies. -type DescribeLoadBalancerPoliciesInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - LoadBalancerName *string `type:"string"` - - // The names of the policies. - PolicyNames []*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 DescribeLoadBalancerPoliciesInput) 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 DescribeLoadBalancerPoliciesInput) GoString() string { - return s.String() -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DescribeLoadBalancerPoliciesInput) SetLoadBalancerName(v string) *DescribeLoadBalancerPoliciesInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *DescribeLoadBalancerPoliciesInput) SetPolicyNames(v []*string) *DescribeLoadBalancerPoliciesInput { - s.PolicyNames = v - return s -} - -// Contains the output of DescribeLoadBalancerPolicies. -type DescribeLoadBalancerPoliciesOutput struct { - _ struct{} `type:"structure"` - - // Information about the policies. - PolicyDescriptions []*PolicyDescription `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 DescribeLoadBalancerPoliciesOutput) 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 DescribeLoadBalancerPoliciesOutput) GoString() string { - return s.String() -} - -// SetPolicyDescriptions sets the PolicyDescriptions field's value. -func (s *DescribeLoadBalancerPoliciesOutput) SetPolicyDescriptions(v []*PolicyDescription) *DescribeLoadBalancerPoliciesOutput { - s.PolicyDescriptions = v - return s -} - -// Contains the parameters for DescribeLoadBalancerPolicyTypes. -type DescribeLoadBalancerPolicyTypesInput struct { - _ struct{} `type:"structure"` - - // The names of the policy types. If no names are specified, describes all policy - // types defined by Elastic Load Balancing. - PolicyTypeNames []*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 DescribeLoadBalancerPolicyTypesInput) 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 DescribeLoadBalancerPolicyTypesInput) GoString() string { - return s.String() -} - -// SetPolicyTypeNames sets the PolicyTypeNames field's value. -func (s *DescribeLoadBalancerPolicyTypesInput) SetPolicyTypeNames(v []*string) *DescribeLoadBalancerPolicyTypesInput { - s.PolicyTypeNames = v - return s -} - -// Contains the output of DescribeLoadBalancerPolicyTypes. -type DescribeLoadBalancerPolicyTypesOutput struct { - _ struct{} `type:"structure"` - - // Information about the policy types. - PolicyTypeDescriptions []*PolicyTypeDescription `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 DescribeLoadBalancerPolicyTypesOutput) 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 DescribeLoadBalancerPolicyTypesOutput) GoString() string { - return s.String() -} - -// SetPolicyTypeDescriptions sets the PolicyTypeDescriptions field's value. -func (s *DescribeLoadBalancerPolicyTypesOutput) SetPolicyTypeDescriptions(v []*PolicyTypeDescription) *DescribeLoadBalancerPolicyTypesOutput { - s.PolicyTypeDescriptions = v - return s -} - -// Contains the parameters for DescribeLoadBalancers. -type DescribeLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // The names of the load balancers. - LoadBalancerNames []*string `type:"list"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call (a number from 1 to - // 400). The default is 400. - PageSize *int64 `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 DescribeLoadBalancersInput) 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 DescribeLoadBalancersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *DescribeLoadBalancersInput) SetLoadBalancerNames(v []*string) *DescribeLoadBalancersInput { - s.LoadBalancerNames = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeLoadBalancersInput) SetMarker(v string) *DescribeLoadBalancersInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeLoadBalancersInput) SetPageSize(v int64) *DescribeLoadBalancersInput { - s.PageSize = &v - return s -} - -// Contains the parameters for DescribeLoadBalancers. -type DescribeLoadBalancersOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancers. - LoadBalancerDescriptions []*LoadBalancerDescription `type:"list"` - - // The marker to use when requesting the next set of results. If there are no - // additional results, the string is empty. - NextMarker *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 DescribeLoadBalancersOutput) 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 DescribeLoadBalancersOutput) GoString() string { - return s.String() -} - -// SetLoadBalancerDescriptions sets the LoadBalancerDescriptions field's value. -func (s *DescribeLoadBalancersOutput) SetLoadBalancerDescriptions(v []*LoadBalancerDescription) *DescribeLoadBalancersOutput { - s.LoadBalancerDescriptions = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeLoadBalancersOutput) SetNextMarker(v string) *DescribeLoadBalancersOutput { - s.NextMarker = &v - return s -} - -// Contains the parameters for DescribeTags. -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // The names of the load balancers. - // - // LoadBalancerNames is a required field - LoadBalancerNames []*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 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.LoadBalancerNames == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) - } - if s.LoadBalancerNames != nil && len(s.LoadBalancerNames) < 1 { - invalidParams.Add(request.NewErrParamMinLen("LoadBalancerNames", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *DescribeTagsInput) SetLoadBalancerNames(v []*string) *DescribeTagsInput { - s.LoadBalancerNames = v - return s -} - -// Contains the output for DescribeTags. -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // Information about the tags. - TagDescriptions []*TagDescription `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 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() -} - -// SetTagDescriptions sets the TagDescriptions field's value. -func (s *DescribeTagsOutput) SetTagDescriptions(v []*TagDescription) *DescribeTagsOutput { - s.TagDescriptions = v - return s -} - -// Contains the parameters for DetachLoadBalancerFromSubnets. -type DetachLoadBalancerFromSubnetsInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The IDs of the subnets. - // - // Subnets is a required field - Subnets []*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 DetachLoadBalancerFromSubnetsInput) 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 DetachLoadBalancerFromSubnetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DetachLoadBalancerFromSubnetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DetachLoadBalancerFromSubnetsInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.Subnets == nil { - invalidParams.Add(request.NewErrParamRequired("Subnets")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DetachLoadBalancerFromSubnetsInput) SetLoadBalancerName(v string) *DetachLoadBalancerFromSubnetsInput { - s.LoadBalancerName = &v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *DetachLoadBalancerFromSubnetsInput) SetSubnets(v []*string) *DetachLoadBalancerFromSubnetsInput { - s.Subnets = v - return s -} - -// Contains the output of DetachLoadBalancerFromSubnets. -type DetachLoadBalancerFromSubnetsOutput struct { - _ struct{} `type:"structure"` - - // The IDs of the remaining subnets for the load balancer. - Subnets []*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 DetachLoadBalancerFromSubnetsOutput) 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 DetachLoadBalancerFromSubnetsOutput) GoString() string { - return s.String() -} - -// SetSubnets sets the Subnets field's value. -func (s *DetachLoadBalancerFromSubnetsOutput) SetSubnets(v []*string) *DetachLoadBalancerFromSubnetsOutput { - s.Subnets = v - return s -} - -// Contains the parameters for DisableAvailabilityZonesForLoadBalancer. -type DisableAvailabilityZonesForLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The Availability Zones. - // - // AvailabilityZones is a required field - AvailabilityZones []*string `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 DisableAvailabilityZonesForLoadBalancerInput) 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 DisableAvailabilityZonesForLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DisableAvailabilityZonesForLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DisableAvailabilityZonesForLoadBalancerInput"} - if s.AvailabilityZones == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZones")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DisableAvailabilityZonesForLoadBalancerInput) SetAvailabilityZones(v []*string) *DisableAvailabilityZonesForLoadBalancerInput { - s.AvailabilityZones = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *DisableAvailabilityZonesForLoadBalancerInput) SetLoadBalancerName(v string) *DisableAvailabilityZonesForLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output for DisableAvailabilityZonesForLoadBalancer. -type DisableAvailabilityZonesForLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The remaining Availability Zones for the load balancer. - AvailabilityZones []*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 DisableAvailabilityZonesForLoadBalancerOutput) 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 DisableAvailabilityZonesForLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *DisableAvailabilityZonesForLoadBalancerOutput) SetAvailabilityZones(v []*string) *DisableAvailabilityZonesForLoadBalancerOutput { - s.AvailabilityZones = v - return s -} - -// Contains the parameters for EnableAvailabilityZonesForLoadBalancer. -type EnableAvailabilityZonesForLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The Availability Zones. These must be in the same region as the load balancer. - // - // AvailabilityZones is a required field - AvailabilityZones []*string `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 EnableAvailabilityZonesForLoadBalancerInput) 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 EnableAvailabilityZonesForLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *EnableAvailabilityZonesForLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "EnableAvailabilityZonesForLoadBalancerInput"} - if s.AvailabilityZones == nil { - invalidParams.Add(request.NewErrParamRequired("AvailabilityZones")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *EnableAvailabilityZonesForLoadBalancerInput) SetAvailabilityZones(v []*string) *EnableAvailabilityZonesForLoadBalancerInput { - s.AvailabilityZones = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *EnableAvailabilityZonesForLoadBalancerInput) SetLoadBalancerName(v string) *EnableAvailabilityZonesForLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of EnableAvailabilityZonesForLoadBalancer. -type EnableAvailabilityZonesForLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The updated list of Availability Zones for the load balancer. - AvailabilityZones []*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 EnableAvailabilityZonesForLoadBalancerOutput) 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 EnableAvailabilityZonesForLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *EnableAvailabilityZonesForLoadBalancerOutput) SetAvailabilityZones(v []*string) *EnableAvailabilityZonesForLoadBalancerOutput { - s.AvailabilityZones = v - return s -} - -// Information about a health check. -type HealthCheck struct { - _ struct{} `type:"structure"` - - // The number of consecutive health checks successes required before moving - // the instance to the Healthy state. - // - // HealthyThreshold is a required field - HealthyThreshold *int64 `min:"2" type:"integer" required:"true"` - - // The approximate interval, in seconds, between health checks of an individual - // instance. - // - // Interval is a required field - Interval *int64 `min:"5" type:"integer" required:"true"` - - // The instance being checked. The protocol is either TCP, HTTP, HTTPS, or SSL. - // The range of valid ports is one (1) through 65535. - // - // TCP is the default, specified as a TCP: port pair, for example "TCP:5000". - // In this case, a health check simply attempts to open a TCP connection to - // the instance on the specified port. Failure to connect within the configured - // timeout is considered unhealthy. - // - // SSL is also specified as SSL: port pair, for example, SSL:5000. - // - // For HTTP/HTTPS, you must include a ping path in the string. HTTP is specified - // as a HTTP:port;/;PathToPing; grouping, for example "HTTP:80/weather/us/wa/seattle". - // In this case, a HTTP GET request is issued to the instance on the given port - // and path. Any answer other than "200 OK" within the timeout period is considered - // unhealthy. - // - // The total length of the HTTP ping target must be 1024 16-bit Unicode characters - // or less. - // - // Target is a required field - Target *string `type:"string" required:"true"` - - // The amount of time, in seconds, during which no response means a failed health - // check. - // - // This value must be less than the Interval value. - // - // Timeout is a required field - Timeout *int64 `min:"2" type:"integer" required:"true"` - - // The number of consecutive health check failures required before moving the - // instance to the Unhealthy state. - // - // UnhealthyThreshold is a required field - UnhealthyThreshold *int64 `min:"2" type:"integer" 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 HealthCheck) 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 HealthCheck) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *HealthCheck) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "HealthCheck"} - if s.HealthyThreshold == nil { - invalidParams.Add(request.NewErrParamRequired("HealthyThreshold")) - } - if s.HealthyThreshold != nil && *s.HealthyThreshold < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthyThreshold", 2)) - } - if s.Interval == nil { - invalidParams.Add(request.NewErrParamRequired("Interval")) - } - if s.Interval != nil && *s.Interval < 5 { - invalidParams.Add(request.NewErrParamMinValue("Interval", 5)) - } - if s.Target == nil { - invalidParams.Add(request.NewErrParamRequired("Target")) - } - if s.Timeout == nil { - invalidParams.Add(request.NewErrParamRequired("Timeout")) - } - if s.Timeout != nil && *s.Timeout < 2 { - invalidParams.Add(request.NewErrParamMinValue("Timeout", 2)) - } - if s.UnhealthyThreshold == nil { - invalidParams.Add(request.NewErrParamRequired("UnhealthyThreshold")) - } - if s.UnhealthyThreshold != nil && *s.UnhealthyThreshold < 2 { - invalidParams.Add(request.NewErrParamMinValue("UnhealthyThreshold", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthyThreshold sets the HealthyThreshold field's value. -func (s *HealthCheck) SetHealthyThreshold(v int64) *HealthCheck { - s.HealthyThreshold = &v - return s -} - -// SetInterval sets the Interval field's value. -func (s *HealthCheck) SetInterval(v int64) *HealthCheck { - s.Interval = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *HealthCheck) SetTarget(v string) *HealthCheck { - s.Target = &v - return s -} - -// SetTimeout sets the Timeout field's value. -func (s *HealthCheck) SetTimeout(v int64) *HealthCheck { - s.Timeout = &v - return s -} - -// SetUnhealthyThreshold sets the UnhealthyThreshold field's value. -func (s *HealthCheck) SetUnhealthyThreshold(v int64) *HealthCheck { - s.UnhealthyThreshold = &v - return s -} - -// The ID of an EC2 instance. -type Instance struct { - _ struct{} `type:"structure"` - - // The instance ID. - InstanceId *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 Instance) 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 Instance) GoString() string { - return s.String() -} - -// SetInstanceId sets the InstanceId field's value. -func (s *Instance) SetInstanceId(v string) *Instance { - s.InstanceId = &v - return s -} - -// Information about the state of an EC2 instance. -type InstanceState struct { - _ struct{} `type:"structure"` - - // A description of the instance state. This string can contain one or more - // of the following messages. - // - // * N/A - // - // * A transient error occurred. Please try again later. - // - // * Instance has failed at least the UnhealthyThreshold number of health - // checks consecutively. - // - // * Instance has not passed the configured HealthyThreshold number of health - // checks consecutively. - // - // * Instance registration is still in progress. - // - // * Instance is in the EC2 Availability Zone for which LoadBalancer is not - // configured to route traffic to. - // - // * Instance is not currently registered with the LoadBalancer. - // - // * Instance deregistration currently in progress. - // - // * Disable Availability Zone is currently in progress. - // - // * Instance is in pending state. - // - // * Instance is in stopped state. - // - // * Instance is in terminated state. - Description *string `type:"string"` - - // The ID of the instance. - InstanceId *string `type:"string"` - - // Information about the cause of OutOfService instances. Specifically, whether - // the cause is Elastic Load Balancing or the instance. - // - // Valid values: ELB | Instance | N/A - ReasonCode *string `type:"string"` - - // The current state of the instance. - // - // Valid values: InService | OutOfService | Unknown - State *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 InstanceState) 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 InstanceState) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *InstanceState) SetDescription(v string) *InstanceState { - s.Description = &v - return s -} - -// SetInstanceId sets the InstanceId field's value. -func (s *InstanceState) SetInstanceId(v string) *InstanceState { - s.InstanceId = &v - return s -} - -// SetReasonCode sets the ReasonCode field's value. -func (s *InstanceState) SetReasonCode(v string) *InstanceState { - s.ReasonCode = &v - return s -} - -// SetState sets the State field's value. -func (s *InstanceState) SetState(v string) *InstanceState { - s.State = &v - return s -} - -// Information about a policy for duration-based session stickiness. -type LBCookieStickinessPolicy struct { - _ struct{} `type:"structure"` - - // The time period, in seconds, after which the cookie should be considered - // stale. If this parameter is not specified, the stickiness session lasts for - // the duration of the browser session. - CookieExpirationPeriod *int64 `type:"long"` - - // The name of the policy. This name must be unique within the set of policies - // for this load balancer. - PolicyName *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 LBCookieStickinessPolicy) 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 LBCookieStickinessPolicy) GoString() string { - return s.String() -} - -// SetCookieExpirationPeriod sets the CookieExpirationPeriod field's value. -func (s *LBCookieStickinessPolicy) SetCookieExpirationPeriod(v int64) *LBCookieStickinessPolicy { - s.CookieExpirationPeriod = &v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *LBCookieStickinessPolicy) SetPolicyName(v string) *LBCookieStickinessPolicy { - s.PolicyName = &v - return s -} - -// Information about an Elastic Load Balancing resource limit for your AWS account. -type Limit struct { - _ struct{} `type:"structure"` - - // The maximum value of the limit. - Max *string `type:"string"` - - // The name of the limit. The possible values are: - // - // * classic-listeners - // - // * classic-load-balancers - // - // * classic-registered-instances - Name *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 Limit) 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 Limit) GoString() string { - return s.String() -} - -// SetMax sets the Max field's value. -func (s *Limit) SetMax(v string) *Limit { - s.Max = &v - return s -} - -// SetName sets the Name field's value. -func (s *Limit) SetName(v string) *Limit { - s.Name = &v - return s -} - -// Information about a listener. -// -// For information about the protocols and the ports supported by Elastic Load -// Balancing, see Listeners for Your Classic Load Balancer (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-listener-config.html) -// in the Classic Load Balancers Guide. -type Listener struct { - _ struct{} `type:"structure"` - - // The port on which the instance is listening. - // - // InstancePort is a required field - InstancePort *int64 `min:"1" type:"integer" required:"true"` - - // The protocol to use for routing traffic to instances: HTTP, HTTPS, TCP, or - // SSL. - // - // If the front-end protocol is TCP or SSL, the back-end protocol must be TCP - // or SSL. If the front-end protocol is HTTP or HTTPS, the back-end protocol - // must be HTTP or HTTPS. - // - // If there is another listener with the same InstancePort whose InstanceProtocol - // is secure, (HTTPS or SSL), the listener's InstanceProtocol must also be secure. - // - // If there is another listener with the same InstancePort whose InstanceProtocol - // is HTTP or TCP, the listener's InstanceProtocol must be HTTP or TCP. - InstanceProtocol *string `type:"string"` - - // The port on which the load balancer is listening. On EC2-VPC, you can specify - // any port from the range 1-65535. On EC2-Classic, you can specify any port - // from the following list: 25, 80, 443, 465, 587, 1024-65535. - // - // LoadBalancerPort is a required field - LoadBalancerPort *int64 `type:"integer" required:"true"` - - // The load balancer transport protocol to use for routing: HTTP, HTTPS, TCP, - // or SSL. - // - // Protocol is a required field - Protocol *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the server certificate. - SSLCertificateId *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 Listener) 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 Listener) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Listener) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Listener"} - if s.InstancePort == nil { - invalidParams.Add(request.NewErrParamRequired("InstancePort")) - } - if s.InstancePort != nil && *s.InstancePort < 1 { - invalidParams.Add(request.NewErrParamMinValue("InstancePort", 1)) - } - if s.LoadBalancerPort == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerPort")) - } - if s.Protocol == nil { - invalidParams.Add(request.NewErrParamRequired("Protocol")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstancePort sets the InstancePort field's value. -func (s *Listener) SetInstancePort(v int64) *Listener { - s.InstancePort = &v - return s -} - -// SetInstanceProtocol sets the InstanceProtocol field's value. -func (s *Listener) SetInstanceProtocol(v string) *Listener { - s.InstanceProtocol = &v - return s -} - -// SetLoadBalancerPort sets the LoadBalancerPort field's value. -func (s *Listener) SetLoadBalancerPort(v int64) *Listener { - s.LoadBalancerPort = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Listener) SetProtocol(v string) *Listener { - s.Protocol = &v - return s -} - -// SetSSLCertificateId sets the SSLCertificateId field's value. -func (s *Listener) SetSSLCertificateId(v string) *Listener { - s.SSLCertificateId = &v - return s -} - -// The policies enabled for a listener. -type ListenerDescription struct { - _ struct{} `type:"structure"` - - // The listener. - Listener *Listener `type:"structure"` - - // The policies. If there are no policies enabled, the list is empty. - PolicyNames []*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 ListenerDescription) 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 ListenerDescription) GoString() string { - return s.String() -} - -// SetListener sets the Listener field's value. -func (s *ListenerDescription) SetListener(v *Listener) *ListenerDescription { - s.Listener = v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *ListenerDescription) SetPolicyNames(v []*string) *ListenerDescription { - s.PolicyNames = v - return s -} - -// The attributes for a load balancer. -type LoadBalancerAttributes struct { - _ struct{} `type:"structure"` - - // If enabled, the load balancer captures detailed information of all requests - // and delivers the information to the Amazon S3 bucket that you specify. - // - // For more information, see Enable Access Logs (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-access-logs.html) - // in the Classic Load Balancers Guide. - AccessLog *AccessLog `type:"structure"` - - // Any additional attributes. - AdditionalAttributes []*AdditionalAttribute `type:"list"` - - // If enabled, the load balancer allows existing requests to complete before - // the load balancer shifts traffic away from a deregistered or unhealthy instance. - // - // For more information, see Configure Connection Draining (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-conn-drain.html) - // in the Classic Load Balancers Guide. - ConnectionDraining *ConnectionDraining `type:"structure"` - - // If enabled, the load balancer allows the connections to remain idle (no data - // is sent over the connection) for the specified duration. - // - // By default, Elastic Load Balancing maintains a 60-second idle connection - // timeout for both front-end and back-end connections of your load balancer. - // For more information, see Configure Idle Connection Timeout (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/config-idle-timeout.html) - // in the Classic Load Balancers Guide. - ConnectionSettings *ConnectionSettings `type:"structure"` - - // If enabled, the load balancer routes the request traffic evenly across all - // instances regardless of the Availability Zones. - // - // For more information, see Configure Cross-Zone Load Balancing (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/enable-disable-crosszone-lb.html) - // in the Classic Load Balancers Guide. - CrossZoneLoadBalancing *CrossZoneLoadBalancing `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 LoadBalancerAttributes) 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 LoadBalancerAttributes) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *LoadBalancerAttributes) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "LoadBalancerAttributes"} - if s.AccessLog != nil { - if err := s.AccessLog.Validate(); err != nil { - invalidParams.AddNested("AccessLog", err.(request.ErrInvalidParams)) - } - } - if s.ConnectionDraining != nil { - if err := s.ConnectionDraining.Validate(); err != nil { - invalidParams.AddNested("ConnectionDraining", err.(request.ErrInvalidParams)) - } - } - if s.ConnectionSettings != nil { - if err := s.ConnectionSettings.Validate(); err != nil { - invalidParams.AddNested("ConnectionSettings", err.(request.ErrInvalidParams)) - } - } - if s.CrossZoneLoadBalancing != nil { - if err := s.CrossZoneLoadBalancing.Validate(); err != nil { - invalidParams.AddNested("CrossZoneLoadBalancing", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAccessLog sets the AccessLog field's value. -func (s *LoadBalancerAttributes) SetAccessLog(v *AccessLog) *LoadBalancerAttributes { - s.AccessLog = v - return s -} - -// SetAdditionalAttributes sets the AdditionalAttributes field's value. -func (s *LoadBalancerAttributes) SetAdditionalAttributes(v []*AdditionalAttribute) *LoadBalancerAttributes { - s.AdditionalAttributes = v - return s -} - -// SetConnectionDraining sets the ConnectionDraining field's value. -func (s *LoadBalancerAttributes) SetConnectionDraining(v *ConnectionDraining) *LoadBalancerAttributes { - s.ConnectionDraining = v - return s -} - -// SetConnectionSettings sets the ConnectionSettings field's value. -func (s *LoadBalancerAttributes) SetConnectionSettings(v *ConnectionSettings) *LoadBalancerAttributes { - s.ConnectionSettings = v - return s -} - -// SetCrossZoneLoadBalancing sets the CrossZoneLoadBalancing field's value. -func (s *LoadBalancerAttributes) SetCrossZoneLoadBalancing(v *CrossZoneLoadBalancing) *LoadBalancerAttributes { - s.CrossZoneLoadBalancing = v - return s -} - -// Information about a load balancer. -type LoadBalancerDescription struct { - _ struct{} `type:"structure"` - - // The Availability Zones for the load balancer. - AvailabilityZones []*string `type:"list"` - - // Information about your EC2 instances. - BackendServerDescriptions []*BackendServerDescription `type:"list"` - - // The DNS name of the load balancer. - // - // For more information, see Configure a Custom Domain Name (https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/using-domain-names-with-elb.html) - // in the Classic Load Balancers Guide. - CanonicalHostedZoneName *string `type:"string"` - - // The ID of the Amazon Route 53 hosted zone for the load balancer. - CanonicalHostedZoneNameID *string `type:"string"` - - // The date and time the load balancer was created. - CreatedTime *time.Time `type:"timestamp"` - - // The DNS name of the load balancer. - DNSName *string `type:"string"` - - // Information about the health checks conducted on the load balancer. - HealthCheck *HealthCheck `type:"structure"` - - // The IDs of the instances for the load balancer. - Instances []*Instance `type:"list"` - - // The listeners for the load balancer. - ListenerDescriptions []*ListenerDescription `type:"list"` - - // The name of the load balancer. - LoadBalancerName *string `type:"string"` - - // The policies defined for the load balancer. - Policies *Policies `type:"structure"` - - // The type of load balancer. Valid only for load balancers in a VPC. - // - // If Scheme is internet-facing, the load balancer has a public DNS name that - // resolves to a public IP address. - // - // If Scheme is internal, the load balancer has a public DNS name that resolves - // to a private IP address. - Scheme *string `type:"string"` - - // The security groups for the load balancer. Valid only for load balancers - // in a VPC. - SecurityGroups []*string `type:"list"` - - // The security group for the load balancer, which you can use as part of your - // inbound rules for your registered instances. To only allow traffic from load - // balancers, add a security group rule that specifies this source security - // group as the inbound source. - SourceSecurityGroup *SourceSecurityGroup `type:"structure"` - - // The IDs of the subnets for the load balancer. - Subnets []*string `type:"list"` - - // The ID of the VPC for the load balancer. - 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 LoadBalancerDescription) 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 LoadBalancerDescription) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *LoadBalancerDescription) SetAvailabilityZones(v []*string) *LoadBalancerDescription { - s.AvailabilityZones = v - return s -} - -// SetBackendServerDescriptions sets the BackendServerDescriptions field's value. -func (s *LoadBalancerDescription) SetBackendServerDescriptions(v []*BackendServerDescription) *LoadBalancerDescription { - s.BackendServerDescriptions = v - return s -} - -// SetCanonicalHostedZoneName sets the CanonicalHostedZoneName field's value. -func (s *LoadBalancerDescription) SetCanonicalHostedZoneName(v string) *LoadBalancerDescription { - s.CanonicalHostedZoneName = &v - return s -} - -// SetCanonicalHostedZoneNameID sets the CanonicalHostedZoneNameID field's value. -func (s *LoadBalancerDescription) SetCanonicalHostedZoneNameID(v string) *LoadBalancerDescription { - s.CanonicalHostedZoneNameID = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *LoadBalancerDescription) SetCreatedTime(v time.Time) *LoadBalancerDescription { - s.CreatedTime = &v - return s -} - -// SetDNSName sets the DNSName field's value. -func (s *LoadBalancerDescription) SetDNSName(v string) *LoadBalancerDescription { - s.DNSName = &v - return s -} - -// SetHealthCheck sets the HealthCheck field's value. -func (s *LoadBalancerDescription) SetHealthCheck(v *HealthCheck) *LoadBalancerDescription { - s.HealthCheck = v - return s -} - -// SetInstances sets the Instances field's value. -func (s *LoadBalancerDescription) SetInstances(v []*Instance) *LoadBalancerDescription { - s.Instances = v - return s -} - -// SetListenerDescriptions sets the ListenerDescriptions field's value. -func (s *LoadBalancerDescription) SetListenerDescriptions(v []*ListenerDescription) *LoadBalancerDescription { - s.ListenerDescriptions = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancerDescription) SetLoadBalancerName(v string) *LoadBalancerDescription { - s.LoadBalancerName = &v - return s -} - -// SetPolicies sets the Policies field's value. -func (s *LoadBalancerDescription) SetPolicies(v *Policies) *LoadBalancerDescription { - s.Policies = v - return s -} - -// SetScheme sets the Scheme field's value. -func (s *LoadBalancerDescription) SetScheme(v string) *LoadBalancerDescription { - s.Scheme = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *LoadBalancerDescription) SetSecurityGroups(v []*string) *LoadBalancerDescription { - s.SecurityGroups = v - return s -} - -// SetSourceSecurityGroup sets the SourceSecurityGroup field's value. -func (s *LoadBalancerDescription) SetSourceSecurityGroup(v *SourceSecurityGroup) *LoadBalancerDescription { - s.SourceSecurityGroup = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *LoadBalancerDescription) SetSubnets(v []*string) *LoadBalancerDescription { - s.Subnets = v - return s -} - -// SetVPCId sets the VPCId field's value. -func (s *LoadBalancerDescription) SetVPCId(v string) *LoadBalancerDescription { - s.VPCId = &v - return s -} - -// Contains the parameters for ModifyLoadBalancerAttributes. -type ModifyLoadBalancerAttributesInput struct { - _ struct{} `type:"structure"` - - // The attributes for the load balancer. - // - // LoadBalancerAttributes is a required field - LoadBalancerAttributes *LoadBalancerAttributes `type:"structure" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 ModifyLoadBalancerAttributesInput) 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 ModifyLoadBalancerAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyLoadBalancerAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyLoadBalancerAttributesInput"} - if s.LoadBalancerAttributes == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerAttributes")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.LoadBalancerAttributes != nil { - if err := s.LoadBalancerAttributes.Validate(); err != nil { - invalidParams.AddNested("LoadBalancerAttributes", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerAttributes sets the LoadBalancerAttributes field's value. -func (s *ModifyLoadBalancerAttributesInput) SetLoadBalancerAttributes(v *LoadBalancerAttributes) *ModifyLoadBalancerAttributesInput { - s.LoadBalancerAttributes = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *ModifyLoadBalancerAttributesInput) SetLoadBalancerName(v string) *ModifyLoadBalancerAttributesInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of ModifyLoadBalancerAttributes. -type ModifyLoadBalancerAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer attributes. - LoadBalancerAttributes *LoadBalancerAttributes `type:"structure"` - - // The name of the load balancer. - LoadBalancerName *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 ModifyLoadBalancerAttributesOutput) 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 ModifyLoadBalancerAttributesOutput) GoString() string { - return s.String() -} - -// SetLoadBalancerAttributes sets the LoadBalancerAttributes field's value. -func (s *ModifyLoadBalancerAttributesOutput) SetLoadBalancerAttributes(v *LoadBalancerAttributes) *ModifyLoadBalancerAttributesOutput { - s.LoadBalancerAttributes = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *ModifyLoadBalancerAttributesOutput) SetLoadBalancerName(v string) *ModifyLoadBalancerAttributesOutput { - s.LoadBalancerName = &v - return s -} - -// The policies for a load balancer. -type Policies struct { - _ struct{} `type:"structure"` - - // The stickiness policies created using CreateAppCookieStickinessPolicy. - AppCookieStickinessPolicies []*AppCookieStickinessPolicy `type:"list"` - - // The stickiness policies created using CreateLBCookieStickinessPolicy. - LBCookieStickinessPolicies []*LBCookieStickinessPolicy `type:"list"` - - // The policies other than the stickiness policies. - OtherPolicies []*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 Policies) 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 Policies) GoString() string { - return s.String() -} - -// SetAppCookieStickinessPolicies sets the AppCookieStickinessPolicies field's value. -func (s *Policies) SetAppCookieStickinessPolicies(v []*AppCookieStickinessPolicy) *Policies { - s.AppCookieStickinessPolicies = v - return s -} - -// SetLBCookieStickinessPolicies sets the LBCookieStickinessPolicies field's value. -func (s *Policies) SetLBCookieStickinessPolicies(v []*LBCookieStickinessPolicy) *Policies { - s.LBCookieStickinessPolicies = v - return s -} - -// SetOtherPolicies sets the OtherPolicies field's value. -func (s *Policies) SetOtherPolicies(v []*string) *Policies { - s.OtherPolicies = v - return s -} - -// Information about a policy attribute. -type PolicyAttribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - AttributeName *string `type:"string"` - - // The value of the attribute. - AttributeValue *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 PolicyAttribute) 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 PolicyAttribute) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *PolicyAttribute) SetAttributeName(v string) *PolicyAttribute { - s.AttributeName = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *PolicyAttribute) SetAttributeValue(v string) *PolicyAttribute { - s.AttributeValue = &v - return s -} - -// Information about a policy attribute. -type PolicyAttributeDescription struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - AttributeName *string `type:"string"` - - // The value of the attribute. - AttributeValue *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 PolicyAttributeDescription) 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 PolicyAttributeDescription) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *PolicyAttributeDescription) SetAttributeName(v string) *PolicyAttributeDescription { - s.AttributeName = &v - return s -} - -// SetAttributeValue sets the AttributeValue field's value. -func (s *PolicyAttributeDescription) SetAttributeValue(v string) *PolicyAttributeDescription { - s.AttributeValue = &v - return s -} - -// Information about a policy attribute type. -type PolicyAttributeTypeDescription struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - AttributeName *string `type:"string"` - - // The type of the attribute. For example, Boolean or Integer. - AttributeType *string `type:"string"` - - // The cardinality of the attribute. - // - // Valid values: - // - // * ONE(1) : Single value required - // - // * ZERO_OR_ONE(0..1) : Up to one value is allowed - // - // * ZERO_OR_MORE(0..*) : Optional. Multiple values are allowed - // - // * ONE_OR_MORE(1..*0) : Required. Multiple values are allowed - Cardinality *string `type:"string"` - - // The default value of the attribute, if applicable. - DefaultValue *string `type:"string"` - - // A description of the attribute. - Description *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 PolicyAttributeTypeDescription) 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 PolicyAttributeTypeDescription) GoString() string { - return s.String() -} - -// SetAttributeName sets the AttributeName field's value. -func (s *PolicyAttributeTypeDescription) SetAttributeName(v string) *PolicyAttributeTypeDescription { - s.AttributeName = &v - return s -} - -// SetAttributeType sets the AttributeType field's value. -func (s *PolicyAttributeTypeDescription) SetAttributeType(v string) *PolicyAttributeTypeDescription { - s.AttributeType = &v - return s -} - -// SetCardinality sets the Cardinality field's value. -func (s *PolicyAttributeTypeDescription) SetCardinality(v string) *PolicyAttributeTypeDescription { - s.Cardinality = &v - return s -} - -// SetDefaultValue sets the DefaultValue field's value. -func (s *PolicyAttributeTypeDescription) SetDefaultValue(v string) *PolicyAttributeTypeDescription { - s.DefaultValue = &v - return s -} - -// SetDescription sets the Description field's value. -func (s *PolicyAttributeTypeDescription) SetDescription(v string) *PolicyAttributeTypeDescription { - s.Description = &v - return s -} - -// Information about a policy. -type PolicyDescription struct { - _ struct{} `type:"structure"` - - // The policy attributes. - PolicyAttributeDescriptions []*PolicyAttributeDescription `type:"list"` - - // The name of the policy. - PolicyName *string `type:"string"` - - // The name of the policy type. - PolicyTypeName *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 PolicyDescription) 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 PolicyDescription) GoString() string { - return s.String() -} - -// SetPolicyAttributeDescriptions sets the PolicyAttributeDescriptions field's value. -func (s *PolicyDescription) SetPolicyAttributeDescriptions(v []*PolicyAttributeDescription) *PolicyDescription { - s.PolicyAttributeDescriptions = v - return s -} - -// SetPolicyName sets the PolicyName field's value. -func (s *PolicyDescription) SetPolicyName(v string) *PolicyDescription { - s.PolicyName = &v - return s -} - -// SetPolicyTypeName sets the PolicyTypeName field's value. -func (s *PolicyDescription) SetPolicyTypeName(v string) *PolicyDescription { - s.PolicyTypeName = &v - return s -} - -// Information about a policy type. -type PolicyTypeDescription struct { - _ struct{} `type:"structure"` - - // A description of the policy type. - Description *string `type:"string"` - - // The description of the policy attributes associated with the policies defined - // by Elastic Load Balancing. - PolicyAttributeTypeDescriptions []*PolicyAttributeTypeDescription `type:"list"` - - // The name of the policy type. - PolicyTypeName *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 PolicyTypeDescription) 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 PolicyTypeDescription) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *PolicyTypeDescription) SetDescription(v string) *PolicyTypeDescription { - s.Description = &v - return s -} - -// SetPolicyAttributeTypeDescriptions sets the PolicyAttributeTypeDescriptions field's value. -func (s *PolicyTypeDescription) SetPolicyAttributeTypeDescriptions(v []*PolicyAttributeTypeDescription) *PolicyTypeDescription { - s.PolicyAttributeTypeDescriptions = v - return s -} - -// SetPolicyTypeName sets the PolicyTypeName field's value. -func (s *PolicyTypeDescription) SetPolicyTypeName(v string) *PolicyTypeDescription { - s.PolicyTypeName = &v - return s -} - -// Contains the parameters for RegisterInstancesWithLoadBalancer. -type RegisterInstancesWithLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The IDs of the instances. - // - // Instances is a required field - Instances []*Instance `type:"list" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *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 RegisterInstancesWithLoadBalancerInput) 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 RegisterInstancesWithLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterInstancesWithLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterInstancesWithLoadBalancerInput"} - if s.Instances == nil { - invalidParams.Add(request.NewErrParamRequired("Instances")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstances sets the Instances field's value. -func (s *RegisterInstancesWithLoadBalancerInput) SetInstances(v []*Instance) *RegisterInstancesWithLoadBalancerInput { - s.Instances = v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *RegisterInstancesWithLoadBalancerInput) SetLoadBalancerName(v string) *RegisterInstancesWithLoadBalancerInput { - s.LoadBalancerName = &v - return s -} - -// Contains the output of RegisterInstancesWithLoadBalancer. -type RegisterInstancesWithLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // The updated list of instances for the load balancer. - Instances []*Instance `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 RegisterInstancesWithLoadBalancerOutput) 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 RegisterInstancesWithLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetInstances sets the Instances field's value. -func (s *RegisterInstancesWithLoadBalancerOutput) SetInstances(v []*Instance) *RegisterInstancesWithLoadBalancerOutput { - s.Instances = v - return s -} - -// Contains the parameters for RemoveTags. -type RemoveTagsInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. You can specify a maximum of one load balancer - // name. - // - // LoadBalancerNames is a required field - LoadBalancerNames []*string `type:"list" required:"true"` - - // The list of tag keys to remove. - // - // Tags is a required field - Tags []*TagKeyOnly `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 RemoveTagsInput) 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 RemoveTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} - if s.LoadBalancerNames == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerNames")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 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 -} - -// SetLoadBalancerNames sets the LoadBalancerNames field's value. -func (s *RemoveTagsInput) SetLoadBalancerNames(v []*string) *RemoveTagsInput { - s.LoadBalancerNames = v - return s -} - -// SetTags sets the Tags field's value. -func (s *RemoveTagsInput) SetTags(v []*TagKeyOnly) *RemoveTagsInput { - s.Tags = v - return s -} - -// Contains the output of RemoveTags. -type RemoveTagsOutput 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 RemoveTagsOutput) 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 RemoveTagsOutput) GoString() string { - return s.String() -} - -// Contains the parameters for SetLoadBalancerListenerSSLCertificate. -type SetLoadBalancerListenerSSLCertificateInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The port that uses the specified SSL certificate. - // - // LoadBalancerPort is a required field - LoadBalancerPort *int64 `type:"integer" required:"true"` - - // The Amazon Resource Name (ARN) of the SSL certificate. - // - // SSLCertificateId is a required field - SSLCertificateId *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 SetLoadBalancerListenerSSLCertificateInput) 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 SetLoadBalancerListenerSSLCertificateInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetLoadBalancerListenerSSLCertificateInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetLoadBalancerListenerSSLCertificateInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.LoadBalancerPort == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerPort")) - } - if s.SSLCertificateId == nil { - invalidParams.Add(request.NewErrParamRequired("SSLCertificateId")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *SetLoadBalancerListenerSSLCertificateInput) SetLoadBalancerName(v string) *SetLoadBalancerListenerSSLCertificateInput { - s.LoadBalancerName = &v - return s -} - -// SetLoadBalancerPort sets the LoadBalancerPort field's value. -func (s *SetLoadBalancerListenerSSLCertificateInput) SetLoadBalancerPort(v int64) *SetLoadBalancerListenerSSLCertificateInput { - s.LoadBalancerPort = &v - return s -} - -// SetSSLCertificateId sets the SSLCertificateId field's value. -func (s *SetLoadBalancerListenerSSLCertificateInput) SetSSLCertificateId(v string) *SetLoadBalancerListenerSSLCertificateInput { - s.SSLCertificateId = &v - return s -} - -// Contains the output of SetLoadBalancerListenerSSLCertificate. -type SetLoadBalancerListenerSSLCertificateOutput 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 SetLoadBalancerListenerSSLCertificateOutput) 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 SetLoadBalancerListenerSSLCertificateOutput) GoString() string { - return s.String() -} - -// Contains the parameters for SetLoadBalancerPoliciesForBackendServer. -type SetLoadBalancerPoliciesForBackendServerInput struct { - _ struct{} `type:"structure"` - - // The port number associated with the EC2 instance. - // - // InstancePort is a required field - InstancePort *int64 `type:"integer" required:"true"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The names of the policies. If the list is empty, then all current polices - // are removed from the EC2 instance. - // - // PolicyNames is a required field - PolicyNames []*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 SetLoadBalancerPoliciesForBackendServerInput) 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 SetLoadBalancerPoliciesForBackendServerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetLoadBalancerPoliciesForBackendServerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetLoadBalancerPoliciesForBackendServerInput"} - if s.InstancePort == nil { - invalidParams.Add(request.NewErrParamRequired("InstancePort")) - } - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.PolicyNames == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInstancePort sets the InstancePort field's value. -func (s *SetLoadBalancerPoliciesForBackendServerInput) SetInstancePort(v int64) *SetLoadBalancerPoliciesForBackendServerInput { - s.InstancePort = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *SetLoadBalancerPoliciesForBackendServerInput) SetLoadBalancerName(v string) *SetLoadBalancerPoliciesForBackendServerInput { - s.LoadBalancerName = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *SetLoadBalancerPoliciesForBackendServerInput) SetPolicyNames(v []*string) *SetLoadBalancerPoliciesForBackendServerInput { - s.PolicyNames = v - return s -} - -// Contains the output of SetLoadBalancerPoliciesForBackendServer. -type SetLoadBalancerPoliciesForBackendServerOutput 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 SetLoadBalancerPoliciesForBackendServerOutput) 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 SetLoadBalancerPoliciesForBackendServerOutput) GoString() string { - return s.String() -} - -// Contains the parameters for SetLoadBalancePoliciesOfListener. -type SetLoadBalancerPoliciesOfListenerInput struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - // - // LoadBalancerName is a required field - LoadBalancerName *string `type:"string" required:"true"` - - // The external port of the load balancer. - // - // LoadBalancerPort is a required field - LoadBalancerPort *int64 `type:"integer" required:"true"` - - // The names of the policies. This list must include all policies to be enabled. - // If you omit a policy that is currently enabled, it is disabled. If the list - // is empty, all current policies are disabled. - // - // PolicyNames is a required field - PolicyNames []*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 SetLoadBalancerPoliciesOfListenerInput) 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 SetLoadBalancerPoliciesOfListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetLoadBalancerPoliciesOfListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetLoadBalancerPoliciesOfListenerInput"} - if s.LoadBalancerName == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerName")) - } - if s.LoadBalancerPort == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerPort")) - } - if s.PolicyNames == nil { - invalidParams.Add(request.NewErrParamRequired("PolicyNames")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *SetLoadBalancerPoliciesOfListenerInput) SetLoadBalancerName(v string) *SetLoadBalancerPoliciesOfListenerInput { - s.LoadBalancerName = &v - return s -} - -// SetLoadBalancerPort sets the LoadBalancerPort field's value. -func (s *SetLoadBalancerPoliciesOfListenerInput) SetLoadBalancerPort(v int64) *SetLoadBalancerPoliciesOfListenerInput { - s.LoadBalancerPort = &v - return s -} - -// SetPolicyNames sets the PolicyNames field's value. -func (s *SetLoadBalancerPoliciesOfListenerInput) SetPolicyNames(v []*string) *SetLoadBalancerPoliciesOfListenerInput { - s.PolicyNames = v - return s -} - -// Contains the output of SetLoadBalancePoliciesOfListener. -type SetLoadBalancerPoliciesOfListenerOutput 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 SetLoadBalancerPoliciesOfListenerOutput) 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 SetLoadBalancerPoliciesOfListenerOutput) GoString() string { - return s.String() -} - -// Information about a source security group. -type SourceSecurityGroup struct { - _ struct{} `type:"structure"` - - // The name of the security group. - GroupName *string `type:"string"` - - // The owner of the security group. - OwnerAlias *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 SourceSecurityGroup) 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 SourceSecurityGroup) GoString() string { - return s.String() -} - -// SetGroupName sets the GroupName field's value. -func (s *SourceSecurityGroup) SetGroupName(v string) *SourceSecurityGroup { - s.GroupName = &v - return s -} - -// SetOwnerAlias sets the OwnerAlias field's value. -func (s *SourceSecurityGroup) SetOwnerAlias(v string) *SourceSecurityGroup { - s.OwnerAlias = &v - return s -} - -// Information about a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value of the tag. - Value *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 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 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 -} - -// The tags associated with a load balancer. -type TagDescription struct { - _ struct{} `type:"structure"` - - // The name of the load balancer. - LoadBalancerName *string `type:"string"` - - // The tags. - Tags []*Tag `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 TagDescription) 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 TagDescription) GoString() string { - return s.String() -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *TagDescription) SetLoadBalancerName(v string) *TagDescription { - s.LoadBalancerName = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagDescription) SetTags(v []*Tag) *TagDescription { - s.Tags = v - return s -} - -// The key of a tag. -type TagKeyOnly struct { - _ struct{} `type:"structure"` - - // The name of the key. - Key *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 TagKeyOnly) 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 TagKeyOnly) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TagKeyOnly) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TagKeyOnly"} - 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 *TagKeyOnly) SetKey(v string) *TagKeyOnly { - s.Key = &v - return s -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go deleted file mode 100644 index c4815ced0c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/doc.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package elb provides the client and types for making API -// requests to Elastic Load Balancing. -// -// A load balancer can distribute incoming traffic across your EC2 instances. -// This enables you to increase the availability of your application. The load -// balancer also monitors the health of its registered instances and ensures -// that it routes traffic only to healthy instances. You configure your load -// balancer to accept incoming traffic by specifying one or more listeners, -// which are configured with a protocol and port number for connections from -// clients to the load balancer and a protocol and port number for connections -// from the load balancer to the instances. -// -// Elastic Load Balancing supports three types of load balancers: Application -// Load Balancers, Network Load Balancers, and Classic Load Balancers. You can -// select a load balancer based on your application needs. For more information, -// see the Elastic Load Balancing User Guide (https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/). -// -// This reference covers the 2012-06-01 API, which supports Classic Load Balancers. -// The 2015-12-01 API supports Application Load Balancers and Network Load Balancers. -// -// To get started, create a load balancer with one or more listeners using CreateLoadBalancer. -// Register your instances with the load balancer using RegisterInstancesWithLoadBalancer. -// -// All Elastic Load Balancing operations are idempotent, which means that they -// complete at most one time. If you repeat an operation, it succeeds with a -// 200 OK response code. -// -// See https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancing-2012-06-01 for more information on this service. -// -// See elb package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elb/ -// -// # Using the Client -// -// To contact Elastic Load Balancing 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 Elastic Load Balancing client ELB for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elb/#New -package elb diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go deleted file mode 100644 index 14f1e6717e..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/errors.go +++ /dev/null @@ -1,145 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elb - -const ( - - // ErrCodeAccessPointNotFoundException for service response error code - // "LoadBalancerNotFound". - // - // The specified load balancer does not exist. - ErrCodeAccessPointNotFoundException = "LoadBalancerNotFound" - - // ErrCodeCertificateNotFoundException for service response error code - // "CertificateNotFound". - // - // The specified ARN does not refer to a valid SSL certificate in AWS Identity - // and Access Management (IAM) or AWS Certificate Manager (ACM). Note that if - // you recently uploaded the certificate to IAM, this error might indicate that - // the certificate is not fully available yet. - ErrCodeCertificateNotFoundException = "CertificateNotFound" - - // ErrCodeDependencyThrottleException for service response error code - // "DependencyThrottle". - // - // A request made by Elastic Load Balancing to another service exceeds the maximum - // request rate permitted for your account. - ErrCodeDependencyThrottleException = "DependencyThrottle" - - // ErrCodeDuplicateAccessPointNameException for service response error code - // "DuplicateLoadBalancerName". - // - // The specified load balancer name already exists for this account. - ErrCodeDuplicateAccessPointNameException = "DuplicateLoadBalancerName" - - // ErrCodeDuplicateListenerException for service response error code - // "DuplicateListener". - // - // A listener already exists for the specified load balancer name and port, - // but with a different instance port, protocol, or SSL certificate. - ErrCodeDuplicateListenerException = "DuplicateListener" - - // ErrCodeDuplicatePolicyNameException for service response error code - // "DuplicatePolicyName". - // - // A policy with the specified name already exists for this load balancer. - ErrCodeDuplicatePolicyNameException = "DuplicatePolicyName" - - // ErrCodeDuplicateTagKeysException for service response error code - // "DuplicateTagKeys". - // - // A tag key was specified more than once. - ErrCodeDuplicateTagKeysException = "DuplicateTagKeys" - - // ErrCodeInvalidConfigurationRequestException for service response error code - // "InvalidConfigurationRequest". - // - // The requested configuration change is not valid. - ErrCodeInvalidConfigurationRequestException = "InvalidConfigurationRequest" - - // ErrCodeInvalidEndPointException for service response error code - // "InvalidInstance". - // - // The specified endpoint is not valid. - ErrCodeInvalidEndPointException = "InvalidInstance" - - // ErrCodeInvalidSchemeException for service response error code - // "InvalidScheme". - // - // The specified value for the schema is not valid. You can only specify a scheme - // for load balancers in a VPC. - ErrCodeInvalidSchemeException = "InvalidScheme" - - // ErrCodeInvalidSecurityGroupException for service response error code - // "InvalidSecurityGroup". - // - // One or more of the specified security groups do not exist. - ErrCodeInvalidSecurityGroupException = "InvalidSecurityGroup" - - // ErrCodeInvalidSubnetException for service response error code - // "InvalidSubnet". - // - // The specified VPC has no associated Internet gateway. - ErrCodeInvalidSubnetException = "InvalidSubnet" - - // ErrCodeListenerNotFoundException for service response error code - // "ListenerNotFound". - // - // The load balancer does not have a listener configured at the specified port. - ErrCodeListenerNotFoundException = "ListenerNotFound" - - // ErrCodeLoadBalancerAttributeNotFoundException for service response error code - // "LoadBalancerAttributeNotFound". - // - // The specified load balancer attribute does not exist. - ErrCodeLoadBalancerAttributeNotFoundException = "LoadBalancerAttributeNotFound" - - // ErrCodeOperationNotPermittedException for service response error code - // "OperationNotPermitted". - // - // This operation is not allowed. - ErrCodeOperationNotPermittedException = "OperationNotPermitted" - - // ErrCodePolicyNotFoundException for service response error code - // "PolicyNotFound". - // - // One or more of the specified policies do not exist. - ErrCodePolicyNotFoundException = "PolicyNotFound" - - // ErrCodePolicyTypeNotFoundException for service response error code - // "PolicyTypeNotFound". - // - // One or more of the specified policy types do not exist. - ErrCodePolicyTypeNotFoundException = "PolicyTypeNotFound" - - // ErrCodeSubnetNotFoundException for service response error code - // "SubnetNotFound". - // - // One or more of the specified subnets do not exist. - ErrCodeSubnetNotFoundException = "SubnetNotFound" - - // ErrCodeTooManyAccessPointsException for service response error code - // "TooManyLoadBalancers". - // - // The quota for the number of load balancers has been reached. - ErrCodeTooManyAccessPointsException = "TooManyLoadBalancers" - - // ErrCodeTooManyPoliciesException for service response error code - // "TooManyPolicies". - // - // The quota for the number of policies for this load balancer has been reached. - ErrCodeTooManyPoliciesException = "TooManyPolicies" - - // ErrCodeTooManyTagsException for service response error code - // "TooManyTags". - // - // The quota for the number of tags that can be assigned to a load balancer - // has been reached. - ErrCodeTooManyTagsException = "TooManyTags" - - // ErrCodeUnsupportedProtocolException for service response error code - // "UnsupportedProtocol". - // - // The specified protocol or signature version is not supported. - ErrCodeUnsupportedProtocolException = "UnsupportedProtocol" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elb/service.go b/vendor/github.com/aws/aws-sdk-go/service/elb/service.go deleted file mode 100644 index 360f287048..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/service.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elb - -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/query" -) - -// ELB provides the API operation methods for making requests to -// Elastic Load Balancing. See this package's package overview docs -// for details on the service. -// -// ELB methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ELB 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 = "elasticloadbalancing" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Elastic Load Balancing" // ServiceID is a unique identifier of a specific service. -) - -// New creates a new instance of the ELB 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 ELB client from just a session. -// svc := elb.New(mySession) -// -// // Create a ELB client with additional configuration -// svc := elb.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ELB { - 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) *ELB { - svc := &ELB{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - PartitionID: partitionID, - Endpoint: endpoint, - APIVersion: "2012-06-01", - ResolvedRegion: resolvedRegion, - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ELB operation and runs any -// custom request initialization. -func (c *ELB) 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/elb/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/elb/waiters.go deleted file mode 100644 index bdf449d36b..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elb/waiters.go +++ /dev/null @@ -1,158 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elb - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilAnyInstanceInService uses the Elastic Load Balancing API operation -// DescribeInstanceHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELB) WaitUntilAnyInstanceInService(input *DescribeInstanceHealthInput) error { - return c.WaitUntilAnyInstanceInServiceWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilAnyInstanceInServiceWithContext is an extended version of WaitUntilAnyInstanceInService. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// 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 *ELB) WaitUntilAnyInstanceInServiceWithContext(ctx aws.Context, input *DescribeInstanceHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilAnyInstanceInService", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "InstanceStates[].State", - Expected: "InService", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstanceHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceDeregistered uses the Elastic Load Balancing API operation -// DescribeInstanceHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELB) WaitUntilInstanceDeregistered(input *DescribeInstanceHealthInput) error { - return c.WaitUntilInstanceDeregisteredWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceDeregisteredWithContext is an extended version of WaitUntilInstanceDeregistered. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// 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 *ELB) WaitUntilInstanceDeregisteredWithContext(ctx aws.Context, input *DescribeInstanceHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceDeregistered", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "InstanceStates[].State", - Expected: "OutOfService", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidInstance", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstanceHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilInstanceInService uses the Elastic Load Balancing API operation -// DescribeInstanceHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELB) WaitUntilInstanceInService(input *DescribeInstanceHealthInput) error { - return c.WaitUntilInstanceInServiceWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilInstanceInServiceWithContext is an extended version of WaitUntilInstanceInService. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// 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 *ELB) WaitUntilInstanceInServiceWithContext(ctx aws.Context, input *DescribeInstanceHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilInstanceInService", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "InstanceStates[].State", - Expected: "InService", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidInstance", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeInstanceHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeInstanceHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go deleted file mode 100644 index b773205c5c..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/api.go +++ /dev/null @@ -1,13621 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elbv2 - -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/query" -) - -const opAddListenerCertificates = "AddListenerCertificates" - -// AddListenerCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the AddListenerCertificates 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 AddListenerCertificates for more information on using the AddListenerCertificates -// 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 AddListenerCertificatesRequest method. -// req, resp := client.AddListenerCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddListenerCertificates -func (c *ELBV2) AddListenerCertificatesRequest(input *AddListenerCertificatesInput) (req *request.Request, output *AddListenerCertificatesOutput) { - op := &request.Operation{ - Name: opAddListenerCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddListenerCertificatesInput{} - } - - output = &AddListenerCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddListenerCertificates API operation for Elastic Load Balancing. -// -// Adds the specified SSL server certificate to the certificate list for the -// specified HTTPS or TLS listener. -// -// If the certificate in already in the certificate list, the call is successful -// but the certificate is not added again. -// -// For more information, see HTTPS listeners (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html) -// in the Application Load Balancers Guide or TLS listeners (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html) -// in the Network Load Balancers 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 Elastic Load Balancing's -// API operation AddListenerCertificates for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeTooManyCertificatesException "TooManyCertificates" -// You've reached the limit on the number of certificates per load balancer. -// -// - ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified certificate does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddListenerCertificates -func (c *ELBV2) AddListenerCertificates(input *AddListenerCertificatesInput) (*AddListenerCertificatesOutput, error) { - req, out := c.AddListenerCertificatesRequest(input) - return out, req.Send() -} - -// AddListenerCertificatesWithContext is the same as AddListenerCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See AddListenerCertificates 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 *ELBV2) AddListenerCertificatesWithContext(ctx aws.Context, input *AddListenerCertificatesInput, opts ...request.Option) (*AddListenerCertificatesOutput, error) { - req, out := c.AddListenerCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTags = "AddTags" - -// AddTagsRequest generates a "aws/request.Request" representing the -// client's request for the AddTags 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 AddTags for more information on using the AddTags -// 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 AddTagsRequest method. -// req, resp := client.AddTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTags -func (c *ELBV2) AddTagsRequest(input *AddTagsInput) (req *request.Request, output *AddTagsOutput) { - op := &request.Operation{ - Name: opAddTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTagsInput{} - } - - output = &AddTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// AddTags API operation for Elastic Load Balancing. -// -// Adds the specified tags to the specified Elastic Load Balancing resource. -// You can tag your Application Load Balancers, Network Load Balancers, Gateway -// Load Balancers, target groups, trust stores, listeners, and rules. -// -// Each tag consists of a key and an optional value. If a resource already has -// a tag with the same key, AddTags updates its value. -// -// 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 Elastic Load Balancing's -// API operation AddTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeDuplicateTagKeysException "DuplicateTagKeys" -// A tag key was specified more than once. -// -// - ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags for this resource. -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTags -func (c *ELBV2) AddTags(input *AddTagsInput) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - return out, req.Send() -} - -// AddTagsWithContext is the same as AddTags with the addition of -// the ability to pass a context and additional request options. -// -// See AddTags 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 *ELBV2) AddTagsWithContext(ctx aws.Context, input *AddTagsInput, opts ...request.Option) (*AddTagsOutput, error) { - req, out := c.AddTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opAddTrustStoreRevocations = "AddTrustStoreRevocations" - -// AddTrustStoreRevocationsRequest generates a "aws/request.Request" representing the -// client's request for the AddTrustStoreRevocations 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 AddTrustStoreRevocations for more information on using the AddTrustStoreRevocations -// 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 AddTrustStoreRevocationsRequest method. -// req, resp := client.AddTrustStoreRevocationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTrustStoreRevocations -func (c *ELBV2) AddTrustStoreRevocationsRequest(input *AddTrustStoreRevocationsInput) (req *request.Request, output *AddTrustStoreRevocationsOutput) { - op := &request.Operation{ - Name: opAddTrustStoreRevocations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &AddTrustStoreRevocationsInput{} - } - - output = &AddTrustStoreRevocationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// AddTrustStoreRevocations API operation for Elastic Load Balancing. -// -// Adds the specified revocation file to the specified trust store. -// -// 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 Elastic Load Balancing's -// API operation AddTrustStoreRevocations for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// - ErrCodeInvalidRevocationContentException "InvalidRevocationContent" -// The provided revocation file is an invalid format, or uses an incorrect algorithm. -// -// - ErrCodeTooManyTrustStoreRevocationEntriesException "TooManyTrustStoreRevocationEntries" -// The specified trust store has too many revocation entries. -// -// - ErrCodeRevocationContentNotFoundException "RevocationContentNotFound" -// The specified revocation file does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/AddTrustStoreRevocations -func (c *ELBV2) AddTrustStoreRevocations(input *AddTrustStoreRevocationsInput) (*AddTrustStoreRevocationsOutput, error) { - req, out := c.AddTrustStoreRevocationsRequest(input) - return out, req.Send() -} - -// AddTrustStoreRevocationsWithContext is the same as AddTrustStoreRevocations with the addition of -// the ability to pass a context and additional request options. -// -// See AddTrustStoreRevocations 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 *ELBV2) AddTrustStoreRevocationsWithContext(ctx aws.Context, input *AddTrustStoreRevocationsInput, opts ...request.Option) (*AddTrustStoreRevocationsOutput, error) { - req, out := c.AddTrustStoreRevocationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateListener = "CreateListener" - -// CreateListenerRequest generates a "aws/request.Request" representing the -// client's request for the CreateListener 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 CreateListener for more information on using the CreateListener -// 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 CreateListenerRequest method. -// req, resp := client.CreateListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateListener -func (c *ELBV2) CreateListenerRequest(input *CreateListenerInput) (req *request.Request, output *CreateListenerOutput) { - op := &request.Operation{ - Name: opCreateListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateListenerInput{} - } - - output = &CreateListenerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateListener API operation for Elastic Load Balancing. -// -// Creates a listener for the specified Application Load Balancer, Network Load -// Balancer, or Gateway Load Balancer. -// -// For more information, see the following: -// -// - Listeners for your Application Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html) -// -// - Listeners for your Network Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-listeners.html) -// -// - Listeners for your Gateway Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/gateway-listeners.html) -// -// This operation is idempotent, which means that it completes at most one time. -// If you attempt to create multiple listeners with the same settings, each -// call succeeds. -// -// 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 Elastic Load Balancing's -// API operation CreateListener for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeDuplicateListenerException "DuplicateListener" -// A listener with the specified port already exists. -// -// - ErrCodeTooManyListenersException "TooManyListeners" -// You've reached the limit on the number of listeners per load balancer. -// -// - ErrCodeTooManyCertificatesException "TooManyCertificates" -// You've reached the limit on the number of certificates per load balancer. -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" -// You've reached the limit on the number of load balancers per target group. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// - ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" -// The specified configuration is not valid with this protocol. -// -// - ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound" -// The specified SSL policy does not exist. -// -// - ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified certificate does not exist. -// -// - ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// - ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// - ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// - ErrCodeTooManyActionsException "TooManyActions" -// You've reached the limit on the number of actions per rule. -// -// - ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" -// The requested action is not valid. -// -// - ErrCodeTooManyUniqueTargetGroupsPerLoadBalancerException "TooManyUniqueTargetGroupsPerLoadBalancer" -// You've reached the limit on the number of unique target groups per load balancer -// across all listeners. If a target group is used by multiple actions for a -// load balancer, it is counted as only one use. -// -// - ErrCodeALPNPolicyNotSupportedException "ALPNPolicyNotFound" -// The specified ALPN policy is not supported. -// -// - ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags for this resource. -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// - ErrCodeTrustStoreNotReadyException "TrustStoreNotReady" -// The specified trust store is not active. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateListener -func (c *ELBV2) CreateListener(input *CreateListenerInput) (*CreateListenerOutput, error) { - req, out := c.CreateListenerRequest(input) - return out, req.Send() -} - -// CreateListenerWithContext is the same as CreateListener with the addition of -// the ability to pass a context and additional request options. -// -// See CreateListener 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 *ELBV2) CreateListenerWithContext(ctx aws.Context, input *CreateListenerInput, opts ...request.Option) (*CreateListenerOutput, error) { - req, out := c.CreateListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateLoadBalancer = "CreateLoadBalancer" - -// CreateLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the CreateLoadBalancer 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 CreateLoadBalancer for more information on using the CreateLoadBalancer -// 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 CreateLoadBalancerRequest method. -// req, resp := client.CreateLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateLoadBalancer -func (c *ELBV2) CreateLoadBalancerRequest(input *CreateLoadBalancerInput) (req *request.Request, output *CreateLoadBalancerOutput) { - op := &request.Operation{ - Name: opCreateLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateLoadBalancerInput{} - } - - output = &CreateLoadBalancerOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateLoadBalancer API operation for Elastic Load Balancing. -// -// Creates an Application Load Balancer, Network Load Balancer, or Gateway Load -// Balancer. -// -// For more information, see the following: -// -// - Application Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html) -// -// - Network Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html) -// -// - Gateway Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/gateway-load-balancers.html) -// -// This operation is idempotent, which means that it completes at most one time. -// If you attempt to create multiple load balancers with the same settings, -// each call succeeds. -// -// 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 Elastic Load Balancing's -// API operation CreateLoadBalancer for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeDuplicateLoadBalancerNameException "DuplicateLoadBalancerName" -// A load balancer with the specified name already exists. -// -// - ErrCodeTooManyLoadBalancersException "TooManyLoadBalancers" -// You've reached the limit on the number of load balancers for your Amazon -// Web Services account. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// - ErrCodeSubnetNotFoundException "SubnetNotFound" -// The specified subnet does not exist. -// -// - ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified subnet is out of available addresses. -// -// - ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup" -// The specified security group does not exist. -// -// - ErrCodeInvalidSchemeException "InvalidScheme" -// The requested scheme is not valid. -// -// - ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags for this resource. -// -// - ErrCodeDuplicateTagKeysException "DuplicateTagKeys" -// A tag key was specified more than once. -// -// - ErrCodeResourceInUseException "ResourceInUse" -// A specified resource is in use. -// -// - ErrCodeAllocationIdNotFoundException "AllocationIdNotFound" -// The specified allocation ID does not exist. -// -// - ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported" -// The specified Availability Zone is not supported. -// -// - ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateLoadBalancer -func (c *ELBV2) CreateLoadBalancer(input *CreateLoadBalancerInput) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - return out, req.Send() -} - -// CreateLoadBalancerWithContext is the same as CreateLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See CreateLoadBalancer 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 *ELBV2) CreateLoadBalancerWithContext(ctx aws.Context, input *CreateLoadBalancerInput, opts ...request.Option) (*CreateLoadBalancerOutput, error) { - req, out := c.CreateLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateRule = "CreateRule" - -// CreateRuleRequest generates a "aws/request.Request" representing the -// client's request for the CreateRule 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 CreateRule for more information on using the CreateRule -// 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 CreateRuleRequest method. -// req, resp := client.CreateRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateRule -func (c *ELBV2) CreateRuleRequest(input *CreateRuleInput) (req *request.Request, output *CreateRuleOutput) { - op := &request.Operation{ - Name: opCreateRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateRuleInput{} - } - - output = &CreateRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateRule API operation for Elastic Load Balancing. -// -// Creates a rule for the specified listener. The listener must be associated -// with an Application Load Balancer. -// -// Each rule consists of a priority, one or more actions, and one or more conditions. -// Rules are evaluated in priority order, from the lowest value to the highest -// value. When the conditions for a rule are met, its actions are performed. -// If the conditions for no rules are met, the actions for the default rule -// are performed. For more information, see Listener rules (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html#listener-rules) -// in the Application Load Balancers 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 Elastic Load Balancing's -// API operation CreateRule for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodePriorityInUseException "PriorityInUse" -// The specified priority is in use. -// -// - ErrCodeTooManyTargetGroupsException "TooManyTargetGroups" -// You've reached the limit on the number of target groups for your Amazon Web -// Services account. -// -// - ErrCodeTooManyRulesException "TooManyRules" -// You've reached the limit on the number of rules per load balancer. -// -// - ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" -// You've reached the limit on the number of load balancers per target group. -// -// - ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" -// The specified configuration is not valid with this protocol. -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// - ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// - ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// - ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// - ErrCodeTooManyActionsException "TooManyActions" -// You've reached the limit on the number of actions per rule. -// -// - ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" -// The requested action is not valid. -// -// - ErrCodeTooManyUniqueTargetGroupsPerLoadBalancerException "TooManyUniqueTargetGroupsPerLoadBalancer" -// You've reached the limit on the number of unique target groups per load balancer -// across all listeners. If a target group is used by multiple actions for a -// load balancer, it is counted as only one use. -// -// - ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags for this resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateRule -func (c *ELBV2) CreateRule(input *CreateRuleInput) (*CreateRuleOutput, error) { - req, out := c.CreateRuleRequest(input) - return out, req.Send() -} - -// CreateRuleWithContext is the same as CreateRule with the addition of -// the ability to pass a context and additional request options. -// -// See CreateRule 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 *ELBV2) CreateRuleWithContext(ctx aws.Context, input *CreateRuleInput, opts ...request.Option) (*CreateRuleOutput, error) { - req, out := c.CreateRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTargetGroup = "CreateTargetGroup" - -// CreateTargetGroupRequest generates a "aws/request.Request" representing the -// client's request for the CreateTargetGroup 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 CreateTargetGroup for more information on using the CreateTargetGroup -// 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 CreateTargetGroupRequest method. -// req, resp := client.CreateTargetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateTargetGroup -func (c *ELBV2) CreateTargetGroupRequest(input *CreateTargetGroupInput) (req *request.Request, output *CreateTargetGroupOutput) { - op := &request.Operation{ - Name: opCreateTargetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTargetGroupInput{} - } - - output = &CreateTargetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTargetGroup API operation for Elastic Load Balancing. -// -// Creates a target group. -// -// For more information, see the following: -// -// - Target groups for your Application Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html) -// -// - Target groups for your Network Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html) -// -// - Target groups for your Gateway Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/target-groups.html) -// -// This operation is idempotent, which means that it completes at most one time. -// If you attempt to create multiple target groups with the same settings, each -// call succeeds. -// -// 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 Elastic Load Balancing's -// API operation CreateTargetGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeDuplicateTargetGroupNameException "DuplicateTargetGroupName" -// A target group with the specified name already exists. -// -// - ErrCodeTooManyTargetGroupsException "TooManyTargetGroups" -// You've reached the limit on the number of target groups for your Amazon Web -// Services account. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// - ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags for this resource. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateTargetGroup -func (c *ELBV2) CreateTargetGroup(input *CreateTargetGroupInput) (*CreateTargetGroupOutput, error) { - req, out := c.CreateTargetGroupRequest(input) - return out, req.Send() -} - -// CreateTargetGroupWithContext is the same as CreateTargetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTargetGroup 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 *ELBV2) CreateTargetGroupWithContext(ctx aws.Context, input *CreateTargetGroupInput, opts ...request.Option) (*CreateTargetGroupOutput, error) { - req, out := c.CreateTargetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opCreateTrustStore = "CreateTrustStore" - -// CreateTrustStoreRequest generates a "aws/request.Request" representing the -// client's request for the CreateTrustStore 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 CreateTrustStore for more information on using the CreateTrustStore -// 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 CreateTrustStoreRequest method. -// req, resp := client.CreateTrustStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateTrustStore -func (c *ELBV2) CreateTrustStoreRequest(input *CreateTrustStoreInput) (req *request.Request, output *CreateTrustStoreOutput) { - op := &request.Operation{ - Name: opCreateTrustStore, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &CreateTrustStoreInput{} - } - - output = &CreateTrustStoreOutput{} - req = c.newRequest(op, input, output) - return -} - -// CreateTrustStore API operation for Elastic Load Balancing. -// -// Creates a trust store. -// -// 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 Elastic Load Balancing's -// API operation CreateTrustStore for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeDuplicateTrustStoreNameException "DuplicateTrustStoreName" -// A trust store with the specified name already exists. -// -// - ErrCodeTooManyTrustStoresException "TooManyTrustStores" -// You've reached the limit on the number of trust stores for your Amazon Web -// Services account. -// -// - ErrCodeInvalidCaCertificatesBundleException "InvalidCaCertificatesBundle" -// The specified ca certificate bundle is in an invalid format, or corrupt. -// -// - ErrCodeCaCertificatesBundleNotFoundException "CaCertificatesBundleNotFound" -// The specified ca certificate bundle does not exist. -// -// - ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags for this resource. -// -// - ErrCodeDuplicateTagKeysException "DuplicateTagKeys" -// A tag key was specified more than once. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/CreateTrustStore -func (c *ELBV2) CreateTrustStore(input *CreateTrustStoreInput) (*CreateTrustStoreOutput, error) { - req, out := c.CreateTrustStoreRequest(input) - return out, req.Send() -} - -// CreateTrustStoreWithContext is the same as CreateTrustStore with the addition of -// the ability to pass a context and additional request options. -// -// See CreateTrustStore 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 *ELBV2) CreateTrustStoreWithContext(ctx aws.Context, input *CreateTrustStoreInput, opts ...request.Option) (*CreateTrustStoreOutput, error) { - req, out := c.CreateTrustStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteListener = "DeleteListener" - -// DeleteListenerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteListener 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 DeleteListener for more information on using the DeleteListener -// 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 DeleteListenerRequest method. -// req, resp := client.DeleteListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteListener -func (c *ELBV2) DeleteListenerRequest(input *DeleteListenerInput) (req *request.Request, output *DeleteListenerOutput) { - op := &request.Operation{ - Name: opDeleteListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteListenerInput{} - } - - output = &DeleteListenerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteListener API operation for Elastic Load Balancing. -// -// Deletes the specified listener. -// -// Alternatively, your listener is deleted when you delete the load balancer -// to which it is attached. -// -// 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 Elastic Load Balancing's -// API operation DeleteListener for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeResourceInUseException "ResourceInUse" -// A specified resource is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteListener -func (c *ELBV2) DeleteListener(input *DeleteListenerInput) (*DeleteListenerOutput, error) { - req, out := c.DeleteListenerRequest(input) - return out, req.Send() -} - -// DeleteListenerWithContext is the same as DeleteListener with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteListener 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 *ELBV2) DeleteListenerWithContext(ctx aws.Context, input *DeleteListenerInput, opts ...request.Option) (*DeleteListenerOutput, error) { - req, out := c.DeleteListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteLoadBalancer = "DeleteLoadBalancer" - -// DeleteLoadBalancerRequest generates a "aws/request.Request" representing the -// client's request for the DeleteLoadBalancer 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 DeleteLoadBalancer for more information on using the DeleteLoadBalancer -// 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 DeleteLoadBalancerRequest method. -// req, resp := client.DeleteLoadBalancerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteLoadBalancer -func (c *ELBV2) DeleteLoadBalancerRequest(input *DeleteLoadBalancerInput) (req *request.Request, output *DeleteLoadBalancerOutput) { - op := &request.Operation{ - Name: opDeleteLoadBalancer, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteLoadBalancerInput{} - } - - output = &DeleteLoadBalancerOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteLoadBalancer API operation for Elastic Load Balancing. -// -// Deletes the specified Application Load Balancer, Network Load Balancer, or -// Gateway Load Balancer. Deleting a load balancer also deletes its listeners. -// -// You can't delete a load balancer if deletion protection is enabled. If the -// load balancer does not exist or has already been deleted, the call succeeds. -// -// Deleting a load balancer does not affect its registered targets. For example, -// your EC2 instances continue to run and are still registered to their target -// groups. If you no longer need these EC2 instances, you can stop or terminate -// them. -// -// 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 Elastic Load Balancing's -// API operation DeleteLoadBalancer for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// - ErrCodeResourceInUseException "ResourceInUse" -// A specified resource is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteLoadBalancer -func (c *ELBV2) DeleteLoadBalancer(input *DeleteLoadBalancerInput) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - return out, req.Send() -} - -// DeleteLoadBalancerWithContext is the same as DeleteLoadBalancer with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteLoadBalancer 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 *ELBV2) DeleteLoadBalancerWithContext(ctx aws.Context, input *DeleteLoadBalancerInput, opts ...request.Option) (*DeleteLoadBalancerOutput, error) { - req, out := c.DeleteLoadBalancerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteRule = "DeleteRule" - -// DeleteRuleRequest generates a "aws/request.Request" representing the -// client's request for the DeleteRule 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 DeleteRule for more information on using the DeleteRule -// 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 DeleteRuleRequest method. -// req, resp := client.DeleteRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteRule -func (c *ELBV2) DeleteRuleRequest(input *DeleteRuleInput) (req *request.Request, output *DeleteRuleOutput) { - op := &request.Operation{ - Name: opDeleteRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteRuleInput{} - } - - output = &DeleteRuleOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteRule API operation for Elastic Load Balancing. -// -// Deletes the specified rule. -// -// You can't delete the default rule. -// -// 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 Elastic Load Balancing's -// API operation DeleteRule for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// - ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteRule -func (c *ELBV2) DeleteRule(input *DeleteRuleInput) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - return out, req.Send() -} - -// DeleteRuleWithContext is the same as DeleteRule with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteRule 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 *ELBV2) DeleteRuleWithContext(ctx aws.Context, input *DeleteRuleInput, opts ...request.Option) (*DeleteRuleOutput, error) { - req, out := c.DeleteRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteSharedTrustStoreAssociation = "DeleteSharedTrustStoreAssociation" - -// DeleteSharedTrustStoreAssociationRequest generates a "aws/request.Request" representing the -// client's request for the DeleteSharedTrustStoreAssociation 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 DeleteSharedTrustStoreAssociation for more information on using the DeleteSharedTrustStoreAssociation -// 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 DeleteSharedTrustStoreAssociationRequest method. -// req, resp := client.DeleteSharedTrustStoreAssociationRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteSharedTrustStoreAssociation -func (c *ELBV2) DeleteSharedTrustStoreAssociationRequest(input *DeleteSharedTrustStoreAssociationInput) (req *request.Request, output *DeleteSharedTrustStoreAssociationOutput) { - op := &request.Operation{ - Name: opDeleteSharedTrustStoreAssociation, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteSharedTrustStoreAssociationInput{} - } - - output = &DeleteSharedTrustStoreAssociationOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteSharedTrustStoreAssociation API operation for Elastic Load Balancing. -// -// Deletes a shared trust store association. -// -// 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 Elastic Load Balancing's -// API operation DeleteSharedTrustStoreAssociation for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// - ErrCodeDeleteAssociationSameAccountException "DeleteAssociationSameAccount" -// The specified association cannot be within the same account. -// -// - ErrCodeTrustStoreAssociationNotFoundException "AssociationNotFound" -// The specified association does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteSharedTrustStoreAssociation -func (c *ELBV2) DeleteSharedTrustStoreAssociation(input *DeleteSharedTrustStoreAssociationInput) (*DeleteSharedTrustStoreAssociationOutput, error) { - req, out := c.DeleteSharedTrustStoreAssociationRequest(input) - return out, req.Send() -} - -// DeleteSharedTrustStoreAssociationWithContext is the same as DeleteSharedTrustStoreAssociation with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteSharedTrustStoreAssociation 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 *ELBV2) DeleteSharedTrustStoreAssociationWithContext(ctx aws.Context, input *DeleteSharedTrustStoreAssociationInput, opts ...request.Option) (*DeleteSharedTrustStoreAssociationOutput, error) { - req, out := c.DeleteSharedTrustStoreAssociationRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTargetGroup = "DeleteTargetGroup" - -// DeleteTargetGroupRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTargetGroup 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 DeleteTargetGroup for more information on using the DeleteTargetGroup -// 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 DeleteTargetGroupRequest method. -// req, resp := client.DeleteTargetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteTargetGroup -func (c *ELBV2) DeleteTargetGroupRequest(input *DeleteTargetGroupInput) (req *request.Request, output *DeleteTargetGroupOutput) { - op := &request.Operation{ - Name: opDeleteTargetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTargetGroupInput{} - } - - output = &DeleteTargetGroupOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTargetGroup API operation for Elastic Load Balancing. -// -// Deletes the specified target group. -// -// You can delete a target group if it is not referenced by any actions. Deleting -// a target group also deletes any associated health checks. Deleting a target -// group does not affect its registered targets. For example, any EC2 instances -// continue to run until you stop or terminate them. -// -// 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 Elastic Load Balancing's -// API operation DeleteTargetGroup for usage and error information. -// -// Returned Error Codes: -// - ErrCodeResourceInUseException "ResourceInUse" -// A specified resource is in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteTargetGroup -func (c *ELBV2) DeleteTargetGroup(input *DeleteTargetGroupInput) (*DeleteTargetGroupOutput, error) { - req, out := c.DeleteTargetGroupRequest(input) - return out, req.Send() -} - -// DeleteTargetGroupWithContext is the same as DeleteTargetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTargetGroup 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 *ELBV2) DeleteTargetGroupWithContext(ctx aws.Context, input *DeleteTargetGroupInput, opts ...request.Option) (*DeleteTargetGroupOutput, error) { - req, out := c.DeleteTargetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeleteTrustStore = "DeleteTrustStore" - -// DeleteTrustStoreRequest generates a "aws/request.Request" representing the -// client's request for the DeleteTrustStore 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 DeleteTrustStore for more information on using the DeleteTrustStore -// 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 DeleteTrustStoreRequest method. -// req, resp := client.DeleteTrustStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteTrustStore -func (c *ELBV2) DeleteTrustStoreRequest(input *DeleteTrustStoreInput) (req *request.Request, output *DeleteTrustStoreOutput) { - op := &request.Operation{ - Name: opDeleteTrustStore, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeleteTrustStoreInput{} - } - - output = &DeleteTrustStoreOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeleteTrustStore API operation for Elastic Load Balancing. -// -// Deletes a trust store. -// -// 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 Elastic Load Balancing's -// API operation DeleteTrustStore for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// - ErrCodeTrustStoreInUseException "TrustStoreInUse" -// The specified trust store is currently in use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeleteTrustStore -func (c *ELBV2) DeleteTrustStore(input *DeleteTrustStoreInput) (*DeleteTrustStoreOutput, error) { - req, out := c.DeleteTrustStoreRequest(input) - return out, req.Send() -} - -// DeleteTrustStoreWithContext is the same as DeleteTrustStore with the addition of -// the ability to pass a context and additional request options. -// -// See DeleteTrustStore 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 *ELBV2) DeleteTrustStoreWithContext(ctx aws.Context, input *DeleteTrustStoreInput, opts ...request.Option) (*DeleteTrustStoreOutput, error) { - req, out := c.DeleteTrustStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDeregisterTargets = "DeregisterTargets" - -// DeregisterTargetsRequest generates a "aws/request.Request" representing the -// client's request for the DeregisterTargets 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 DeregisterTargets for more information on using the DeregisterTargets -// 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 DeregisterTargetsRequest method. -// req, resp := client.DeregisterTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeregisterTargets -func (c *ELBV2) DeregisterTargetsRequest(input *DeregisterTargetsInput) (req *request.Request, output *DeregisterTargetsOutput) { - op := &request.Operation{ - Name: opDeregisterTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DeregisterTargetsInput{} - } - - output = &DeregisterTargetsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// DeregisterTargets API operation for Elastic Load Balancing. -// -// Deregisters the specified targets from the specified target group. After -// the targets are deregistered, they no longer receive traffic from the load -// balancer. -// -// The load balancer stops sending requests to targets that are deregistering, -// but uses connection draining to ensure that in-flight traffic completes on -// the existing connections. This deregistration delay is configured by default -// but can be updated for each target group. -// -// For more information, see the following: -// -// - Deregistration delay (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#deregistration-delay) -// in the Application Load Balancers User Guide -// -// - Deregistration delay (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#deregistration-delay) -// in the Network Load Balancers User Guide -// -// - Deregistration delay (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/target-groups.html#deregistration-delay) -// in the Gateway Load Balancers User Guide -// -// Note: If the specified target does not exist, the action returns successfully. -// -// 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 Elastic Load Balancing's -// API operation DeregisterTargets for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeInvalidTargetException "InvalidTarget" -// The specified target does not exist, is not in the same VPC as the target -// group, or has an unsupported instance type. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DeregisterTargets -func (c *ELBV2) DeregisterTargets(input *DeregisterTargetsInput) (*DeregisterTargetsOutput, error) { - req, out := c.DeregisterTargetsRequest(input) - return out, req.Send() -} - -// DeregisterTargetsWithContext is the same as DeregisterTargets with the addition of -// the ability to pass a context and additional request options. -// -// See DeregisterTargets 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 *ELBV2) DeregisterTargetsWithContext(ctx aws.Context, input *DeregisterTargetsInput, opts ...request.Option) (*DeregisterTargetsOutput, error) { - req, out := c.DeregisterTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeAccountLimits = "DescribeAccountLimits" - -// DescribeAccountLimitsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeAccountLimits 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 DescribeAccountLimits for more information on using the DescribeAccountLimits -// 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 DescribeAccountLimitsRequest method. -// req, resp := client.DescribeAccountLimitsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeAccountLimits -func (c *ELBV2) DescribeAccountLimitsRequest(input *DescribeAccountLimitsInput) (req *request.Request, output *DescribeAccountLimitsOutput) { - op := &request.Operation{ - Name: opDescribeAccountLimits, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeAccountLimitsInput{} - } - - output = &DescribeAccountLimitsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeAccountLimits API operation for Elastic Load Balancing. -// -// Describes the current Elastic Load Balancing resource limits for your Amazon -// Web Services account. -// -// For more information, see the following: -// -// - Quotas for your Application Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html) -// -// - Quotas for your Network Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html) -// -// - Quotas for your Gateway Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/quotas-limits.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 Elastic Load Balancing's -// API operation DescribeAccountLimits for usage and error information. -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeAccountLimits -func (c *ELBV2) DescribeAccountLimits(input *DescribeAccountLimitsInput) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - return out, req.Send() -} - -// DescribeAccountLimitsWithContext is the same as DescribeAccountLimits with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeAccountLimits 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 *ELBV2) DescribeAccountLimitsWithContext(ctx aws.Context, input *DescribeAccountLimitsInput, opts ...request.Option) (*DescribeAccountLimitsOutput, error) { - req, out := c.DescribeAccountLimitsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeListenerCertificates = "DescribeListenerCertificates" - -// DescribeListenerCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeListenerCertificates 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 DescribeListenerCertificates for more information on using the DescribeListenerCertificates -// 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 DescribeListenerCertificatesRequest method. -// req, resp := client.DescribeListenerCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificates -func (c *ELBV2) DescribeListenerCertificatesRequest(input *DescribeListenerCertificatesInput) (req *request.Request, output *DescribeListenerCertificatesOutput) { - op := &request.Operation{ - Name: opDescribeListenerCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeListenerCertificatesInput{} - } - - output = &DescribeListenerCertificatesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeListenerCertificates API operation for Elastic Load Balancing. -// -// Describes the default certificate and the certificate list for the specified -// HTTPS or TLS listener. -// -// If the default certificate is also in the certificate list, it appears twice -// in the results (once with IsDefault set to true and once with IsDefault set -// to false). -// -// For more information, see SSL certificates (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#https-listener-certificates) -// in the Application Load Balancers Guide or Server certificates (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#tls-listener-certificate) -// in the Network Load Balancers 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 Elastic Load Balancing's -// API operation DescribeListenerCertificates for usage and error information. -// -// Returned Error Codes: -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListenerCertificates -func (c *ELBV2) DescribeListenerCertificates(input *DescribeListenerCertificatesInput) (*DescribeListenerCertificatesOutput, error) { - req, out := c.DescribeListenerCertificatesRequest(input) - return out, req.Send() -} - -// DescribeListenerCertificatesWithContext is the same as DescribeListenerCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeListenerCertificates 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 *ELBV2) DescribeListenerCertificatesWithContext(ctx aws.Context, input *DescribeListenerCertificatesInput, opts ...request.Option) (*DescribeListenerCertificatesOutput, error) { - req, out := c.DescribeListenerCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeListeners = "DescribeListeners" - -// DescribeListenersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeListeners 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 DescribeListeners for more information on using the DescribeListeners -// 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 DescribeListenersRequest method. -// req, resp := client.DescribeListenersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListeners -func (c *ELBV2) DescribeListenersRequest(input *DescribeListenersInput) (req *request.Request, output *DescribeListenersOutput) { - op := &request.Operation{ - Name: opDescribeListeners, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeListenersInput{} - } - - output = &DescribeListenersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeListeners API operation for Elastic Load Balancing. -// -// Describes the specified listeners or the listeners for the specified Application -// Load Balancer, Network Load Balancer, or Gateway Load Balancer. You must -// specify either a load balancer or one or more listeners. -// -// 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 Elastic Load Balancing's -// API operation DescribeListeners for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeListeners -func (c *ELBV2) DescribeListeners(input *DescribeListenersInput) (*DescribeListenersOutput, error) { - req, out := c.DescribeListenersRequest(input) - return out, req.Send() -} - -// DescribeListenersWithContext is the same as DescribeListeners with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeListeners 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 *ELBV2) DescribeListenersWithContext(ctx aws.Context, input *DescribeListenersInput, opts ...request.Option) (*DescribeListenersOutput, error) { - req, out := c.DescribeListenersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeListenersPages iterates over the pages of a DescribeListeners operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeListeners 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 DescribeListeners operation. -// pageNum := 0 -// err := client.DescribeListenersPages(params, -// func(page *elbv2.DescribeListenersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ELBV2) DescribeListenersPages(input *DescribeListenersInput, fn func(*DescribeListenersOutput, bool) bool) error { - return c.DescribeListenersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeListenersPagesWithContext same as DescribeListenersPages 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 *ELBV2) DescribeListenersPagesWithContext(ctx aws.Context, input *DescribeListenersInput, fn func(*DescribeListenersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeListenersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeListenersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeListenersOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeLoadBalancerAttributes = "DescribeLoadBalancerAttributes" - -// DescribeLoadBalancerAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancerAttributes 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 DescribeLoadBalancerAttributes for more information on using the DescribeLoadBalancerAttributes -// 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 DescribeLoadBalancerAttributesRequest method. -// req, resp := client.DescribeLoadBalancerAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancerAttributes -func (c *ELBV2) DescribeLoadBalancerAttributesRequest(input *DescribeLoadBalancerAttributesInput) (req *request.Request, output *DescribeLoadBalancerAttributesOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancerAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeLoadBalancerAttributesInput{} - } - - output = &DescribeLoadBalancerAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancerAttributes API operation for Elastic Load Balancing. -// -// Describes the attributes for the specified Application Load Balancer, Network -// Load Balancer, or Gateway Load Balancer. -// -// For more information, see the following: -// -// - Load balancer attributes (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/application-load-balancers.html#load-balancer-attributes) -// in the Application Load Balancers Guide -// -// - Load balancer attributes (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/network-load-balancers.html#load-balancer-attributes) -// in the Network Load Balancers Guide -// -// - Load balancer attributes (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/gateway-load-balancers.html#load-balancer-attributes) -// in the Gateway Load Balancers 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 Elastic Load Balancing's -// API operation DescribeLoadBalancerAttributes for usage and error information. -// -// Returned Error Codes: -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancerAttributes -func (c *ELBV2) DescribeLoadBalancerAttributes(input *DescribeLoadBalancerAttributesInput) (*DescribeLoadBalancerAttributesOutput, error) { - req, out := c.DescribeLoadBalancerAttributesRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancerAttributesWithContext is the same as DescribeLoadBalancerAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancerAttributes 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 *ELBV2) DescribeLoadBalancerAttributesWithContext(ctx aws.Context, input *DescribeLoadBalancerAttributesInput, opts ...request.Option) (*DescribeLoadBalancerAttributesOutput, error) { - req, out := c.DescribeLoadBalancerAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeLoadBalancers = "DescribeLoadBalancers" - -// DescribeLoadBalancersRequest generates a "aws/request.Request" representing the -// client's request for the DescribeLoadBalancers 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 DescribeLoadBalancers for more information on using the DescribeLoadBalancers -// 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 DescribeLoadBalancersRequest method. -// req, resp := client.DescribeLoadBalancersRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancers -func (c *ELBV2) DescribeLoadBalancersRequest(input *DescribeLoadBalancersInput) (req *request.Request, output *DescribeLoadBalancersOutput) { - op := &request.Operation{ - Name: opDescribeLoadBalancers, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeLoadBalancersInput{} - } - - output = &DescribeLoadBalancersOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeLoadBalancers API operation for Elastic Load Balancing. -// -// Describes the specified load balancers or all of your load balancers. -// -// 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 Elastic Load Balancing's -// API operation DescribeLoadBalancers for usage and error information. -// -// Returned Error Codes: -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeLoadBalancers -func (c *ELBV2) DescribeLoadBalancers(input *DescribeLoadBalancersInput) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - return out, req.Send() -} - -// DescribeLoadBalancersWithContext is the same as DescribeLoadBalancers with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeLoadBalancers 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 *ELBV2) DescribeLoadBalancersWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.Option) (*DescribeLoadBalancersOutput, error) { - req, out := c.DescribeLoadBalancersRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeLoadBalancersPages iterates over the pages of a DescribeLoadBalancers operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeLoadBalancers 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 DescribeLoadBalancers operation. -// pageNum := 0 -// err := client.DescribeLoadBalancersPages(params, -// func(page *elbv2.DescribeLoadBalancersOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ELBV2) DescribeLoadBalancersPages(input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool) error { - return c.DescribeLoadBalancersPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeLoadBalancersPagesWithContext same as DescribeLoadBalancersPages 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 *ELBV2) DescribeLoadBalancersPagesWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, fn func(*DescribeLoadBalancersOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeLoadBalancersOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeRules = "DescribeRules" - -// DescribeRulesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeRules 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 DescribeRules for more information on using the DescribeRules -// 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 DescribeRulesRequest method. -// req, resp := client.DescribeRulesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeRules -func (c *ELBV2) DescribeRulesRequest(input *DescribeRulesInput) (req *request.Request, output *DescribeRulesOutput) { - op := &request.Operation{ - Name: opDescribeRules, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeRulesInput{} - } - - output = &DescribeRulesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeRules API operation for Elastic Load Balancing. -// -// Describes the specified rules or the rules for the specified listener. You -// must specify either a listener or one or more rules. -// -// 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 Elastic Load Balancing's -// API operation DescribeRules for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// - ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeRules -func (c *ELBV2) DescribeRules(input *DescribeRulesInput) (*DescribeRulesOutput, error) { - req, out := c.DescribeRulesRequest(input) - return out, req.Send() -} - -// DescribeRulesWithContext is the same as DescribeRules with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeRules 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 *ELBV2) DescribeRulesWithContext(ctx aws.Context, input *DescribeRulesInput, opts ...request.Option) (*DescribeRulesOutput, error) { - req, out := c.DescribeRulesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeSSLPolicies = "DescribeSSLPolicies" - -// DescribeSSLPoliciesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeSSLPolicies 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 DescribeSSLPolicies for more information on using the DescribeSSLPolicies -// 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 DescribeSSLPoliciesRequest method. -// req, resp := client.DescribeSSLPoliciesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeSSLPolicies -func (c *ELBV2) DescribeSSLPoliciesRequest(input *DescribeSSLPoliciesInput) (req *request.Request, output *DescribeSSLPoliciesOutput) { - op := &request.Operation{ - Name: opDescribeSSLPolicies, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeSSLPoliciesInput{} - } - - output = &DescribeSSLPoliciesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeSSLPolicies API operation for Elastic Load Balancing. -// -// Describes the specified policies or all policies used for SSL negotiation. -// -// For more information, see Security policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) -// in the Application Load Balancers Guide or Security policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies) -// in the Network Load Balancers 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 Elastic Load Balancing's -// API operation DescribeSSLPolicies for usage and error information. -// -// Returned Error Codes: -// - ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound" -// The specified SSL policy does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeSSLPolicies -func (c *ELBV2) DescribeSSLPolicies(input *DescribeSSLPoliciesInput) (*DescribeSSLPoliciesOutput, error) { - req, out := c.DescribeSSLPoliciesRequest(input) - return out, req.Send() -} - -// DescribeSSLPoliciesWithContext is the same as DescribeSSLPolicies with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeSSLPolicies 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 *ELBV2) DescribeSSLPoliciesWithContext(ctx aws.Context, input *DescribeSSLPoliciesInput, opts ...request.Option) (*DescribeSSLPoliciesOutput, error) { - req, out := c.DescribeSSLPoliciesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -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/elasticloadbalancingv2-2015-12-01/DescribeTags -func (c *ELBV2) DescribeTagsRequest(input *DescribeTagsInput) (req *request.Request, output *DescribeTagsOutput) { - op := &request.Operation{ - Name: opDescribeTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTagsInput{} - } - - output = &DescribeTagsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTags API operation for Elastic Load Balancing. -// -// Describes the tags for the specified Elastic Load Balancing resources. You -// can describe the tags for one or more Application Load Balancers, Network -// Load Balancers, Gateway Load Balancers, target groups, listeners, or rules. -// -// 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 Elastic Load Balancing's -// API operation DescribeTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTags -func (c *ELBV2) 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. -func (c *ELBV2) 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() -} - -const opDescribeTargetGroupAttributes = "DescribeTargetGroupAttributes" - -// DescribeTargetGroupAttributesRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTargetGroupAttributes 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 DescribeTargetGroupAttributes for more information on using the DescribeTargetGroupAttributes -// 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 DescribeTargetGroupAttributesRequest method. -// req, resp := client.DescribeTargetGroupAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroupAttributes -func (c *ELBV2) DescribeTargetGroupAttributesRequest(input *DescribeTargetGroupAttributesInput) (req *request.Request, output *DescribeTargetGroupAttributesOutput) { - op := &request.Operation{ - Name: opDescribeTargetGroupAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTargetGroupAttributesInput{} - } - - output = &DescribeTargetGroupAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTargetGroupAttributes API operation for Elastic Load Balancing. -// -// Describes the attributes for the specified target group. -// -// For more information, see the following: -// -// - Target group attributes (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-target-groups.html#target-group-attributes) -// in the Application Load Balancers Guide -// -// - Target group attributes (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-target-groups.html#target-group-attributes) -// in the Network Load Balancers Guide -// -// - Target group attributes (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/target-groups.html#target-group-attributes) -// in the Gateway Load Balancers 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 Elastic Load Balancing's -// API operation DescribeTargetGroupAttributes for usage and error information. -// -// Returned Error Codes: -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroupAttributes -func (c *ELBV2) DescribeTargetGroupAttributes(input *DescribeTargetGroupAttributesInput) (*DescribeTargetGroupAttributesOutput, error) { - req, out := c.DescribeTargetGroupAttributesRequest(input) - return out, req.Send() -} - -// DescribeTargetGroupAttributesWithContext is the same as DescribeTargetGroupAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTargetGroupAttributes 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 *ELBV2) DescribeTargetGroupAttributesWithContext(ctx aws.Context, input *DescribeTargetGroupAttributesInput, opts ...request.Option) (*DescribeTargetGroupAttributesOutput, error) { - req, out := c.DescribeTargetGroupAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTargetGroups = "DescribeTargetGroups" - -// DescribeTargetGroupsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTargetGroups 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 DescribeTargetGroups for more information on using the DescribeTargetGroups -// 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 DescribeTargetGroupsRequest method. -// req, resp := client.DescribeTargetGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroups -func (c *ELBV2) DescribeTargetGroupsRequest(input *DescribeTargetGroupsInput) (req *request.Request, output *DescribeTargetGroupsOutput) { - op := &request.Operation{ - Name: opDescribeTargetGroups, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTargetGroupsInput{} - } - - output = &DescribeTargetGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTargetGroups API operation for Elastic Load Balancing. -// -// Describes the specified target groups or all of your target groups. By default, -// all target groups are described. Alternatively, you can specify one of the -// following to filter the results: the ARN of the load balancer, the names -// of one or more target groups, or the ARNs of one or more target groups. -// -// 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 Elastic Load Balancing's -// API operation DescribeTargetGroups for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetGroups -func (c *ELBV2) DescribeTargetGroups(input *DescribeTargetGroupsInput) (*DescribeTargetGroupsOutput, error) { - req, out := c.DescribeTargetGroupsRequest(input) - return out, req.Send() -} - -// DescribeTargetGroupsWithContext is the same as DescribeTargetGroups with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTargetGroups 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 *ELBV2) DescribeTargetGroupsWithContext(ctx aws.Context, input *DescribeTargetGroupsInput, opts ...request.Option) (*DescribeTargetGroupsOutput, error) { - req, out := c.DescribeTargetGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTargetGroupsPages iterates over the pages of a DescribeTargetGroups operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTargetGroups 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 DescribeTargetGroups operation. -// pageNum := 0 -// err := client.DescribeTargetGroupsPages(params, -// func(page *elbv2.DescribeTargetGroupsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ELBV2) DescribeTargetGroupsPages(input *DescribeTargetGroupsInput, fn func(*DescribeTargetGroupsOutput, bool) bool) error { - return c.DescribeTargetGroupsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTargetGroupsPagesWithContext same as DescribeTargetGroupsPages 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 *ELBV2) DescribeTargetGroupsPagesWithContext(ctx aws.Context, input *DescribeTargetGroupsInput, fn func(*DescribeTargetGroupsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTargetGroupsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTargetGroupsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeTargetGroupsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeTargetHealth = "DescribeTargetHealth" - -// DescribeTargetHealthRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTargetHealth 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 DescribeTargetHealth for more information on using the DescribeTargetHealth -// 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 DescribeTargetHealthRequest method. -// req, resp := client.DescribeTargetHealthRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetHealth -func (c *ELBV2) DescribeTargetHealthRequest(input *DescribeTargetHealthInput) (req *request.Request, output *DescribeTargetHealthOutput) { - op := &request.Operation{ - Name: opDescribeTargetHealth, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &DescribeTargetHealthInput{} - } - - output = &DescribeTargetHealthOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTargetHealth API operation for Elastic Load Balancing. -// -// Describes the health of the specified targets or all of your targets. -// -// 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 Elastic Load Balancing's -// API operation DescribeTargetHealth for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeInvalidTargetException "InvalidTarget" -// The specified target does not exist, is not in the same VPC as the target -// group, or has an unsupported instance type. -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeHealthUnavailableException "HealthUnavailable" -// The health of the specified targets could not be retrieved due to an internal -// error. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTargetHealth -func (c *ELBV2) DescribeTargetHealth(input *DescribeTargetHealthInput) (*DescribeTargetHealthOutput, error) { - req, out := c.DescribeTargetHealthRequest(input) - return out, req.Send() -} - -// DescribeTargetHealthWithContext is the same as DescribeTargetHealth with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTargetHealth 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 *ELBV2) DescribeTargetHealthWithContext(ctx aws.Context, input *DescribeTargetHealthInput, opts ...request.Option) (*DescribeTargetHealthOutput, error) { - req, out := c.DescribeTargetHealthRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opDescribeTrustStoreAssociations = "DescribeTrustStoreAssociations" - -// DescribeTrustStoreAssociationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTrustStoreAssociations 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 DescribeTrustStoreAssociations for more information on using the DescribeTrustStoreAssociations -// 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 DescribeTrustStoreAssociationsRequest method. -// req, resp := client.DescribeTrustStoreAssociationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTrustStoreAssociations -func (c *ELBV2) DescribeTrustStoreAssociationsRequest(input *DescribeTrustStoreAssociationsInput) (req *request.Request, output *DescribeTrustStoreAssociationsOutput) { - op := &request.Operation{ - Name: opDescribeTrustStoreAssociations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTrustStoreAssociationsInput{} - } - - output = &DescribeTrustStoreAssociationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTrustStoreAssociations API operation for Elastic Load Balancing. -// -// Describes all resources associated with the specified trust store. -// -// 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 Elastic Load Balancing's -// API operation DescribeTrustStoreAssociations for usage and error information. -// -// Returned Error Codes: -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTrustStoreAssociations -func (c *ELBV2) DescribeTrustStoreAssociations(input *DescribeTrustStoreAssociationsInput) (*DescribeTrustStoreAssociationsOutput, error) { - req, out := c.DescribeTrustStoreAssociationsRequest(input) - return out, req.Send() -} - -// DescribeTrustStoreAssociationsWithContext is the same as DescribeTrustStoreAssociations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTrustStoreAssociations 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 *ELBV2) DescribeTrustStoreAssociationsWithContext(ctx aws.Context, input *DescribeTrustStoreAssociationsInput, opts ...request.Option) (*DescribeTrustStoreAssociationsOutput, error) { - req, out := c.DescribeTrustStoreAssociationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTrustStoreAssociationsPages iterates over the pages of a DescribeTrustStoreAssociations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTrustStoreAssociations 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 DescribeTrustStoreAssociations operation. -// pageNum := 0 -// err := client.DescribeTrustStoreAssociationsPages(params, -// func(page *elbv2.DescribeTrustStoreAssociationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ELBV2) DescribeTrustStoreAssociationsPages(input *DescribeTrustStoreAssociationsInput, fn func(*DescribeTrustStoreAssociationsOutput, bool) bool) error { - return c.DescribeTrustStoreAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTrustStoreAssociationsPagesWithContext same as DescribeTrustStoreAssociationsPages 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 *ELBV2) DescribeTrustStoreAssociationsPagesWithContext(ctx aws.Context, input *DescribeTrustStoreAssociationsInput, fn func(*DescribeTrustStoreAssociationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTrustStoreAssociationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTrustStoreAssociationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeTrustStoreAssociationsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeTrustStoreRevocations = "DescribeTrustStoreRevocations" - -// DescribeTrustStoreRevocationsRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTrustStoreRevocations 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 DescribeTrustStoreRevocations for more information on using the DescribeTrustStoreRevocations -// 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 DescribeTrustStoreRevocationsRequest method. -// req, resp := client.DescribeTrustStoreRevocationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTrustStoreRevocations -func (c *ELBV2) DescribeTrustStoreRevocationsRequest(input *DescribeTrustStoreRevocationsInput) (req *request.Request, output *DescribeTrustStoreRevocationsOutput) { - op := &request.Operation{ - Name: opDescribeTrustStoreRevocations, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTrustStoreRevocationsInput{} - } - - output = &DescribeTrustStoreRevocationsOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTrustStoreRevocations API operation for Elastic Load Balancing. -// -// Describes the revocation files in use by the specified trust store or revocation -// files. -// -// 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 Elastic Load Balancing's -// API operation DescribeTrustStoreRevocations for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// - ErrCodeRevocationIdNotFoundException "RevocationIdNotFound" -// The specified revocation ID does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTrustStoreRevocations -func (c *ELBV2) DescribeTrustStoreRevocations(input *DescribeTrustStoreRevocationsInput) (*DescribeTrustStoreRevocationsOutput, error) { - req, out := c.DescribeTrustStoreRevocationsRequest(input) - return out, req.Send() -} - -// DescribeTrustStoreRevocationsWithContext is the same as DescribeTrustStoreRevocations with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTrustStoreRevocations 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 *ELBV2) DescribeTrustStoreRevocationsWithContext(ctx aws.Context, input *DescribeTrustStoreRevocationsInput, opts ...request.Option) (*DescribeTrustStoreRevocationsOutput, error) { - req, out := c.DescribeTrustStoreRevocationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTrustStoreRevocationsPages iterates over the pages of a DescribeTrustStoreRevocations operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTrustStoreRevocations 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 DescribeTrustStoreRevocations operation. -// pageNum := 0 -// err := client.DescribeTrustStoreRevocationsPages(params, -// func(page *elbv2.DescribeTrustStoreRevocationsOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ELBV2) DescribeTrustStoreRevocationsPages(input *DescribeTrustStoreRevocationsInput, fn func(*DescribeTrustStoreRevocationsOutput, bool) bool) error { - return c.DescribeTrustStoreRevocationsPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTrustStoreRevocationsPagesWithContext same as DescribeTrustStoreRevocationsPages 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 *ELBV2) DescribeTrustStoreRevocationsPagesWithContext(ctx aws.Context, input *DescribeTrustStoreRevocationsInput, fn func(*DescribeTrustStoreRevocationsOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTrustStoreRevocationsInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTrustStoreRevocationsRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeTrustStoreRevocationsOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opDescribeTrustStores = "DescribeTrustStores" - -// DescribeTrustStoresRequest generates a "aws/request.Request" representing the -// client's request for the DescribeTrustStores 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 DescribeTrustStores for more information on using the DescribeTrustStores -// 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 DescribeTrustStoresRequest method. -// req, resp := client.DescribeTrustStoresRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTrustStores -func (c *ELBV2) DescribeTrustStoresRequest(input *DescribeTrustStoresInput) (req *request.Request, output *DescribeTrustStoresOutput) { - op := &request.Operation{ - Name: opDescribeTrustStores, - HTTPMethod: "POST", - HTTPPath: "/", - Paginator: &request.Paginator{ - InputTokens: []string{"Marker"}, - OutputTokens: []string{"NextMarker"}, - LimitToken: "PageSize", - TruncationToken: "", - }, - } - - if input == nil { - input = &DescribeTrustStoresInput{} - } - - output = &DescribeTrustStoresOutput{} - req = c.newRequest(op, input, output) - return -} - -// DescribeTrustStores API operation for Elastic Load Balancing. -// -// Describes all trust stores for the specified account. -// -// 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 Elastic Load Balancing's -// API operation DescribeTrustStores for usage and error information. -// -// Returned Error Codes: -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/DescribeTrustStores -func (c *ELBV2) DescribeTrustStores(input *DescribeTrustStoresInput) (*DescribeTrustStoresOutput, error) { - req, out := c.DescribeTrustStoresRequest(input) - return out, req.Send() -} - -// DescribeTrustStoresWithContext is the same as DescribeTrustStores with the addition of -// the ability to pass a context and additional request options. -// -// See DescribeTrustStores 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 *ELBV2) DescribeTrustStoresWithContext(ctx aws.Context, input *DescribeTrustStoresInput, opts ...request.Option) (*DescribeTrustStoresOutput, error) { - req, out := c.DescribeTrustStoresRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// DescribeTrustStoresPages iterates over the pages of a DescribeTrustStores operation, -// calling the "fn" function with the response data for each page. To stop -// iterating, return false from the fn function. -// -// See DescribeTrustStores 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 DescribeTrustStores operation. -// pageNum := 0 -// err := client.DescribeTrustStoresPages(params, -// func(page *elbv2.DescribeTrustStoresOutput, lastPage bool) bool { -// pageNum++ -// fmt.Println(page) -// return pageNum <= 3 -// }) -func (c *ELBV2) DescribeTrustStoresPages(input *DescribeTrustStoresInput, fn func(*DescribeTrustStoresOutput, bool) bool) error { - return c.DescribeTrustStoresPagesWithContext(aws.BackgroundContext(), input, fn) -} - -// DescribeTrustStoresPagesWithContext same as DescribeTrustStoresPages 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 *ELBV2) DescribeTrustStoresPagesWithContext(ctx aws.Context, input *DescribeTrustStoresInput, fn func(*DescribeTrustStoresOutput, bool) bool, opts ...request.Option) error { - p := request.Pagination{ - NewRequest: func() (*request.Request, error) { - var inCpy *DescribeTrustStoresInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTrustStoresRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - - for p.Next() { - if !fn(p.Page().(*DescribeTrustStoresOutput), !p.HasNextPage()) { - break - } - } - - return p.Err() -} - -const opGetResourcePolicy = "GetResourcePolicy" - -// GetResourcePolicyRequest generates a "aws/request.Request" representing the -// client's request for the GetResourcePolicy 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 GetResourcePolicy for more information on using the GetResourcePolicy -// 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 GetResourcePolicyRequest method. -// req, resp := client.GetResourcePolicyRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/GetResourcePolicy -func (c *ELBV2) GetResourcePolicyRequest(input *GetResourcePolicyInput) (req *request.Request, output *GetResourcePolicyOutput) { - op := &request.Operation{ - Name: opGetResourcePolicy, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetResourcePolicyInput{} - } - - output = &GetResourcePolicyOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetResourcePolicy API operation for Elastic Load Balancing. -// -// Retrieves the resource policy for a specified resource. -// -// 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 Elastic Load Balancing's -// API operation GetResourcePolicy for usage and error information. -// -// Returned Error Codes: -// - ErrCodeResourceNotFoundException "ResourceNotFound" -// The specified resource does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/GetResourcePolicy -func (c *ELBV2) GetResourcePolicy(input *GetResourcePolicyInput) (*GetResourcePolicyOutput, error) { - req, out := c.GetResourcePolicyRequest(input) - return out, req.Send() -} - -// GetResourcePolicyWithContext is the same as GetResourcePolicy with the addition of -// the ability to pass a context and additional request options. -// -// See GetResourcePolicy 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 *ELBV2) GetResourcePolicyWithContext(ctx aws.Context, input *GetResourcePolicyInput, opts ...request.Option) (*GetResourcePolicyOutput, error) { - req, out := c.GetResourcePolicyRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTrustStoreCaCertificatesBundle = "GetTrustStoreCaCertificatesBundle" - -// GetTrustStoreCaCertificatesBundleRequest generates a "aws/request.Request" representing the -// client's request for the GetTrustStoreCaCertificatesBundle 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 GetTrustStoreCaCertificatesBundle for more information on using the GetTrustStoreCaCertificatesBundle -// 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 GetTrustStoreCaCertificatesBundleRequest method. -// req, resp := client.GetTrustStoreCaCertificatesBundleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/GetTrustStoreCaCertificatesBundle -func (c *ELBV2) GetTrustStoreCaCertificatesBundleRequest(input *GetTrustStoreCaCertificatesBundleInput) (req *request.Request, output *GetTrustStoreCaCertificatesBundleOutput) { - op := &request.Operation{ - Name: opGetTrustStoreCaCertificatesBundle, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTrustStoreCaCertificatesBundleInput{} - } - - output = &GetTrustStoreCaCertificatesBundleOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTrustStoreCaCertificatesBundle API operation for Elastic Load Balancing. -// -// Retrieves the ca certificate bundle. -// -// This action returns a pre-signed S3 URI which is active for ten minutes. -// -// 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 Elastic Load Balancing's -// API operation GetTrustStoreCaCertificatesBundle for usage and error information. -// -// Returned Error Codes: -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/GetTrustStoreCaCertificatesBundle -func (c *ELBV2) GetTrustStoreCaCertificatesBundle(input *GetTrustStoreCaCertificatesBundleInput) (*GetTrustStoreCaCertificatesBundleOutput, error) { - req, out := c.GetTrustStoreCaCertificatesBundleRequest(input) - return out, req.Send() -} - -// GetTrustStoreCaCertificatesBundleWithContext is the same as GetTrustStoreCaCertificatesBundle with the addition of -// the ability to pass a context and additional request options. -// -// See GetTrustStoreCaCertificatesBundle 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 *ELBV2) GetTrustStoreCaCertificatesBundleWithContext(ctx aws.Context, input *GetTrustStoreCaCertificatesBundleInput, opts ...request.Option) (*GetTrustStoreCaCertificatesBundleOutput, error) { - req, out := c.GetTrustStoreCaCertificatesBundleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opGetTrustStoreRevocationContent = "GetTrustStoreRevocationContent" - -// GetTrustStoreRevocationContentRequest generates a "aws/request.Request" representing the -// client's request for the GetTrustStoreRevocationContent 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 GetTrustStoreRevocationContent for more information on using the GetTrustStoreRevocationContent -// 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 GetTrustStoreRevocationContentRequest method. -// req, resp := client.GetTrustStoreRevocationContentRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/GetTrustStoreRevocationContent -func (c *ELBV2) GetTrustStoreRevocationContentRequest(input *GetTrustStoreRevocationContentInput) (req *request.Request, output *GetTrustStoreRevocationContentOutput) { - op := &request.Operation{ - Name: opGetTrustStoreRevocationContent, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &GetTrustStoreRevocationContentInput{} - } - - output = &GetTrustStoreRevocationContentOutput{} - req = c.newRequest(op, input, output) - return -} - -// GetTrustStoreRevocationContent API operation for Elastic Load Balancing. -// -// Retrieves the specified revocation file. -// -// This action returns a pre-signed S3 URI which is active for ten minutes. -// -// 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 Elastic Load Balancing's -// API operation GetTrustStoreRevocationContent for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// - ErrCodeRevocationIdNotFoundException "RevocationIdNotFound" -// The specified revocation ID does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/GetTrustStoreRevocationContent -func (c *ELBV2) GetTrustStoreRevocationContent(input *GetTrustStoreRevocationContentInput) (*GetTrustStoreRevocationContentOutput, error) { - req, out := c.GetTrustStoreRevocationContentRequest(input) - return out, req.Send() -} - -// GetTrustStoreRevocationContentWithContext is the same as GetTrustStoreRevocationContent with the addition of -// the ability to pass a context and additional request options. -// -// See GetTrustStoreRevocationContent 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 *ELBV2) GetTrustStoreRevocationContentWithContext(ctx aws.Context, input *GetTrustStoreRevocationContentInput, opts ...request.Option) (*GetTrustStoreRevocationContentOutput, error) { - req, out := c.GetTrustStoreRevocationContentRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyListener = "ModifyListener" - -// ModifyListenerRequest generates a "aws/request.Request" representing the -// client's request for the ModifyListener 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 ModifyListener for more information on using the ModifyListener -// 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 ModifyListenerRequest method. -// req, resp := client.ModifyListenerRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyListener -func (c *ELBV2) ModifyListenerRequest(input *ModifyListenerInput) (req *request.Request, output *ModifyListenerOutput) { - op := &request.Operation{ - Name: opModifyListener, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyListenerInput{} - } - - output = &ModifyListenerOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyListener API operation for Elastic Load Balancing. -// -// Replaces the specified properties of the specified listener. Any properties -// that you do not specify remain unchanged. -// -// Changing the protocol from HTTPS to HTTP, or from TLS to TCP, removes the -// security policy and default certificate properties. If you change the protocol -// from HTTP to HTTPS, or from TCP to TLS, you must add the security policy -// and default certificate properties. -// -// To add an item to a list, remove an item from a list, or update an item in -// a list, you must provide the entire list. For example, to add an action, -// specify a list with the current actions plus the new 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 Elastic Load Balancing's -// API operation ModifyListener for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeDuplicateListenerException "DuplicateListener" -// A listener with the specified port already exists. -// -// - ErrCodeTooManyListenersException "TooManyListeners" -// You've reached the limit on the number of listeners per load balancer. -// -// - ErrCodeTooManyCertificatesException "TooManyCertificates" -// You've reached the limit on the number of certificates per load balancer. -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" -// You've reached the limit on the number of load balancers per target group. -// -// - ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" -// The specified configuration is not valid with this protocol. -// -// - ErrCodeSSLPolicyNotFoundException "SSLPolicyNotFound" -// The specified SSL policy does not exist. -// -// - ErrCodeCertificateNotFoundException "CertificateNotFound" -// The specified certificate does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// - ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// - ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// - ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// - ErrCodeTooManyActionsException "TooManyActions" -// You've reached the limit on the number of actions per rule. -// -// - ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" -// The requested action is not valid. -// -// - ErrCodeTooManyUniqueTargetGroupsPerLoadBalancerException "TooManyUniqueTargetGroupsPerLoadBalancer" -// You've reached the limit on the number of unique target groups per load balancer -// across all listeners. If a target group is used by multiple actions for a -// load balancer, it is counted as only one use. -// -// - ErrCodeALPNPolicyNotSupportedException "ALPNPolicyNotFound" -// The specified ALPN policy is not supported. -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// - ErrCodeTrustStoreNotReadyException "TrustStoreNotReady" -// The specified trust store is not active. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyListener -func (c *ELBV2) ModifyListener(input *ModifyListenerInput) (*ModifyListenerOutput, error) { - req, out := c.ModifyListenerRequest(input) - return out, req.Send() -} - -// ModifyListenerWithContext is the same as ModifyListener with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyListener 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 *ELBV2) ModifyListenerWithContext(ctx aws.Context, input *ModifyListenerInput, opts ...request.Option) (*ModifyListenerOutput, error) { - req, out := c.ModifyListenerRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyLoadBalancerAttributes = "ModifyLoadBalancerAttributes" - -// ModifyLoadBalancerAttributesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyLoadBalancerAttributes 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 ModifyLoadBalancerAttributes for more information on using the ModifyLoadBalancerAttributes -// 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 ModifyLoadBalancerAttributesRequest method. -// req, resp := client.ModifyLoadBalancerAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyLoadBalancerAttributes -func (c *ELBV2) ModifyLoadBalancerAttributesRequest(input *ModifyLoadBalancerAttributesInput) (req *request.Request, output *ModifyLoadBalancerAttributesOutput) { - op := &request.Operation{ - Name: opModifyLoadBalancerAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyLoadBalancerAttributesInput{} - } - - output = &ModifyLoadBalancerAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyLoadBalancerAttributes API operation for Elastic Load Balancing. -// -// Modifies the specified attributes of the specified Application Load Balancer, -// Network Load Balancer, or Gateway Load Balancer. -// -// If any of the specified attributes can't be modified as requested, the call -// fails. Any existing attributes that you do not modify retain their current -// values. -// -// 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 Elastic Load Balancing's -// API operation ModifyLoadBalancerAttributes for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyLoadBalancerAttributes -func (c *ELBV2) ModifyLoadBalancerAttributes(input *ModifyLoadBalancerAttributesInput) (*ModifyLoadBalancerAttributesOutput, error) { - req, out := c.ModifyLoadBalancerAttributesRequest(input) - return out, req.Send() -} - -// ModifyLoadBalancerAttributesWithContext is the same as ModifyLoadBalancerAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyLoadBalancerAttributes 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 *ELBV2) ModifyLoadBalancerAttributesWithContext(ctx aws.Context, input *ModifyLoadBalancerAttributesInput, opts ...request.Option) (*ModifyLoadBalancerAttributesOutput, error) { - req, out := c.ModifyLoadBalancerAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyRule = "ModifyRule" - -// ModifyRuleRequest generates a "aws/request.Request" representing the -// client's request for the ModifyRule 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 ModifyRule for more information on using the ModifyRule -// 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 ModifyRuleRequest method. -// req, resp := client.ModifyRuleRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyRule -func (c *ELBV2) ModifyRuleRequest(input *ModifyRuleInput) (req *request.Request, output *ModifyRuleOutput) { - op := &request.Operation{ - Name: opModifyRule, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyRuleInput{} - } - - output = &ModifyRuleOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyRule API operation for Elastic Load Balancing. -// -// Replaces the specified properties of the specified rule. Any properties that -// you do not specify are unchanged. -// -// To add an item to a list, remove an item from a list, or update an item in -// a list, you must provide the entire list. For example, to add an action, -// specify a list with the current actions plus the new 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 Elastic Load Balancing's -// API operation ModifyRule for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTargetGroupAssociationLimitException "TargetGroupAssociationLimit" -// You've reached the limit on the number of load balancers per target group. -// -// - ErrCodeIncompatibleProtocolsException "IncompatibleProtocols" -// The specified configuration is not valid with this protocol. -// -// - ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// - ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// - ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// - ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeUnsupportedProtocolException "UnsupportedProtocol" -// The specified protocol is not supported. -// -// - ErrCodeTooManyActionsException "TooManyActions" -// You've reached the limit on the number of actions per rule. -// -// - ErrCodeInvalidLoadBalancerActionException "InvalidLoadBalancerAction" -// The requested action is not valid. -// -// - ErrCodeTooManyUniqueTargetGroupsPerLoadBalancerException "TooManyUniqueTargetGroupsPerLoadBalancer" -// You've reached the limit on the number of unique target groups per load balancer -// across all listeners. If a target group is used by multiple actions for a -// load balancer, it is counted as only one use. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyRule -func (c *ELBV2) ModifyRule(input *ModifyRuleInput) (*ModifyRuleOutput, error) { - req, out := c.ModifyRuleRequest(input) - return out, req.Send() -} - -// ModifyRuleWithContext is the same as ModifyRule with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyRule 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 *ELBV2) ModifyRuleWithContext(ctx aws.Context, input *ModifyRuleInput, opts ...request.Option) (*ModifyRuleOutput, error) { - req, out := c.ModifyRuleRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyTargetGroup = "ModifyTargetGroup" - -// ModifyTargetGroupRequest generates a "aws/request.Request" representing the -// client's request for the ModifyTargetGroup 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 ModifyTargetGroup for more information on using the ModifyTargetGroup -// 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 ModifyTargetGroupRequest method. -// req, resp := client.ModifyTargetGroupRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroup -func (c *ELBV2) ModifyTargetGroupRequest(input *ModifyTargetGroupInput) (req *request.Request, output *ModifyTargetGroupOutput) { - op := &request.Operation{ - Name: opModifyTargetGroup, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyTargetGroupInput{} - } - - output = &ModifyTargetGroupOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyTargetGroup API operation for Elastic Load Balancing. -// -// Modifies the health checks used when evaluating the health state of the targets -// in the specified target group. -// -// 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 Elastic Load Balancing's -// API operation ModifyTargetGroup for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroup -func (c *ELBV2) ModifyTargetGroup(input *ModifyTargetGroupInput) (*ModifyTargetGroupOutput, error) { - req, out := c.ModifyTargetGroupRequest(input) - return out, req.Send() -} - -// ModifyTargetGroupWithContext is the same as ModifyTargetGroup with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyTargetGroup 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 *ELBV2) ModifyTargetGroupWithContext(ctx aws.Context, input *ModifyTargetGroupInput, opts ...request.Option) (*ModifyTargetGroupOutput, error) { - req, out := c.ModifyTargetGroupRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyTargetGroupAttributes = "ModifyTargetGroupAttributes" - -// ModifyTargetGroupAttributesRequest generates a "aws/request.Request" representing the -// client's request for the ModifyTargetGroupAttributes 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 ModifyTargetGroupAttributes for more information on using the ModifyTargetGroupAttributes -// 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 ModifyTargetGroupAttributesRequest method. -// req, resp := client.ModifyTargetGroupAttributesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroupAttributes -func (c *ELBV2) ModifyTargetGroupAttributesRequest(input *ModifyTargetGroupAttributesInput) (req *request.Request, output *ModifyTargetGroupAttributesOutput) { - op := &request.Operation{ - Name: opModifyTargetGroupAttributes, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyTargetGroupAttributesInput{} - } - - output = &ModifyTargetGroupAttributesOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyTargetGroupAttributes API operation for Elastic Load Balancing. -// -// Modifies the specified attributes of the specified target group. -// -// 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 Elastic Load Balancing's -// API operation ModifyTargetGroupAttributes for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTargetGroupAttributes -func (c *ELBV2) ModifyTargetGroupAttributes(input *ModifyTargetGroupAttributesInput) (*ModifyTargetGroupAttributesOutput, error) { - req, out := c.ModifyTargetGroupAttributesRequest(input) - return out, req.Send() -} - -// ModifyTargetGroupAttributesWithContext is the same as ModifyTargetGroupAttributes with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyTargetGroupAttributes 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 *ELBV2) ModifyTargetGroupAttributesWithContext(ctx aws.Context, input *ModifyTargetGroupAttributesInput, opts ...request.Option) (*ModifyTargetGroupAttributesOutput, error) { - req, out := c.ModifyTargetGroupAttributesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opModifyTrustStore = "ModifyTrustStore" - -// ModifyTrustStoreRequest generates a "aws/request.Request" representing the -// client's request for the ModifyTrustStore 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 ModifyTrustStore for more information on using the ModifyTrustStore -// 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 ModifyTrustStoreRequest method. -// req, resp := client.ModifyTrustStoreRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTrustStore -func (c *ELBV2) ModifyTrustStoreRequest(input *ModifyTrustStoreInput) (req *request.Request, output *ModifyTrustStoreOutput) { - op := &request.Operation{ - Name: opModifyTrustStore, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &ModifyTrustStoreInput{} - } - - output = &ModifyTrustStoreOutput{} - req = c.newRequest(op, input, output) - return -} - -// ModifyTrustStore API operation for Elastic Load Balancing. -// -// Update the ca certificate bundle for the specified trust store. -// -// 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 Elastic Load Balancing's -// API operation ModifyTrustStore for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// - ErrCodeInvalidCaCertificatesBundleException "InvalidCaCertificatesBundle" -// The specified ca certificate bundle is in an invalid format, or corrupt. -// -// - ErrCodeCaCertificatesBundleNotFoundException "CaCertificatesBundleNotFound" -// The specified ca certificate bundle does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/ModifyTrustStore -func (c *ELBV2) ModifyTrustStore(input *ModifyTrustStoreInput) (*ModifyTrustStoreOutput, error) { - req, out := c.ModifyTrustStoreRequest(input) - return out, req.Send() -} - -// ModifyTrustStoreWithContext is the same as ModifyTrustStore with the addition of -// the ability to pass a context and additional request options. -// -// See ModifyTrustStore 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 *ELBV2) ModifyTrustStoreWithContext(ctx aws.Context, input *ModifyTrustStoreInput, opts ...request.Option) (*ModifyTrustStoreOutput, error) { - req, out := c.ModifyTrustStoreRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRegisterTargets = "RegisterTargets" - -// RegisterTargetsRequest generates a "aws/request.Request" representing the -// client's request for the RegisterTargets 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 RegisterTargets for more information on using the RegisterTargets -// 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 RegisterTargetsRequest method. -// req, resp := client.RegisterTargetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RegisterTargets -func (c *ELBV2) RegisterTargetsRequest(input *RegisterTargetsInput) (req *request.Request, output *RegisterTargetsOutput) { - op := &request.Operation{ - Name: opRegisterTargets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RegisterTargetsInput{} - } - - output = &RegisterTargetsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RegisterTargets API operation for Elastic Load Balancing. -// -// Registers the specified targets with the specified target group. -// -// If the target is an EC2 instance, it must be in the running state when you -// register it. -// -// By default, the load balancer routes requests to registered targets using -// the protocol and port for the target group. Alternatively, you can override -// the port for a target when you register it. You can register each EC2 instance -// or IP address with the same target group multiple times using different ports. -// -// With a Network Load Balancer, you cannot register instances by instance ID -// if they have the following instance types: C1, CC1, CC2, CG1, CG2, CR1, CS1, -// G1, G2, HI1, HS1, M1, M2, M3, and T1. You can register instances of these -// types by IP address. -// -// 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 Elastic Load Balancing's -// API operation RegisterTargets for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeTooManyTargetsException "TooManyTargets" -// You've reached the limit on the number of targets. -// -// - ErrCodeInvalidTargetException "InvalidTarget" -// The specified target does not exist, is not in the same VPC as the target -// group, or has an unsupported instance type. -// -// - ErrCodeTooManyRegistrationsForTargetIdException "TooManyRegistrationsForTargetId" -// You've reached the limit on the number of times a target can be registered -// with a load balancer. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RegisterTargets -func (c *ELBV2) RegisterTargets(input *RegisterTargetsInput) (*RegisterTargetsOutput, error) { - req, out := c.RegisterTargetsRequest(input) - return out, req.Send() -} - -// RegisterTargetsWithContext is the same as RegisterTargets with the addition of -// the ability to pass a context and additional request options. -// -// See RegisterTargets 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 *ELBV2) RegisterTargetsWithContext(ctx aws.Context, input *RegisterTargetsInput, opts ...request.Option) (*RegisterTargetsOutput, error) { - req, out := c.RegisterTargetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveListenerCertificates = "RemoveListenerCertificates" - -// RemoveListenerCertificatesRequest generates a "aws/request.Request" representing the -// client's request for the RemoveListenerCertificates 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 RemoveListenerCertificates for more information on using the RemoveListenerCertificates -// 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 RemoveListenerCertificatesRequest method. -// req, resp := client.RemoveListenerCertificatesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates -func (c *ELBV2) RemoveListenerCertificatesRequest(input *RemoveListenerCertificatesInput) (req *request.Request, output *RemoveListenerCertificatesOutput) { - op := &request.Operation{ - Name: opRemoveListenerCertificates, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveListenerCertificatesInput{} - } - - output = &RemoveListenerCertificatesOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveListenerCertificates API operation for Elastic Load Balancing. -// -// Removes the specified certificate from the certificate list for the specified -// HTTPS or TLS listener. -// -// 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 Elastic Load Balancing's -// API operation RemoveListenerCertificates for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveListenerCertificates -func (c *ELBV2) RemoveListenerCertificates(input *RemoveListenerCertificatesInput) (*RemoveListenerCertificatesOutput, error) { - req, out := c.RemoveListenerCertificatesRequest(input) - return out, req.Send() -} - -// RemoveListenerCertificatesWithContext is the same as RemoveListenerCertificates with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveListenerCertificates 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 *ELBV2) RemoveListenerCertificatesWithContext(ctx aws.Context, input *RemoveListenerCertificatesInput, opts ...request.Option) (*RemoveListenerCertificatesOutput, error) { - req, out := c.RemoveListenerCertificatesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTags = "RemoveTags" - -// RemoveTagsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTags 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 RemoveTags for more information on using the RemoveTags -// 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 RemoveTagsRequest method. -// req, resp := client.RemoveTagsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTags -func (c *ELBV2) RemoveTagsRequest(input *RemoveTagsInput) (req *request.Request, output *RemoveTagsOutput) { - op := &request.Operation{ - Name: opRemoveTags, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTagsInput{} - } - - output = &RemoveTagsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTags API operation for Elastic Load Balancing. -// -// Removes the specified tags from the specified Elastic Load Balancing resources. -// You can remove the tags for one or more Application Load Balancers, Network -// Load Balancers, Gateway Load Balancers, target groups, listeners, or rules. -// -// 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 Elastic Load Balancing's -// API operation RemoveTags for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeTargetGroupNotFoundException "TargetGroupNotFound" -// The specified target group does not exist. -// -// - ErrCodeListenerNotFoundException "ListenerNotFound" -// The specified listener does not exist. -// -// - ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// - ErrCodeTooManyTagsException "TooManyTags" -// You've reached the limit on the number of tags for this resource. -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTags -func (c *ELBV2) RemoveTags(input *RemoveTagsInput) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - return out, req.Send() -} - -// RemoveTagsWithContext is the same as RemoveTags with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTags 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 *ELBV2) RemoveTagsWithContext(ctx aws.Context, input *RemoveTagsInput, opts ...request.Option) (*RemoveTagsOutput, error) { - req, out := c.RemoveTagsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opRemoveTrustStoreRevocations = "RemoveTrustStoreRevocations" - -// RemoveTrustStoreRevocationsRequest generates a "aws/request.Request" representing the -// client's request for the RemoveTrustStoreRevocations 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 RemoveTrustStoreRevocations for more information on using the RemoveTrustStoreRevocations -// 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 RemoveTrustStoreRevocationsRequest method. -// req, resp := client.RemoveTrustStoreRevocationsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTrustStoreRevocations -func (c *ELBV2) RemoveTrustStoreRevocationsRequest(input *RemoveTrustStoreRevocationsInput) (req *request.Request, output *RemoveTrustStoreRevocationsOutput) { - op := &request.Operation{ - Name: opRemoveTrustStoreRevocations, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &RemoveTrustStoreRevocationsInput{} - } - - output = &RemoveTrustStoreRevocationsOutput{} - req = c.newRequest(op, input, output) - req.Handlers.Unmarshal.Swap(query.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) - return -} - -// RemoveTrustStoreRevocations API operation for Elastic Load Balancing. -// -// Removes the specified revocation file from the specified trust store. -// -// 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 Elastic Load Balancing's -// API operation RemoveTrustStoreRevocations for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeTrustStoreNotFoundException "TrustStoreNotFound" -// The specified trust store does not exist. -// -// - ErrCodeRevocationIdNotFoundException "RevocationIdNotFound" -// The specified revocation ID does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/RemoveTrustStoreRevocations -func (c *ELBV2) RemoveTrustStoreRevocations(input *RemoveTrustStoreRevocationsInput) (*RemoveTrustStoreRevocationsOutput, error) { - req, out := c.RemoveTrustStoreRevocationsRequest(input) - return out, req.Send() -} - -// RemoveTrustStoreRevocationsWithContext is the same as RemoveTrustStoreRevocations with the addition of -// the ability to pass a context and additional request options. -// -// See RemoveTrustStoreRevocations 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 *ELBV2) RemoveTrustStoreRevocationsWithContext(ctx aws.Context, input *RemoveTrustStoreRevocationsInput, opts ...request.Option) (*RemoveTrustStoreRevocationsOutput, error) { - req, out := c.RemoveTrustStoreRevocationsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetIpAddressType = "SetIpAddressType" - -// SetIpAddressTypeRequest generates a "aws/request.Request" representing the -// client's request for the SetIpAddressType 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 SetIpAddressType for more information on using the SetIpAddressType -// 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 SetIpAddressTypeRequest method. -// req, resp := client.SetIpAddressTypeRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetIpAddressType -func (c *ELBV2) SetIpAddressTypeRequest(input *SetIpAddressTypeInput) (req *request.Request, output *SetIpAddressTypeOutput) { - op := &request.Operation{ - Name: opSetIpAddressType, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetIpAddressTypeInput{} - } - - output = &SetIpAddressTypeOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetIpAddressType API operation for Elastic Load Balancing. -// -// Sets the type of IP addresses used by the subnets of the specified load balancer. -// -// 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 Elastic Load Balancing's -// API operation SetIpAddressType for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// - ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified subnet is out of available addresses. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetIpAddressType -func (c *ELBV2) SetIpAddressType(input *SetIpAddressTypeInput) (*SetIpAddressTypeOutput, error) { - req, out := c.SetIpAddressTypeRequest(input) - return out, req.Send() -} - -// SetIpAddressTypeWithContext is the same as SetIpAddressType with the addition of -// the ability to pass a context and additional request options. -// -// See SetIpAddressType 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 *ELBV2) SetIpAddressTypeWithContext(ctx aws.Context, input *SetIpAddressTypeInput, opts ...request.Option) (*SetIpAddressTypeOutput, error) { - req, out := c.SetIpAddressTypeRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetRulePriorities = "SetRulePriorities" - -// SetRulePrioritiesRequest generates a "aws/request.Request" representing the -// client's request for the SetRulePriorities 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 SetRulePriorities for more information on using the SetRulePriorities -// 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 SetRulePrioritiesRequest method. -// req, resp := client.SetRulePrioritiesRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetRulePriorities -func (c *ELBV2) SetRulePrioritiesRequest(input *SetRulePrioritiesInput) (req *request.Request, output *SetRulePrioritiesOutput) { - op := &request.Operation{ - Name: opSetRulePriorities, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetRulePrioritiesInput{} - } - - output = &SetRulePrioritiesOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetRulePriorities API operation for Elastic Load Balancing. -// -// Sets the priorities of the specified rules. -// -// You can reorder the rules as long as there are no priority conflicts in the -// new order. Any existing rules that you do not specify retain their current -// priority. -// -// 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 Elastic Load Balancing's -// API operation SetRulePriorities for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeRuleNotFoundException "RuleNotFound" -// The specified rule does not exist. -// -// - ErrCodePriorityInUseException "PriorityInUse" -// The specified priority is in use. -// -// - ErrCodeOperationNotPermittedException "OperationNotPermitted" -// This operation is not allowed. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetRulePriorities -func (c *ELBV2) SetRulePriorities(input *SetRulePrioritiesInput) (*SetRulePrioritiesOutput, error) { - req, out := c.SetRulePrioritiesRequest(input) - return out, req.Send() -} - -// SetRulePrioritiesWithContext is the same as SetRulePriorities with the addition of -// the ability to pass a context and additional request options. -// -// See SetRulePriorities 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 *ELBV2) SetRulePrioritiesWithContext(ctx aws.Context, input *SetRulePrioritiesInput, opts ...request.Option) (*SetRulePrioritiesOutput, error) { - req, out := c.SetRulePrioritiesRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetSecurityGroups = "SetSecurityGroups" - -// SetSecurityGroupsRequest generates a "aws/request.Request" representing the -// client's request for the SetSecurityGroups 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 SetSecurityGroups for more information on using the SetSecurityGroups -// 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 SetSecurityGroupsRequest method. -// req, resp := client.SetSecurityGroupsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSecurityGroups -func (c *ELBV2) SetSecurityGroupsRequest(input *SetSecurityGroupsInput) (req *request.Request, output *SetSecurityGroupsOutput) { - op := &request.Operation{ - Name: opSetSecurityGroups, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetSecurityGroupsInput{} - } - - output = &SetSecurityGroupsOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetSecurityGroups API operation for Elastic Load Balancing. -// -// Associates the specified security groups with the specified Application Load -// Balancer or Network Load Balancer. The specified security groups override -// the previously associated security groups. -// -// You can't perform this operation on a Network Load Balancer unless you specified -// a security group for the load balancer when you created it. -// -// You can't associate a security group with a Gateway Load Balancer. -// -// 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 Elastic Load Balancing's -// API operation SetSecurityGroups for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// - ErrCodeInvalidSecurityGroupException "InvalidSecurityGroup" -// The specified security group does not exist. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSecurityGroups -func (c *ELBV2) SetSecurityGroups(input *SetSecurityGroupsInput) (*SetSecurityGroupsOutput, error) { - req, out := c.SetSecurityGroupsRequest(input) - return out, req.Send() -} - -// SetSecurityGroupsWithContext is the same as SetSecurityGroups with the addition of -// the ability to pass a context and additional request options. -// -// See SetSecurityGroups 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 *ELBV2) SetSecurityGroupsWithContext(ctx aws.Context, input *SetSecurityGroupsInput, opts ...request.Option) (*SetSecurityGroupsOutput, error) { - req, out := c.SetSecurityGroupsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -const opSetSubnets = "SetSubnets" - -// SetSubnetsRequest generates a "aws/request.Request" representing the -// client's request for the SetSubnets 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 SetSubnets for more information on using the SetSubnets -// 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 SetSubnetsRequest method. -// req, resp := client.SetSubnetsRequest(params) -// -// err := req.Send() -// if err == nil { // resp is now filled -// fmt.Println(resp) -// } -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSubnets -func (c *ELBV2) SetSubnetsRequest(input *SetSubnetsInput) (req *request.Request, output *SetSubnetsOutput) { - op := &request.Operation{ - Name: opSetSubnets, - HTTPMethod: "POST", - HTTPPath: "/", - } - - if input == nil { - input = &SetSubnetsInput{} - } - - output = &SetSubnetsOutput{} - req = c.newRequest(op, input, output) - return -} - -// SetSubnets API operation for Elastic Load Balancing. -// -// Enables the Availability Zones for the specified public subnets for the specified -// Application Load Balancer, Network Load Balancer or Gateway Load Balancer. -// The specified subnets replace the previously enabled subnets. -// -// When you specify subnets for a Network Load Balancer, or Gateway Load Balancer -// you must include all subnets that were enabled previously, with their existing -// configurations, plus any additional subnets. -// -// 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 Elastic Load Balancing's -// API operation SetSubnets for usage and error information. -// -// Returned Error Codes: -// -// - ErrCodeLoadBalancerNotFoundException "LoadBalancerNotFound" -// The specified load balancer does not exist. -// -// - ErrCodeInvalidConfigurationRequestException "InvalidConfigurationRequest" -// The requested configuration is not valid. -// -// - ErrCodeSubnetNotFoundException "SubnetNotFound" -// The specified subnet does not exist. -// -// - ErrCodeInvalidSubnetException "InvalidSubnet" -// The specified subnet is out of available addresses. -// -// - ErrCodeAllocationIdNotFoundException "AllocationIdNotFound" -// The specified allocation ID does not exist. -// -// - ErrCodeAvailabilityZoneNotSupportedException "AvailabilityZoneNotSupported" -// The specified Availability Zone is not supported. -// -// See also, https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01/SetSubnets -func (c *ELBV2) SetSubnets(input *SetSubnetsInput) (*SetSubnetsOutput, error) { - req, out := c.SetSubnetsRequest(input) - return out, req.Send() -} - -// SetSubnetsWithContext is the same as SetSubnets with the addition of -// the ability to pass a context and additional request options. -// -// See SetSubnets 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 *ELBV2) SetSubnetsWithContext(ctx aws.Context, input *SetSubnetsInput, opts ...request.Option) (*SetSubnetsOutput, error) { - req, out := c.SetSubnetsRequest(input) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return out, req.Send() -} - -// Information about an action. -// -// Each rule must include exactly one of the following types of actions: forward, -// fixed-response, or redirect, and it must be the last action to be performed. -type Action struct { - _ struct{} `type:"structure"` - - // [HTTPS listeners] Information for using Amazon Cognito to authenticate users. - // Specify only when Type is authenticate-cognito. - AuthenticateCognitoConfig *AuthenticateCognitoActionConfig `type:"structure"` - - // [HTTPS listeners] Information about an identity provider that is compliant - // with OpenID Connect (OIDC). Specify only when Type is authenticate-oidc. - AuthenticateOidcConfig *AuthenticateOidcActionConfig `type:"structure"` - - // [Application Load Balancer] Information for creating an action that returns - // a custom HTTP response. Specify only when Type is fixed-response. - FixedResponseConfig *FixedResponseActionConfig `type:"structure"` - - // Information for creating an action that distributes requests among one or - // more target groups. For Network Load Balancers, you can specify a single - // target group. Specify only when Type is forward. If you specify both ForwardConfig - // and TargetGroupArn, you can specify only one target group using ForwardConfig - // and it must be the same target group specified in TargetGroupArn. - ForwardConfig *ForwardActionConfig `type:"structure"` - - // The order for the action. This value is required for rules with multiple - // actions. The action with the lowest value for order is performed first. - Order *int64 `min:"1" type:"integer"` - - // [Application Load Balancer] Information for creating a redirect action. Specify - // only when Type is redirect. - RedirectConfig *RedirectActionConfig `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. Specify only when Type - // is forward and you want to route to a single target group. To route to one - // or more target groups, use ForwardConfig instead. - TargetGroupArn *string `type:"string"` - - // The type of action. - // - // Type is a required field - Type *string `type:"string" required:"true" enum:"ActionTypeEnum"` -} - -// 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 Action) 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 Action) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *Action) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "Action"} - if s.Order != nil && *s.Order < 1 { - invalidParams.Add(request.NewErrParamMinValue("Order", 1)) - } - if s.Type == nil { - invalidParams.Add(request.NewErrParamRequired("Type")) - } - if s.AuthenticateCognitoConfig != nil { - if err := s.AuthenticateCognitoConfig.Validate(); err != nil { - invalidParams.AddNested("AuthenticateCognitoConfig", err.(request.ErrInvalidParams)) - } - } - if s.AuthenticateOidcConfig != nil { - if err := s.AuthenticateOidcConfig.Validate(); err != nil { - invalidParams.AddNested("AuthenticateOidcConfig", err.(request.ErrInvalidParams)) - } - } - if s.FixedResponseConfig != nil { - if err := s.FixedResponseConfig.Validate(); err != nil { - invalidParams.AddNested("FixedResponseConfig", err.(request.ErrInvalidParams)) - } - } - if s.RedirectConfig != nil { - if err := s.RedirectConfig.Validate(); err != nil { - invalidParams.AddNested("RedirectConfig", err.(request.ErrInvalidParams)) - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticateCognitoConfig sets the AuthenticateCognitoConfig field's value. -func (s *Action) SetAuthenticateCognitoConfig(v *AuthenticateCognitoActionConfig) *Action { - s.AuthenticateCognitoConfig = v - return s -} - -// SetAuthenticateOidcConfig sets the AuthenticateOidcConfig field's value. -func (s *Action) SetAuthenticateOidcConfig(v *AuthenticateOidcActionConfig) *Action { - s.AuthenticateOidcConfig = v - return s -} - -// SetFixedResponseConfig sets the FixedResponseConfig field's value. -func (s *Action) SetFixedResponseConfig(v *FixedResponseActionConfig) *Action { - s.FixedResponseConfig = v - return s -} - -// SetForwardConfig sets the ForwardConfig field's value. -func (s *Action) SetForwardConfig(v *ForwardActionConfig) *Action { - s.ForwardConfig = v - return s -} - -// SetOrder sets the Order field's value. -func (s *Action) SetOrder(v int64) *Action { - s.Order = &v - return s -} - -// SetRedirectConfig sets the RedirectConfig field's value. -func (s *Action) SetRedirectConfig(v *RedirectActionConfig) *Action { - s.RedirectConfig = v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *Action) SetTargetGroupArn(v string) *Action { - s.TargetGroupArn = &v - return s -} - -// SetType sets the Type field's value. -func (s *Action) SetType(v string) *Action { - s.Type = &v - return s -} - -type AddListenerCertificatesInput struct { - _ struct{} `type:"structure"` - - // The certificate to add. You can specify one certificate per call. Set CertificateArn - // to the certificate ARN but do not set IsDefault. - // - // Certificates is a required field - Certificates []*Certificate `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *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 AddListenerCertificatesInput) 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 AddListenerCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddListenerCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddListenerCertificatesInput"} - if s.Certificates == nil { - invalidParams.Add(request.NewErrParamRequired("Certificates")) - } - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificates sets the Certificates field's value. -func (s *AddListenerCertificatesInput) SetCertificates(v []*Certificate) *AddListenerCertificatesInput { - s.Certificates = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *AddListenerCertificatesInput) SetListenerArn(v string) *AddListenerCertificatesInput { - s.ListenerArn = &v - return s -} - -type AddListenerCertificatesOutput struct { - _ struct{} `type:"structure"` - - // Information about the certificates in the certificate list. - Certificates []*Certificate `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 AddListenerCertificatesOutput) 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 AddListenerCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *AddListenerCertificatesOutput) SetCertificates(v []*Certificate) *AddListenerCertificatesOutput { - s.Certificates = v - return s -} - -type AddTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - // - // ResourceArns is a required field - ResourceArns []*string `type:"list" required:"true"` - - // The tags. - // - // Tags is a required field - Tags []*Tag `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 AddTagsInput) 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 AddTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTagsInput"} - if s.ResourceArns == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArns")) - } - if s.Tags == nil { - invalidParams.Add(request.NewErrParamRequired("Tags")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 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 -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *AddTagsInput) SetResourceArns(v []*string) *AddTagsInput { - s.ResourceArns = v - return s -} - -// SetTags sets the Tags field's value. -func (s *AddTagsInput) SetTags(v []*Tag) *AddTagsInput { - s.Tags = v - return s -} - -type AddTagsOutput 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 AddTagsOutput) 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 AddTagsOutput) GoString() string { - return s.String() -} - -type AddTrustStoreRevocationsInput struct { - _ struct{} `type:"structure"` - - // The revocation file to add. - RevocationContents []*RevocationContent `type:"list"` - - // The Amazon Resource Name (ARN) of the trust store. - // - // TrustStoreArn is a required field - TrustStoreArn *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 AddTrustStoreRevocationsInput) 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 AddTrustStoreRevocationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AddTrustStoreRevocationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AddTrustStoreRevocationsInput"} - if s.TrustStoreArn == nil { - invalidParams.Add(request.NewErrParamRequired("TrustStoreArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRevocationContents sets the RevocationContents field's value. -func (s *AddTrustStoreRevocationsInput) SetRevocationContents(v []*RevocationContent) *AddTrustStoreRevocationsInput { - s.RevocationContents = v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *AddTrustStoreRevocationsInput) SetTrustStoreArn(v string) *AddTrustStoreRevocationsInput { - s.TrustStoreArn = &v - return s -} - -type AddTrustStoreRevocationsOutput struct { - _ struct{} `type:"structure"` - - // Information about the revocation file added to the trust store. - TrustStoreRevocations []*TrustStoreRevocation `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 AddTrustStoreRevocationsOutput) 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 AddTrustStoreRevocationsOutput) GoString() string { - return s.String() -} - -// SetTrustStoreRevocations sets the TrustStoreRevocations field's value. -func (s *AddTrustStoreRevocationsOutput) SetTrustStoreRevocations(v []*TrustStoreRevocation) *AddTrustStoreRevocationsOutput { - s.TrustStoreRevocations = v - return s -} - -// Information about anomaly detection and mitigation. -type AnomalyDetection struct { - _ struct{} `type:"structure"` - - // Indicates whether anomaly mitigation is in progress. - MitigationInEffect *string `type:"string" enum:"MitigationInEffectEnum"` - - // The latest anomaly detection result. - Result *string `type:"string" enum:"AnomalyResultEnum"` -} - -// 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 AnomalyDetection) 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 AnomalyDetection) GoString() string { - return s.String() -} - -// SetMitigationInEffect sets the MitigationInEffect field's value. -func (s *AnomalyDetection) SetMitigationInEffect(v string) *AnomalyDetection { - s.MitigationInEffect = &v - return s -} - -// SetResult sets the Result field's value. -func (s *AnomalyDetection) SetResult(v string) *AnomalyDetection { - s.Result = &v - return s -} - -// Request parameters to use when integrating with Amazon Cognito to authenticate -// users. -type AuthenticateCognitoActionConfig struct { - _ struct{} `type:"structure"` - - // The query parameters (up to 10) to include in the redirect request to the - // authorization endpoint. - AuthenticationRequestExtraParams map[string]*string `type:"map"` - - // The behavior if the user is not authenticated. The following are possible - // values: - // - // * deny - Return an HTTP 401 Unauthorized error. - // - // * allow - Allow the request to be forwarded to the target. - // - // * authenticate - Redirect the request to the IdP authorization endpoint. - // This is the default value. - OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateCognitoActionConditionalBehaviorEnum"` - - // The set of user claims to be requested from the IdP. The default is openid. - // - // To verify which scope values your IdP supports and how to separate multiple - // values, see the documentation for your IdP. - Scope *string `type:"string"` - - // The name of the cookie used to maintain session information. The default - // is AWSELBAuthSessionCookie. - SessionCookieName *string `type:"string"` - - // The maximum duration of the authentication session, in seconds. The default - // is 604800 seconds (7 days). - SessionTimeout *int64 `type:"long"` - - // The Amazon Resource Name (ARN) of the Amazon Cognito user pool. - // - // UserPoolArn is a required field - UserPoolArn *string `type:"string" required:"true"` - - // The ID of the Amazon Cognito user pool client. - // - // UserPoolClientId is a required field - UserPoolClientId *string `type:"string" required:"true"` - - // The domain prefix or fully-qualified domain name of the Amazon Cognito user - // pool. - // - // UserPoolDomain is a required field - UserPoolDomain *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 AuthenticateCognitoActionConfig) 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 AuthenticateCognitoActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthenticateCognitoActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthenticateCognitoActionConfig"} - if s.UserPoolArn == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolArn")) - } - if s.UserPoolClientId == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolClientId")) - } - if s.UserPoolDomain == nil { - invalidParams.Add(request.NewErrParamRequired("UserPoolDomain")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value. -func (s *AuthenticateCognitoActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateCognitoActionConfig { - s.AuthenticationRequestExtraParams = v - return s -} - -// SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value. -func (s *AuthenticateCognitoActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateCognitoActionConfig { - s.OnUnauthenticatedRequest = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *AuthenticateCognitoActionConfig) SetScope(v string) *AuthenticateCognitoActionConfig { - s.Scope = &v - return s -} - -// SetSessionCookieName sets the SessionCookieName field's value. -func (s *AuthenticateCognitoActionConfig) SetSessionCookieName(v string) *AuthenticateCognitoActionConfig { - s.SessionCookieName = &v - return s -} - -// SetSessionTimeout sets the SessionTimeout field's value. -func (s *AuthenticateCognitoActionConfig) SetSessionTimeout(v int64) *AuthenticateCognitoActionConfig { - s.SessionTimeout = &v - return s -} - -// SetUserPoolArn sets the UserPoolArn field's value. -func (s *AuthenticateCognitoActionConfig) SetUserPoolArn(v string) *AuthenticateCognitoActionConfig { - s.UserPoolArn = &v - return s -} - -// SetUserPoolClientId sets the UserPoolClientId field's value. -func (s *AuthenticateCognitoActionConfig) SetUserPoolClientId(v string) *AuthenticateCognitoActionConfig { - s.UserPoolClientId = &v - return s -} - -// SetUserPoolDomain sets the UserPoolDomain field's value. -func (s *AuthenticateCognitoActionConfig) SetUserPoolDomain(v string) *AuthenticateCognitoActionConfig { - s.UserPoolDomain = &v - return s -} - -// Request parameters when using an identity provider (IdP) that is compliant -// with OpenID Connect (OIDC) to authenticate users. -type AuthenticateOidcActionConfig struct { - _ struct{} `type:"structure"` - - // The query parameters (up to 10) to include in the redirect request to the - // authorization endpoint. - AuthenticationRequestExtraParams map[string]*string `type:"map"` - - // The authorization endpoint of the IdP. This must be a full URL, including - // the HTTPS protocol, the domain, and the path. - // - // AuthorizationEndpoint is a required field - AuthorizationEndpoint *string `type:"string" required:"true"` - - // The OAuth 2.0 client identifier. - // - // ClientId is a required field - ClientId *string `type:"string" required:"true"` - - // The OAuth 2.0 client secret. This parameter is required if you are creating - // a rule. If you are modifying a rule, you can omit this parameter if you set - // UseExistingClientSecret to true. - ClientSecret *string `type:"string"` - - // The OIDC issuer identifier of the IdP. This must be a full URL, including - // the HTTPS protocol, the domain, and the path. - // - // Issuer is a required field - Issuer *string `type:"string" required:"true"` - - // The behavior if the user is not authenticated. The following are possible - // values: - // - // * deny - Return an HTTP 401 Unauthorized error. - // - // * allow - Allow the request to be forwarded to the target. - // - // * authenticate - Redirect the request to the IdP authorization endpoint. - // This is the default value. - OnUnauthenticatedRequest *string `type:"string" enum:"AuthenticateOidcActionConditionalBehaviorEnum"` - - // The set of user claims to be requested from the IdP. The default is openid. - // - // To verify which scope values your IdP supports and how to separate multiple - // values, see the documentation for your IdP. - Scope *string `type:"string"` - - // The name of the cookie used to maintain session information. The default - // is AWSELBAuthSessionCookie. - SessionCookieName *string `type:"string"` - - // The maximum duration of the authentication session, in seconds. The default - // is 604800 seconds (7 days). - SessionTimeout *int64 `type:"long"` - - // The token endpoint of the IdP. This must be a full URL, including the HTTPS - // protocol, the domain, and the path. - // - // TokenEndpoint is a required field - TokenEndpoint *string `type:"string" required:"true"` - - // Indicates whether to use the existing client secret when modifying a rule. - // If you are creating a rule, you can omit this parameter or set it to false. - UseExistingClientSecret *bool `type:"boolean"` - - // The user info endpoint of the IdP. This must be a full URL, including the - // HTTPS protocol, the domain, and the path. - // - // UserInfoEndpoint is a required field - UserInfoEndpoint *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 AuthenticateOidcActionConfig) 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 AuthenticateOidcActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *AuthenticateOidcActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "AuthenticateOidcActionConfig"} - if s.AuthorizationEndpoint == nil { - invalidParams.Add(request.NewErrParamRequired("AuthorizationEndpoint")) - } - if s.ClientId == nil { - invalidParams.Add(request.NewErrParamRequired("ClientId")) - } - if s.Issuer == nil { - invalidParams.Add(request.NewErrParamRequired("Issuer")) - } - if s.TokenEndpoint == nil { - invalidParams.Add(request.NewErrParamRequired("TokenEndpoint")) - } - if s.UserInfoEndpoint == nil { - invalidParams.Add(request.NewErrParamRequired("UserInfoEndpoint")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAuthenticationRequestExtraParams sets the AuthenticationRequestExtraParams field's value. -func (s *AuthenticateOidcActionConfig) SetAuthenticationRequestExtraParams(v map[string]*string) *AuthenticateOidcActionConfig { - s.AuthenticationRequestExtraParams = v - return s -} - -// SetAuthorizationEndpoint sets the AuthorizationEndpoint field's value. -func (s *AuthenticateOidcActionConfig) SetAuthorizationEndpoint(v string) *AuthenticateOidcActionConfig { - s.AuthorizationEndpoint = &v - return s -} - -// SetClientId sets the ClientId field's value. -func (s *AuthenticateOidcActionConfig) SetClientId(v string) *AuthenticateOidcActionConfig { - s.ClientId = &v - return s -} - -// SetClientSecret sets the ClientSecret field's value. -func (s *AuthenticateOidcActionConfig) SetClientSecret(v string) *AuthenticateOidcActionConfig { - s.ClientSecret = &v - return s -} - -// SetIssuer sets the Issuer field's value. -func (s *AuthenticateOidcActionConfig) SetIssuer(v string) *AuthenticateOidcActionConfig { - s.Issuer = &v - return s -} - -// SetOnUnauthenticatedRequest sets the OnUnauthenticatedRequest field's value. -func (s *AuthenticateOidcActionConfig) SetOnUnauthenticatedRequest(v string) *AuthenticateOidcActionConfig { - s.OnUnauthenticatedRequest = &v - return s -} - -// SetScope sets the Scope field's value. -func (s *AuthenticateOidcActionConfig) SetScope(v string) *AuthenticateOidcActionConfig { - s.Scope = &v - return s -} - -// SetSessionCookieName sets the SessionCookieName field's value. -func (s *AuthenticateOidcActionConfig) SetSessionCookieName(v string) *AuthenticateOidcActionConfig { - s.SessionCookieName = &v - return s -} - -// SetSessionTimeout sets the SessionTimeout field's value. -func (s *AuthenticateOidcActionConfig) SetSessionTimeout(v int64) *AuthenticateOidcActionConfig { - s.SessionTimeout = &v - return s -} - -// SetTokenEndpoint sets the TokenEndpoint field's value. -func (s *AuthenticateOidcActionConfig) SetTokenEndpoint(v string) *AuthenticateOidcActionConfig { - s.TokenEndpoint = &v - return s -} - -// SetUseExistingClientSecret sets the UseExistingClientSecret field's value. -func (s *AuthenticateOidcActionConfig) SetUseExistingClientSecret(v bool) *AuthenticateOidcActionConfig { - s.UseExistingClientSecret = &v - return s -} - -// SetUserInfoEndpoint sets the UserInfoEndpoint field's value. -func (s *AuthenticateOidcActionConfig) SetUserInfoEndpoint(v string) *AuthenticateOidcActionConfig { - s.UserInfoEndpoint = &v - return s -} - -// Information about an Availability Zone. -type AvailabilityZone struct { - _ struct{} `type:"structure"` - - // [Network Load Balancers] If you need static IP addresses for your load balancer, - // you can specify one Elastic IP address per Availability Zone when you create - // an internal-facing load balancer. For internal load balancers, you can specify - // a private IP address from the IPv4 range of the subnet. - LoadBalancerAddresses []*LoadBalancerAddress `type:"list"` - - // [Application Load Balancers on Outposts] The ID of the Outpost. - OutpostId *string `type:"string"` - - // The ID of the subnet. You can specify one subnet per Availability Zone. - SubnetId *string `type:"string"` - - // The name of the Availability Zone. - ZoneName *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 AvailabilityZone) 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 AvailabilityZone) GoString() string { - return s.String() -} - -// SetLoadBalancerAddresses sets the LoadBalancerAddresses field's value. -func (s *AvailabilityZone) SetLoadBalancerAddresses(v []*LoadBalancerAddress) *AvailabilityZone { - s.LoadBalancerAddresses = v - return s -} - -// SetOutpostId sets the OutpostId field's value. -func (s *AvailabilityZone) SetOutpostId(v string) *AvailabilityZone { - s.OutpostId = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *AvailabilityZone) SetSubnetId(v string) *AvailabilityZone { - s.SubnetId = &v - return s -} - -// SetZoneName sets the ZoneName field's value. -func (s *AvailabilityZone) SetZoneName(v string) *AvailabilityZone { - s.ZoneName = &v - return s -} - -// Information about an SSL server certificate. -type Certificate struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the certificate. - CertificateArn *string `type:"string"` - - // Indicates whether the certificate is the default certificate. Do not set - // this value when specifying a certificate as an input. This value is not included - // in the output when describing a listener, but is included when describing - // listener certificates. - IsDefault *bool `type:"boolean"` -} - -// 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 Certificate) 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 Certificate) GoString() string { - return s.String() -} - -// SetCertificateArn sets the CertificateArn field's value. -func (s *Certificate) SetCertificateArn(v string) *Certificate { - s.CertificateArn = &v - return s -} - -// SetIsDefault sets the IsDefault field's value. -func (s *Certificate) SetIsDefault(v bool) *Certificate { - s.IsDefault = &v - return s -} - -// Information about a cipher used in a policy. -type Cipher struct { - _ struct{} `type:"structure"` - - // The name of the cipher. - Name *string `type:"string"` - - // The priority of the cipher. - Priority *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 Cipher) 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 Cipher) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *Cipher) SetName(v string) *Cipher { - s.Name = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *Cipher) SetPriority(v int64) *Cipher { - s.Priority = &v - return s -} - -type CreateListenerInput struct { - _ struct{} `type:"structure"` - - // [TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) - // policy. You can specify one policy name. The following are the possible values: - // - // * HTTP1Only - // - // * HTTP2Only - // - // * HTTP2Optional - // - // * HTTP2Preferred - // - // * None - // - // For more information, see ALPN policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#alpn-policies) - // in the Network Load Balancers Guide. - AlpnPolicy []*string `type:"list"` - - // [HTTPS and TLS listeners] The default certificate for the listener. You must - // provide exactly one certificate. Set CertificateArn to the certificate ARN - // but do not set IsDefault. - Certificates []*Certificate `type:"list"` - - // The actions for the default rule. - // - // DefaultActions is a required field - DefaultActions []*Action `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` - - // The mutual authentication configuration information. - MutualAuthentication *MutualAuthenticationAttributes `type:"structure"` - - // The port on which the load balancer is listening. You cannot specify a port - // for a Gateway Load Balancer. - Port *int64 `min:"1" type:"integer"` - - // The protocol for connections from clients to the load balancer. For Application - // Load Balancers, the supported protocols are HTTP and HTTPS. For Network Load - // Balancers, the supported protocols are TCP, TLS, UDP, and TCP_UDP. You can’t - // specify the UDP or TCP_UDP protocol if dual-stack mode is enabled. You cannot - // specify a protocol for a Gateway Load Balancer. - Protocol *string `type:"string" enum:"ProtocolEnum"` - - // [HTTPS and TLS listeners] The security policy that defines which protocols - // and ciphers are supported. - // - // For more information, see Security policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) - // in the Application Load Balancers Guide and Security policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies) - // in the Network Load Balancers Guide. - SslPolicy *string `type:"string"` - - // The tags to assign to the listener. - Tags []*Tag `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 CreateListenerInput) 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 CreateListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateListenerInput"} - if s.DefaultActions == nil { - invalidParams.Add(request.NewErrParamRequired("DefaultActions")) - } - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.DefaultActions != nil { - for i, v := range s.DefaultActions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultActions", i), 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 -} - -// SetAlpnPolicy sets the AlpnPolicy field's value. -func (s *CreateListenerInput) SetAlpnPolicy(v []*string) *CreateListenerInput { - s.AlpnPolicy = v - return s -} - -// SetCertificates sets the Certificates field's value. -func (s *CreateListenerInput) SetCertificates(v []*Certificate) *CreateListenerInput { - s.Certificates = v - return s -} - -// SetDefaultActions sets the DefaultActions field's value. -func (s *CreateListenerInput) SetDefaultActions(v []*Action) *CreateListenerInput { - s.DefaultActions = v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *CreateListenerInput) SetLoadBalancerArn(v string) *CreateListenerInput { - s.LoadBalancerArn = &v - return s -} - -// SetMutualAuthentication sets the MutualAuthentication field's value. -func (s *CreateListenerInput) SetMutualAuthentication(v *MutualAuthenticationAttributes) *CreateListenerInput { - s.MutualAuthentication = v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateListenerInput) SetPort(v int64) *CreateListenerInput { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *CreateListenerInput) SetProtocol(v string) *CreateListenerInput { - s.Protocol = &v - return s -} - -// SetSslPolicy sets the SslPolicy field's value. -func (s *CreateListenerInput) SetSslPolicy(v string) *CreateListenerInput { - s.SslPolicy = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateListenerInput) SetTags(v []*Tag) *CreateListenerInput { - s.Tags = v - return s -} - -type CreateListenerOutput struct { - _ struct{} `type:"structure"` - - // Information about the listener. - Listeners []*Listener `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 CreateListenerOutput) 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 CreateListenerOutput) GoString() string { - return s.String() -} - -// SetListeners sets the Listeners field's value. -func (s *CreateListenerOutput) SetListeners(v []*Listener) *CreateListenerOutput { - s.Listeners = v - return s -} - -type CreateLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // [Application Load Balancers on Outposts] The ID of the customer-owned address - // pool (CoIP pool). - CustomerOwnedIpv4Pool *string `type:"string"` - - // Note: Internal load balancers must use the ipv4 IP address type. - // - // [Application Load Balancers] The IP address type. The possible values are - // ipv4 (for only IPv4 addresses), dualstack (for IPv4 and IPv6 addresses), - // and dualstack-without-public-ipv4 (for IPv6 only public addresses, with private - // IPv4 and IPv6 addresses). - // - // [Network Load Balancers] The IP address type. The possible values are ipv4 - // (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). You - // can’t specify dualstack for a load balancer with a UDP or TCP_UDP listener. - // - // [Gateway Load Balancers] The IP address type. The possible values are ipv4 - // (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). - IpAddressType *string `type:"string" enum:"IpAddressType"` - - // The name of the load balancer. - // - // This name must be unique per region per account, can have a maximum of 32 - // characters, must contain only alphanumeric characters or hyphens, must not - // begin or end with a hyphen, and must not begin with "internal-". - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The nodes of an Internet-facing load balancer have public IP addresses. The - // DNS name of an Internet-facing load balancer is publicly resolvable to the - // public IP addresses of the nodes. Therefore, Internet-facing load balancers - // can route requests from clients over the internet. - // - // The nodes of an internal load balancer have only private IP addresses. The - // DNS name of an internal load balancer is publicly resolvable to the private - // IP addresses of the nodes. Therefore, internal load balancers can route requests - // only from clients with access to the VPC for the load balancer. - // - // The default is an Internet-facing load balancer. - // - // You cannot specify a scheme for a Gateway Load Balancer. - Scheme *string `type:"string" enum:"LoadBalancerSchemeEnum"` - - // [Application Load Balancers and Network Load Balancers] The IDs of the security - // groups for the load balancer. - SecurityGroups []*string `type:"list"` - - // The IDs of the subnets. You can specify only one subnet per Availability - // Zone. You must specify either subnets or subnet mappings, but not both. - // - // [Application Load Balancers] You must specify subnets from at least two Availability - // Zones. You cannot specify Elastic IP addresses for your subnets. - // - // [Application Load Balancers on Outposts] You must specify one Outpost subnet. - // - // [Application Load Balancers on Local Zones] You can specify subnets from - // one or more Local Zones. - // - // [Network Load Balancers] You can specify subnets from one or more Availability - // Zones. You can specify one Elastic IP address per subnet if you need static - // IP addresses for your internet-facing load balancer. For internal load balancers, - // you can specify one private IP address per subnet from the IPv4 range of - // the subnet. For internet-facing load balancer, you can specify one IPv6 address - // per subnet. - // - // [Gateway Load Balancers] You can specify subnets from one or more Availability - // Zones. You cannot specify Elastic IP addresses for your subnets. - SubnetMappings []*SubnetMapping `type:"list"` - - // The IDs of the subnets. You can specify only one subnet per Availability - // Zone. You must specify either subnets or subnet mappings, but not both. To - // specify an Elastic IP address, specify subnet mappings instead of subnets. - // - // [Application Load Balancers] You must specify subnets from at least two Availability - // Zones. - // - // [Application Load Balancers on Outposts] You must specify one Outpost subnet. - // - // [Application Load Balancers on Local Zones] You can specify subnets from - // one or more Local Zones. - // - // [Network Load Balancers] You can specify subnets from one or more Availability - // Zones. - // - // [Gateway Load Balancers] You can specify subnets from one or more Availability - // Zones. - Subnets []*string `type:"list"` - - // The tags to assign to the load balancer. - Tags []*Tag `min:"1" type:"list"` - - // The type of load balancer. The default is application. - Type *string `type:"string" enum:"LoadBalancerTypeEnum"` -} - -// 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 CreateLoadBalancerInput) 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 CreateLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateLoadBalancerInput"} - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 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 -} - -// SetCustomerOwnedIpv4Pool sets the CustomerOwnedIpv4Pool field's value. -func (s *CreateLoadBalancerInput) SetCustomerOwnedIpv4Pool(v string) *CreateLoadBalancerInput { - s.CustomerOwnedIpv4Pool = &v - return s -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *CreateLoadBalancerInput) SetIpAddressType(v string) *CreateLoadBalancerInput { - s.IpAddressType = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateLoadBalancerInput) SetName(v string) *CreateLoadBalancerInput { - s.Name = &v - return s -} - -// SetScheme sets the Scheme field's value. -func (s *CreateLoadBalancerInput) SetScheme(v string) *CreateLoadBalancerInput { - s.Scheme = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *CreateLoadBalancerInput) SetSecurityGroups(v []*string) *CreateLoadBalancerInput { - s.SecurityGroups = v - return s -} - -// SetSubnetMappings sets the SubnetMappings field's value. -func (s *CreateLoadBalancerInput) SetSubnetMappings(v []*SubnetMapping) *CreateLoadBalancerInput { - s.SubnetMappings = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *CreateLoadBalancerInput) SetSubnets(v []*string) *CreateLoadBalancerInput { - s.Subnets = v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateLoadBalancerInput) SetTags(v []*Tag) *CreateLoadBalancerInput { - s.Tags = v - return s -} - -// SetType sets the Type field's value. -func (s *CreateLoadBalancerInput) SetType(v string) *CreateLoadBalancerInput { - s.Type = &v - return s -} - -type CreateLoadBalancerOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer. - LoadBalancers []*LoadBalancer `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 CreateLoadBalancerOutput) 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 CreateLoadBalancerOutput) GoString() string { - return s.String() -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *CreateLoadBalancerOutput) SetLoadBalancers(v []*LoadBalancer) *CreateLoadBalancerOutput { - s.LoadBalancers = v - return s -} - -type CreateRuleInput struct { - _ struct{} `type:"structure"` - - // The actions. - // - // Actions is a required field - Actions []*Action `type:"list" required:"true"` - - // The conditions. - // - // Conditions is a required field - Conditions []*RuleCondition `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` - - // The rule priority. A listener can't have multiple rules with the same priority. - // - // Priority is a required field - Priority *int64 `min:"1" type:"integer" required:"true"` - - // The tags to assign to the rule. - Tags []*Tag `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 CreateRuleInput) 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 CreateRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateRuleInput"} - if s.Actions == nil { - invalidParams.Add(request.NewErrParamRequired("Actions")) - } - if s.Conditions == nil { - invalidParams.Add(request.NewErrParamRequired("Conditions")) - } - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - if s.Priority == nil { - invalidParams.Add(request.NewErrParamRequired("Priority")) - } - if s.Priority != nil && *s.Priority < 1 { - invalidParams.Add(request.NewErrParamMinValue("Priority", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.Actions != nil { - for i, v := range s.Actions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), 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 -} - -// SetActions sets the Actions field's value. -func (s *CreateRuleInput) SetActions(v []*Action) *CreateRuleInput { - s.Actions = v - return s -} - -// SetConditions sets the Conditions field's value. -func (s *CreateRuleInput) SetConditions(v []*RuleCondition) *CreateRuleInput { - s.Conditions = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *CreateRuleInput) SetListenerArn(v string) *CreateRuleInput { - s.ListenerArn = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *CreateRuleInput) SetPriority(v int64) *CreateRuleInput { - s.Priority = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateRuleInput) SetTags(v []*Tag) *CreateRuleInput { - s.Tags = v - return s -} - -type CreateRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the rule. - Rules []*Rule `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 CreateRuleOutput) 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 CreateRuleOutput) GoString() string { - return s.String() -} - -// SetRules sets the Rules field's value. -func (s *CreateRuleOutput) SetRules(v []*Rule) *CreateRuleOutput { - s.Rules = v - return s -} - -type CreateTargetGroupInput struct { - _ struct{} `type:"structure"` - - // Indicates whether health checks are enabled. If the target type is lambda, - // health checks are disabled by default but can be enabled. If the target type - // is instance, ip, or alb, health checks are always enabled and cannot be disabled. - HealthCheckEnabled *bool `type:"boolean"` - - // The approximate amount of time, in seconds, between health checks of an individual - // target. The range is 5-300. If the target group protocol is TCP, TLS, UDP, - // TCP_UDP, HTTP or HTTPS, the default is 30 seconds. If the target group protocol - // is GENEVE, the default is 10 seconds. If the target type is lambda, the default - // is 35 seconds. - HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` - - // [HTTP/HTTPS health checks] The destination for health checks on the targets. - // - // [HTTP1 or HTTP2 protocol version] The ping path. The default is /. - // - // [GRPC protocol version] The path of a custom health check method with the - // format /package.service/method. The default is /Amazon Web Services.ALB/healthcheck. - HealthCheckPath *string `min:"1" type:"string"` - - // The port the load balancer uses when performing health checks on targets. - // If the protocol is HTTP, HTTPS, TCP, TLS, UDP, or TCP_UDP, the default is - // traffic-port, which is the port on which each target receives traffic from - // the load balancer. If the protocol is GENEVE, the default is port 80. - HealthCheckPort *string `type:"string"` - - // The protocol the load balancer uses when performing health checks on targets. - // For Application Load Balancers, the default is HTTP. For Network Load Balancers - // and Gateway Load Balancers, the default is TCP. The TCP protocol is not supported - // for health checks if the protocol of the target group is HTTP or HTTPS. The - // GENEVE, TLS, UDP, and TCP_UDP protocols are not supported for health checks. - HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` - - // The amount of time, in seconds, during which no response from a target means - // a failed health check. The range is 2–120 seconds. For target groups with - // a protocol of HTTP, the default is 6 seconds. For target groups with a protocol - // of TCP, TLS or HTTPS, the default is 10 seconds. For target groups with a - // protocol of GENEVE, the default is 5 seconds. If the target type is lambda, - // the default is 30 seconds. - HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` - - // The number of consecutive health check successes required before considering - // a target healthy. The range is 2-10. If the target group protocol is TCP, - // TCP_UDP, UDP, TLS, HTTP or HTTPS, the default is 5. For target groups with - // a protocol of GENEVE, the default is 5. If the target type is lambda, the - // default is 5. - HealthyThresholdCount *int64 `min:"2" type:"integer"` - - // The type of IP address used for this target group. The possible values are - // ipv4 and ipv6. This is an optional parameter. If not specified, the IP address - // type defaults to ipv4. - IpAddressType *string `type:"string" enum:"TargetGroupIpAddressTypeEnum"` - - // [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for - // a successful response from a target. For target groups with a protocol of - // TCP, TCP_UDP, UDP or TLS the range is 200-599. For target groups with a protocol - // of HTTP or HTTPS, the range is 200-499. For target groups with a protocol - // of GENEVE, the range is 200-399. - Matcher *Matcher `type:"structure"` - - // The name of the target group. - // - // This name must be unique per region per account, can have a maximum of 32 - // characters, must contain only alphanumeric characters or hyphens, and must - // not begin or end with a hyphen. - // - // Name is a required field - Name *string `type:"string" required:"true"` - - // The port on which the targets receive traffic. This port is used unless you - // specify a port override when registering the target. If the target is a Lambda - // function, this parameter does not apply. If the protocol is GENEVE, the supported - // port is 6081. - Port *int64 `min:"1" type:"integer"` - - // The protocol to use for routing traffic to the targets. For Application Load - // Balancers, the supported protocols are HTTP and HTTPS. For Network Load Balancers, - // the supported protocols are TCP, TLS, UDP, or TCP_UDP. For Gateway Load Balancers, - // the supported protocol is GENEVE. A TCP_UDP listener must be associated with - // a TCP_UDP target group. If the target is a Lambda function, this parameter - // does not apply. - Protocol *string `type:"string" enum:"ProtocolEnum"` - - // [HTTP/HTTPS protocol] The protocol version. Specify GRPC to send requests - // to targets using gRPC. Specify HTTP2 to send requests to targets using HTTP/2. - // The default is HTTP1, which sends requests to targets using HTTP/1.1. - ProtocolVersion *string `type:"string"` - - // The tags to assign to the target group. - Tags []*Tag `min:"1" type:"list"` - - // The type of target that you must specify when registering targets with this - // target group. You can't specify targets for a target group using more than - // one target type. - // - // * instance - Register targets by instance ID. This is the default value. - // - // * ip - Register targets by IP address. You can specify IP addresses from - // the subnets of the virtual private cloud (VPC) for the target group, the - // RFC 1918 range (10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16), and the - // RFC 6598 range (100.64.0.0/10). You can't specify publicly routable IP - // addresses. - // - // * lambda - Register a single Lambda function as a target. - // - // * alb - Register a single Application Load Balancer as a target. - TargetType *string `type:"string" enum:"TargetTypeEnum"` - - // The number of consecutive health check failures required before considering - // a target unhealthy. The range is 2-10. If the target group protocol is TCP, - // TCP_UDP, UDP, TLS, HTTP or HTTPS, the default is 2. For target groups with - // a protocol of GENEVE, the default is 2. If the target type is lambda, the - // default is 5. - UnhealthyThresholdCount *int64 `min:"2" type:"integer"` - - // The identifier of the virtual private cloud (VPC). If the target is a Lambda - // function, this parameter does not apply. Otherwise, this parameter is required. - 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 CreateTargetGroupInput) 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 CreateTargetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTargetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTargetGroupInput"} - if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 5 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 5)) - } - if s.HealthCheckPath != nil && len(*s.HealthCheckPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckPath", 1)) - } - if s.HealthCheckTimeoutSeconds != nil && *s.HealthCheckTimeoutSeconds < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckTimeoutSeconds", 2)) - } - if s.HealthyThresholdCount != nil && *s.HealthyThresholdCount < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthyThresholdCount", 2)) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) - } - if s.UnhealthyThresholdCount != nil && *s.UnhealthyThresholdCount < 2 { - invalidParams.Add(request.NewErrParamMinValue("UnhealthyThresholdCount", 2)) - } - 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 -} - -// SetHealthCheckEnabled sets the HealthCheckEnabled field's value. -func (s *CreateTargetGroupInput) SetHealthCheckEnabled(v bool) *CreateTargetGroupInput { - s.HealthCheckEnabled = &v - return s -} - -// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. -func (s *CreateTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *CreateTargetGroupInput { - s.HealthCheckIntervalSeconds = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *CreateTargetGroupInput) SetHealthCheckPath(v string) *CreateTargetGroupInput { - s.HealthCheckPath = &v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *CreateTargetGroupInput) SetHealthCheckPort(v string) *CreateTargetGroupInput { - s.HealthCheckPort = &v - return s -} - -// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. -func (s *CreateTargetGroupInput) SetHealthCheckProtocol(v string) *CreateTargetGroupInput { - s.HealthCheckProtocol = &v - return s -} - -// SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value. -func (s *CreateTargetGroupInput) SetHealthCheckTimeoutSeconds(v int64) *CreateTargetGroupInput { - s.HealthCheckTimeoutSeconds = &v - return s -} - -// SetHealthyThresholdCount sets the HealthyThresholdCount field's value. -func (s *CreateTargetGroupInput) SetHealthyThresholdCount(v int64) *CreateTargetGroupInput { - s.HealthyThresholdCount = &v - return s -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *CreateTargetGroupInput) SetIpAddressType(v string) *CreateTargetGroupInput { - s.IpAddressType = &v - return s -} - -// SetMatcher sets the Matcher field's value. -func (s *CreateTargetGroupInput) SetMatcher(v *Matcher) *CreateTargetGroupInput { - s.Matcher = v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTargetGroupInput) SetName(v string) *CreateTargetGroupInput { - s.Name = &v - return s -} - -// SetPort sets the Port field's value. -func (s *CreateTargetGroupInput) SetPort(v int64) *CreateTargetGroupInput { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *CreateTargetGroupInput) SetProtocol(v string) *CreateTargetGroupInput { - s.Protocol = &v - return s -} - -// SetProtocolVersion sets the ProtocolVersion field's value. -func (s *CreateTargetGroupInput) SetProtocolVersion(v string) *CreateTargetGroupInput { - s.ProtocolVersion = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTargetGroupInput) SetTags(v []*Tag) *CreateTargetGroupInput { - s.Tags = v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *CreateTargetGroupInput) SetTargetType(v string) *CreateTargetGroupInput { - s.TargetType = &v - return s -} - -// SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value. -func (s *CreateTargetGroupInput) SetUnhealthyThresholdCount(v int64) *CreateTargetGroupInput { - s.UnhealthyThresholdCount = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *CreateTargetGroupInput) SetVpcId(v string) *CreateTargetGroupInput { - s.VpcId = &v - return s -} - -type CreateTargetGroupOutput struct { - _ struct{} `type:"structure"` - - // Information about the target group. - TargetGroups []*TargetGroup `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 CreateTargetGroupOutput) 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 CreateTargetGroupOutput) GoString() string { - return s.String() -} - -// SetTargetGroups sets the TargetGroups field's value. -func (s *CreateTargetGroupOutput) SetTargetGroups(v []*TargetGroup) *CreateTargetGroupOutput { - s.TargetGroups = v - return s -} - -type CreateTrustStoreInput struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket for the ca certificates bundle. - // - // CaCertificatesBundleS3Bucket is a required field - CaCertificatesBundleS3Bucket *string `type:"string" required:"true"` - - // The Amazon S3 path for the ca certificates bundle. - // - // CaCertificatesBundleS3Key is a required field - CaCertificatesBundleS3Key *string `type:"string" required:"true"` - - // The Amazon S3 object version for the ca certificates bundle. If undefined - // the current version is used. - CaCertificatesBundleS3ObjectVersion *string `type:"string"` - - // The name of the trust store. - // - // This name must be unique per region and cannot be changed after creation. - // - // Name is a required field - Name *string `min:"1" type:"string" required:"true"` - - // The tags to assign to the trust store. - Tags []*Tag `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 CreateTrustStoreInput) 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 CreateTrustStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *CreateTrustStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "CreateTrustStoreInput"} - if s.CaCertificatesBundleS3Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("CaCertificatesBundleS3Bucket")) - } - if s.CaCertificatesBundleS3Key == nil { - invalidParams.Add(request.NewErrParamRequired("CaCertificatesBundleS3Key")) - } - if s.Name == nil { - invalidParams.Add(request.NewErrParamRequired("Name")) - } - if s.Name != nil && len(*s.Name) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Name", 1)) - } - if s.Tags != nil && len(s.Tags) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Tags", 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 -} - -// SetCaCertificatesBundleS3Bucket sets the CaCertificatesBundleS3Bucket field's value. -func (s *CreateTrustStoreInput) SetCaCertificatesBundleS3Bucket(v string) *CreateTrustStoreInput { - s.CaCertificatesBundleS3Bucket = &v - return s -} - -// SetCaCertificatesBundleS3Key sets the CaCertificatesBundleS3Key field's value. -func (s *CreateTrustStoreInput) SetCaCertificatesBundleS3Key(v string) *CreateTrustStoreInput { - s.CaCertificatesBundleS3Key = &v - return s -} - -// SetCaCertificatesBundleS3ObjectVersion sets the CaCertificatesBundleS3ObjectVersion field's value. -func (s *CreateTrustStoreInput) SetCaCertificatesBundleS3ObjectVersion(v string) *CreateTrustStoreInput { - s.CaCertificatesBundleS3ObjectVersion = &v - return s -} - -// SetName sets the Name field's value. -func (s *CreateTrustStoreInput) SetName(v string) *CreateTrustStoreInput { - s.Name = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *CreateTrustStoreInput) SetTags(v []*Tag) *CreateTrustStoreInput { - s.Tags = v - return s -} - -type CreateTrustStoreOutput struct { - _ struct{} `type:"structure"` - - // Information about the trust store created. - TrustStores []*TrustStore `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 CreateTrustStoreOutput) 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 CreateTrustStoreOutput) GoString() string { - return s.String() -} - -// SetTrustStores sets the TrustStores field's value. -func (s *CreateTrustStoreOutput) SetTrustStores(v []*TrustStore) *CreateTrustStoreOutput { - s.TrustStores = v - return s -} - -type DeleteListenerInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *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 DeleteListenerInput) 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 DeleteListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteListenerInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *DeleteListenerInput) SetListenerArn(v string) *DeleteListenerInput { - s.ListenerArn = &v - return s -} - -type DeleteListenerOutput 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 DeleteListenerOutput) 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 DeleteListenerOutput) GoString() string { - return s.String() -} - -type DeleteLoadBalancerInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *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 DeleteLoadBalancerInput) 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 DeleteLoadBalancerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteLoadBalancerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteLoadBalancerInput"} - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *DeleteLoadBalancerInput) SetLoadBalancerArn(v string) *DeleteLoadBalancerInput { - s.LoadBalancerArn = &v - return s -} - -type DeleteLoadBalancerOutput 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 DeleteLoadBalancerOutput) 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 DeleteLoadBalancerOutput) GoString() string { - return s.String() -} - -type DeleteRuleInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the rule. - // - // RuleArn is a required field - RuleArn *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 DeleteRuleInput) 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 DeleteRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteRuleInput"} - if s.RuleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RuleArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRuleArn sets the RuleArn field's value. -func (s *DeleteRuleInput) SetRuleArn(v string) *DeleteRuleInput { - s.RuleArn = &v - return s -} - -type DeleteRuleOutput 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 DeleteRuleOutput) 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 DeleteRuleOutput) GoString() string { - return s.String() -} - -type DeleteSharedTrustStoreAssociationInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - // - // ResourceArn is a required field - ResourceArn *string `type:"string" required:"true"` - - // The Amazon Resource Name (ARN) of the trust store. - // - // TrustStoreArn is a required field - TrustStoreArn *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 DeleteSharedTrustStoreAssociationInput) 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 DeleteSharedTrustStoreAssociationInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteSharedTrustStoreAssociationInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteSharedTrustStoreAssociationInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - if s.TrustStoreArn == nil { - invalidParams.Add(request.NewErrParamRequired("TrustStoreArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *DeleteSharedTrustStoreAssociationInput) SetResourceArn(v string) *DeleteSharedTrustStoreAssociationInput { - s.ResourceArn = &v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *DeleteSharedTrustStoreAssociationInput) SetTrustStoreArn(v string) *DeleteSharedTrustStoreAssociationInput { - s.TrustStoreArn = &v - return s -} - -type DeleteSharedTrustStoreAssociationOutput 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 DeleteSharedTrustStoreAssociationOutput) 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 DeleteSharedTrustStoreAssociationOutput) GoString() string { - return s.String() -} - -type DeleteTargetGroupInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *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 DeleteTargetGroupInput) 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 DeleteTargetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTargetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTargetGroupInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *DeleteTargetGroupInput) SetTargetGroupArn(v string) *DeleteTargetGroupInput { - s.TargetGroupArn = &v - return s -} - -type DeleteTargetGroupOutput 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 DeleteTargetGroupOutput) 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 DeleteTargetGroupOutput) GoString() string { - return s.String() -} - -type DeleteTrustStoreInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the trust store. - // - // TrustStoreArn is a required field - TrustStoreArn *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 DeleteTrustStoreInput) 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 DeleteTrustStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeleteTrustStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeleteTrustStoreInput"} - if s.TrustStoreArn == nil { - invalidParams.Add(request.NewErrParamRequired("TrustStoreArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *DeleteTrustStoreInput) SetTrustStoreArn(v string) *DeleteTrustStoreInput { - s.TrustStoreArn = &v - return s -} - -type DeleteTrustStoreOutput 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 DeleteTrustStoreOutput) 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 DeleteTrustStoreOutput) GoString() string { - return s.String() -} - -type DeregisterTargetsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` - - // The targets. If you specified a port override when you registered a target, - // you must specify both the target ID and the port when you deregister it. - // - // Targets is a required field - Targets []*TargetDescription `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 DeregisterTargetsInput) 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 DeregisterTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DeregisterTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DeregisterTargetsInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *DeregisterTargetsInput) SetTargetGroupArn(v string) *DeregisterTargetsInput { - s.TargetGroupArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *DeregisterTargetsInput) SetTargets(v []*TargetDescription) *DeregisterTargetsInput { - s.Targets = v - return s -} - -type DeregisterTargetsOutput 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 DeregisterTargetsOutput) 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 DeregisterTargetsOutput) GoString() string { - return s.String() -} - -type DescribeAccountLimitsInput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `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 DescribeAccountLimitsInput) 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 DescribeAccountLimitsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeAccountLimitsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeAccountLimitsInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeAccountLimitsInput) SetMarker(v string) *DescribeAccountLimitsInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeAccountLimitsInput) SetPageSize(v int64) *DescribeAccountLimitsInput { - s.PageSize = &v - return s -} - -type DescribeAccountLimitsOutput struct { - _ struct{} `type:"structure"` - - // Information about the limits. - Limits []*Limit `type:"list"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *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 DescribeAccountLimitsOutput) 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 DescribeAccountLimitsOutput) GoString() string { - return s.String() -} - -// SetLimits sets the Limits field's value. -func (s *DescribeAccountLimitsOutput) SetLimits(v []*Limit) *DescribeAccountLimitsOutput { - s.Limits = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeAccountLimitsOutput) SetNextMarker(v string) *DescribeAccountLimitsOutput { - s.NextMarker = &v - return s -} - -type DescribeListenerCertificatesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `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 DescribeListenerCertificatesInput) 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 DescribeListenerCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeListenerCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeListenerCertificatesInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *DescribeListenerCertificatesInput) SetListenerArn(v string) *DescribeListenerCertificatesInput { - s.ListenerArn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeListenerCertificatesInput) SetMarker(v string) *DescribeListenerCertificatesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeListenerCertificatesInput) SetPageSize(v int64) *DescribeListenerCertificatesInput { - s.PageSize = &v - return s -} - -type DescribeListenerCertificatesOutput struct { - _ struct{} `type:"structure"` - - // Information about the certificates. - Certificates []*Certificate `type:"list"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *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 DescribeListenerCertificatesOutput) 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 DescribeListenerCertificatesOutput) GoString() string { - return s.String() -} - -// SetCertificates sets the Certificates field's value. -func (s *DescribeListenerCertificatesOutput) SetCertificates(v []*Certificate) *DescribeListenerCertificatesOutput { - s.Certificates = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeListenerCertificatesOutput) SetNextMarker(v string) *DescribeListenerCertificatesOutput { - s.NextMarker = &v - return s -} - -type DescribeListenersInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of the listeners. - ListenerArns []*string `type:"list"` - - // The Amazon Resource Name (ARN) of the load balancer. - LoadBalancerArn *string `type:"string"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `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 DescribeListenersInput) 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 DescribeListenersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeListenersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeListenersInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArns sets the ListenerArns field's value. -func (s *DescribeListenersInput) SetListenerArns(v []*string) *DescribeListenersInput { - s.ListenerArns = v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *DescribeListenersInput) SetLoadBalancerArn(v string) *DescribeListenersInput { - s.LoadBalancerArn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeListenersInput) SetMarker(v string) *DescribeListenersInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeListenersInput) SetPageSize(v int64) *DescribeListenersInput { - s.PageSize = &v - return s -} - -type DescribeListenersOutput struct { - _ struct{} `type:"structure"` - - // Information about the listeners. - Listeners []*Listener `type:"list"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *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 DescribeListenersOutput) 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 DescribeListenersOutput) GoString() string { - return s.String() -} - -// SetListeners sets the Listeners field's value. -func (s *DescribeListenersOutput) SetListeners(v []*Listener) *DescribeListenersOutput { - s.Listeners = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeListenersOutput) SetNextMarker(v string) *DescribeListenersOutput { - s.NextMarker = &v - return s -} - -type DescribeLoadBalancerAttributesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *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 DescribeLoadBalancerAttributesInput) 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 DescribeLoadBalancerAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancerAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancerAttributesInput"} - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *DescribeLoadBalancerAttributesInput) SetLoadBalancerArn(v string) *DescribeLoadBalancerAttributesInput { - s.LoadBalancerArn = &v - return s -} - -type DescribeLoadBalancerAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer attributes. - Attributes []*LoadBalancerAttribute `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 DescribeLoadBalancerAttributesOutput) 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 DescribeLoadBalancerAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *DescribeLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttribute) *DescribeLoadBalancerAttributesOutput { - s.Attributes = v - return s -} - -type DescribeLoadBalancersInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of the load balancers. You can specify up - // to 20 load balancers in a single call. - LoadBalancerArns []*string `type:"list"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The names of the load balancers. - Names []*string `type:"list"` - - // The maximum number of results to return with this call. - PageSize *int64 `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 DescribeLoadBalancersInput) 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 DescribeLoadBalancersInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeLoadBalancersInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeLoadBalancersInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArns sets the LoadBalancerArns field's value. -func (s *DescribeLoadBalancersInput) SetLoadBalancerArns(v []*string) *DescribeLoadBalancersInput { - s.LoadBalancerArns = v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeLoadBalancersInput) SetMarker(v string) *DescribeLoadBalancersInput { - s.Marker = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeLoadBalancersInput) SetNames(v []*string) *DescribeLoadBalancersInput { - s.Names = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeLoadBalancersInput) SetPageSize(v int64) *DescribeLoadBalancersInput { - s.PageSize = &v - return s -} - -type DescribeLoadBalancersOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancers. - LoadBalancers []*LoadBalancer `type:"list"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *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 DescribeLoadBalancersOutput) 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 DescribeLoadBalancersOutput) GoString() string { - return s.String() -} - -// SetLoadBalancers sets the LoadBalancers field's value. -func (s *DescribeLoadBalancersOutput) SetLoadBalancers(v []*LoadBalancer) *DescribeLoadBalancersOutput { - s.LoadBalancers = v - return s -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeLoadBalancersOutput) SetNextMarker(v string) *DescribeLoadBalancersOutput { - s.NextMarker = &v - return s -} - -type DescribeRulesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the listener. - ListenerArn *string `type:"string"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` - - // The Amazon Resource Names (ARN) of the rules. - RuleArns []*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 DescribeRulesInput) 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 DescribeRulesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeRulesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeRulesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *DescribeRulesInput) SetListenerArn(v string) *DescribeRulesInput { - s.ListenerArn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeRulesInput) SetMarker(v string) *DescribeRulesInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeRulesInput) SetPageSize(v int64) *DescribeRulesInput { - s.PageSize = &v - return s -} - -// SetRuleArns sets the RuleArns field's value. -func (s *DescribeRulesInput) SetRuleArns(v []*string) *DescribeRulesInput { - s.RuleArns = v - return s -} - -type DescribeRulesOutput struct { - _ struct{} `type:"structure"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *string `type:"string"` - - // Information about the rules. - Rules []*Rule `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 DescribeRulesOutput) 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 DescribeRulesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeRulesOutput) SetNextMarker(v string) *DescribeRulesOutput { - s.NextMarker = &v - return s -} - -// SetRules sets the Rules field's value. -func (s *DescribeRulesOutput) SetRules(v []*Rule) *DescribeRulesOutput { - s.Rules = v - return s -} - -type DescribeSSLPoliciesInput struct { - _ struct{} `type:"structure"` - - // The type of load balancer. The default lists the SSL policies for all load - // balancers. - LoadBalancerType *string `type:"string" enum:"LoadBalancerTypeEnum"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The names of the policies. - Names []*string `type:"list"` - - // The maximum number of results to return with this call. - PageSize *int64 `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 DescribeSSLPoliciesInput) 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 DescribeSSLPoliciesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeSSLPoliciesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeSSLPoliciesInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerType sets the LoadBalancerType field's value. -func (s *DescribeSSLPoliciesInput) SetLoadBalancerType(v string) *DescribeSSLPoliciesInput { - s.LoadBalancerType = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeSSLPoliciesInput) SetMarker(v string) *DescribeSSLPoliciesInput { - s.Marker = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeSSLPoliciesInput) SetNames(v []*string) *DescribeSSLPoliciesInput { - s.Names = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeSSLPoliciesInput) SetPageSize(v int64) *DescribeSSLPoliciesInput { - s.PageSize = &v - return s -} - -type DescribeSSLPoliciesOutput struct { - _ struct{} `type:"structure"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *string `type:"string"` - - // Information about the security policies. - SslPolicies []*SslPolicy `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 DescribeSSLPoliciesOutput) 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 DescribeSSLPoliciesOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeSSLPoliciesOutput) SetNextMarker(v string) *DescribeSSLPoliciesOutput { - s.NextMarker = &v - return s -} - -// SetSslPolicies sets the SslPolicies field's value. -func (s *DescribeSSLPoliciesOutput) SetSslPolicies(v []*SslPolicy) *DescribeSSLPoliciesOutput { - s.SslPolicies = v - return s -} - -type DescribeTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Names (ARN) of the resources. You can specify up to 20 - // resources in a single call. - // - // ResourceArns is a required field - ResourceArns []*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 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.ResourceArns == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArns")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *DescribeTagsInput) SetResourceArns(v []*string) *DescribeTagsInput { - s.ResourceArns = v - return s -} - -type DescribeTagsOutput struct { - _ struct{} `type:"structure"` - - // Information about the tags. - TagDescriptions []*TagDescription `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 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() -} - -// SetTagDescriptions sets the TagDescriptions field's value. -func (s *DescribeTagsOutput) SetTagDescriptions(v []*TagDescription) *DescribeTagsOutput { - s.TagDescriptions = v - return s -} - -type DescribeTargetGroupAttributesInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *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 DescribeTargetGroupAttributesInput) 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 DescribeTargetGroupAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTargetGroupAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTargetGroupAttributesInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *DescribeTargetGroupAttributesInput) SetTargetGroupArn(v string) *DescribeTargetGroupAttributesInput { - s.TargetGroupArn = &v - return s -} - -type DescribeTargetGroupAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the target group attributes - Attributes []*TargetGroupAttribute `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 DescribeTargetGroupAttributesOutput) 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 DescribeTargetGroupAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *DescribeTargetGroupAttributesOutput) SetAttributes(v []*TargetGroupAttribute) *DescribeTargetGroupAttributesOutput { - s.Attributes = v - return s -} - -type DescribeTargetGroupsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the load balancer. - LoadBalancerArn *string `type:"string"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The names of the target groups. - Names []*string `type:"list"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` - - // The Amazon Resource Names (ARN) of the target groups. - TargetGroupArns []*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 DescribeTargetGroupsInput) 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 DescribeTargetGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTargetGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTargetGroupsInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *DescribeTargetGroupsInput) SetLoadBalancerArn(v string) *DescribeTargetGroupsInput { - s.LoadBalancerArn = &v - return s -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTargetGroupsInput) SetMarker(v string) *DescribeTargetGroupsInput { - s.Marker = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeTargetGroupsInput) SetNames(v []*string) *DescribeTargetGroupsInput { - s.Names = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeTargetGroupsInput) SetPageSize(v int64) *DescribeTargetGroupsInput { - s.PageSize = &v - return s -} - -// SetTargetGroupArns sets the TargetGroupArns field's value. -func (s *DescribeTargetGroupsInput) SetTargetGroupArns(v []*string) *DescribeTargetGroupsInput { - s.TargetGroupArns = v - return s -} - -type DescribeTargetGroupsOutput struct { - _ struct{} `type:"structure"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *string `type:"string"` - - // Information about the target groups. - TargetGroups []*TargetGroup `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 DescribeTargetGroupsOutput) 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 DescribeTargetGroupsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeTargetGroupsOutput) SetNextMarker(v string) *DescribeTargetGroupsOutput { - s.NextMarker = &v - return s -} - -// SetTargetGroups sets the TargetGroups field's value. -func (s *DescribeTargetGroupsOutput) SetTargetGroups(v []*TargetGroup) *DescribeTargetGroupsOutput { - s.TargetGroups = v - return s -} - -type DescribeTargetHealthInput struct { - _ struct{} `type:"structure"` - - // Used to include anomaly detection information. - Include []*string `type:"list" enum:"DescribeTargetHealthInputIncludeEnum"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` - - // The targets. - Targets []*TargetDescription `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 DescribeTargetHealthInput) 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 DescribeTargetHealthInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTargetHealthInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTargetHealthInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetInclude sets the Include field's value. -func (s *DescribeTargetHealthInput) SetInclude(v []*string) *DescribeTargetHealthInput { - s.Include = v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *DescribeTargetHealthInput) SetTargetGroupArn(v string) *DescribeTargetHealthInput { - s.TargetGroupArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *DescribeTargetHealthInput) SetTargets(v []*TargetDescription) *DescribeTargetHealthInput { - s.Targets = v - return s -} - -type DescribeTargetHealthOutput struct { - _ struct{} `type:"structure"` - - // Information about the health of the targets. - TargetHealthDescriptions []*TargetHealthDescription `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 DescribeTargetHealthOutput) 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 DescribeTargetHealthOutput) GoString() string { - return s.String() -} - -// SetTargetHealthDescriptions sets the TargetHealthDescriptions field's value. -func (s *DescribeTargetHealthOutput) SetTargetHealthDescriptions(v []*TargetHealthDescription) *DescribeTargetHealthOutput { - s.TargetHealthDescriptions = v - return s -} - -type DescribeTrustStoreAssociationsInput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` - - // The Amazon Resource Name (ARN) of the trust store. - // - // TrustStoreArn is a required field - TrustStoreArn *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 DescribeTrustStoreAssociationsInput) 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 DescribeTrustStoreAssociationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTrustStoreAssociationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTrustStoreAssociationsInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - if s.TrustStoreArn == nil { - invalidParams.Add(request.NewErrParamRequired("TrustStoreArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTrustStoreAssociationsInput) SetMarker(v string) *DescribeTrustStoreAssociationsInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeTrustStoreAssociationsInput) SetPageSize(v int64) *DescribeTrustStoreAssociationsInput { - s.PageSize = &v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *DescribeTrustStoreAssociationsInput) SetTrustStoreArn(v string) *DescribeTrustStoreAssociationsInput { - s.TrustStoreArn = &v - return s -} - -type DescribeTrustStoreAssociationsOutput struct { - _ struct{} `type:"structure"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *string `type:"string"` - - // Information about the resources the trust store is associated to. - TrustStoreAssociations []*TrustStoreAssociation `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 DescribeTrustStoreAssociationsOutput) 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 DescribeTrustStoreAssociationsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeTrustStoreAssociationsOutput) SetNextMarker(v string) *DescribeTrustStoreAssociationsOutput { - s.NextMarker = &v - return s -} - -// SetTrustStoreAssociations sets the TrustStoreAssociations field's value. -func (s *DescribeTrustStoreAssociationsOutput) SetTrustStoreAssociations(v []*TrustStoreAssociation) *DescribeTrustStoreAssociationsOutput { - s.TrustStoreAssociations = v - return s -} - -// Information about the revocations used by a trust store. -type DescribeTrustStoreRevocation struct { - _ struct{} `type:"structure"` - - // The number of revoked certificates. - NumberOfRevokedEntries *int64 `type:"long"` - - // The revocation ID of a revocation file in use. - RevocationId *int64 `type:"long"` - - // The type of revocation file. - RevocationType *string `type:"string" enum:"RevocationType"` - - // The Amazon Resource Name (ARN) of the trust store. - TrustStoreArn *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 DescribeTrustStoreRevocation) 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 DescribeTrustStoreRevocation) GoString() string { - return s.String() -} - -// SetNumberOfRevokedEntries sets the NumberOfRevokedEntries field's value. -func (s *DescribeTrustStoreRevocation) SetNumberOfRevokedEntries(v int64) *DescribeTrustStoreRevocation { - s.NumberOfRevokedEntries = &v - return s -} - -// SetRevocationId sets the RevocationId field's value. -func (s *DescribeTrustStoreRevocation) SetRevocationId(v int64) *DescribeTrustStoreRevocation { - s.RevocationId = &v - return s -} - -// SetRevocationType sets the RevocationType field's value. -func (s *DescribeTrustStoreRevocation) SetRevocationType(v string) *DescribeTrustStoreRevocation { - s.RevocationType = &v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *DescribeTrustStoreRevocation) SetTrustStoreArn(v string) *DescribeTrustStoreRevocation { - s.TrustStoreArn = &v - return s -} - -type DescribeTrustStoreRevocationsInput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` - - // The revocation IDs of the revocation files you want to describe. - RevocationIds []*int64 `type:"list"` - - // The Amazon Resource Name (ARN) of the trust store. - // - // TrustStoreArn is a required field - TrustStoreArn *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 DescribeTrustStoreRevocationsInput) 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 DescribeTrustStoreRevocationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTrustStoreRevocationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTrustStoreRevocationsInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - if s.TrustStoreArn == nil { - invalidParams.Add(request.NewErrParamRequired("TrustStoreArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTrustStoreRevocationsInput) SetMarker(v string) *DescribeTrustStoreRevocationsInput { - s.Marker = &v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeTrustStoreRevocationsInput) SetPageSize(v int64) *DescribeTrustStoreRevocationsInput { - s.PageSize = &v - return s -} - -// SetRevocationIds sets the RevocationIds field's value. -func (s *DescribeTrustStoreRevocationsInput) SetRevocationIds(v []*int64) *DescribeTrustStoreRevocationsInput { - s.RevocationIds = v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *DescribeTrustStoreRevocationsInput) SetTrustStoreArn(v string) *DescribeTrustStoreRevocationsInput { - s.TrustStoreArn = &v - return s -} - -type DescribeTrustStoreRevocationsOutput struct { - _ struct{} `type:"structure"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *string `type:"string"` - - // Information about the revocation file in the trust store. - TrustStoreRevocations []*DescribeTrustStoreRevocation `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 DescribeTrustStoreRevocationsOutput) 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 DescribeTrustStoreRevocationsOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeTrustStoreRevocationsOutput) SetNextMarker(v string) *DescribeTrustStoreRevocationsOutput { - s.NextMarker = &v - return s -} - -// SetTrustStoreRevocations sets the TrustStoreRevocations field's value. -func (s *DescribeTrustStoreRevocationsOutput) SetTrustStoreRevocations(v []*DescribeTrustStoreRevocation) *DescribeTrustStoreRevocationsOutput { - s.TrustStoreRevocations = v - return s -} - -type DescribeTrustStoresInput struct { - _ struct{} `type:"structure"` - - // The marker for the next set of results. (You received this marker from a - // previous call.) - Marker *string `type:"string"` - - // The names of the trust stores. - Names []*string `type:"list"` - - // The maximum number of results to return with this call. - PageSize *int64 `min:"1" type:"integer"` - - // The Amazon Resource Name (ARN) of the trust store. - TrustStoreArns []*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 DescribeTrustStoresInput) 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 DescribeTrustStoresInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *DescribeTrustStoresInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "DescribeTrustStoresInput"} - if s.PageSize != nil && *s.PageSize < 1 { - invalidParams.Add(request.NewErrParamMinValue("PageSize", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetMarker sets the Marker field's value. -func (s *DescribeTrustStoresInput) SetMarker(v string) *DescribeTrustStoresInput { - s.Marker = &v - return s -} - -// SetNames sets the Names field's value. -func (s *DescribeTrustStoresInput) SetNames(v []*string) *DescribeTrustStoresInput { - s.Names = v - return s -} - -// SetPageSize sets the PageSize field's value. -func (s *DescribeTrustStoresInput) SetPageSize(v int64) *DescribeTrustStoresInput { - s.PageSize = &v - return s -} - -// SetTrustStoreArns sets the TrustStoreArns field's value. -func (s *DescribeTrustStoresInput) SetTrustStoreArns(v []*string) *DescribeTrustStoresInput { - s.TrustStoreArns = v - return s -} - -type DescribeTrustStoresOutput struct { - _ struct{} `type:"structure"` - - // If there are additional results, this is the marker for the next set of results. - // Otherwise, this is null. - NextMarker *string `type:"string"` - - // Information about the trust stores. - TrustStores []*TrustStore `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 DescribeTrustStoresOutput) 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 DescribeTrustStoresOutput) GoString() string { - return s.String() -} - -// SetNextMarker sets the NextMarker field's value. -func (s *DescribeTrustStoresOutput) SetNextMarker(v string) *DescribeTrustStoresOutput { - s.NextMarker = &v - return s -} - -// SetTrustStores sets the TrustStores field's value. -func (s *DescribeTrustStoresOutput) SetTrustStores(v []*TrustStore) *DescribeTrustStoresOutput { - s.TrustStores = v - return s -} - -// Information about an action that returns a custom HTTP response. -type FixedResponseActionConfig struct { - _ struct{} `type:"structure"` - - // The content type. - // - // Valid Values: text/plain | text/css | text/html | application/javascript - // | application/json - ContentType *string `type:"string"` - - // The message. - MessageBody *string `type:"string"` - - // The HTTP response code (2XX, 4XX, or 5XX). - // - // StatusCode is a required field - StatusCode *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 FixedResponseActionConfig) 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 FixedResponseActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *FixedResponseActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "FixedResponseActionConfig"} - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetContentType sets the ContentType field's value. -func (s *FixedResponseActionConfig) SetContentType(v string) *FixedResponseActionConfig { - s.ContentType = &v - return s -} - -// SetMessageBody sets the MessageBody field's value. -func (s *FixedResponseActionConfig) SetMessageBody(v string) *FixedResponseActionConfig { - s.MessageBody = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *FixedResponseActionConfig) SetStatusCode(v string) *FixedResponseActionConfig { - s.StatusCode = &v - return s -} - -// Information about a forward action. -type ForwardActionConfig struct { - _ struct{} `type:"structure"` - - // The target group stickiness for the rule. - TargetGroupStickinessConfig *TargetGroupStickinessConfig `type:"structure"` - - // The target groups. For Network Load Balancers, you can specify a single target - // group. - TargetGroups []*TargetGroupTuple `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 ForwardActionConfig) 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 ForwardActionConfig) GoString() string { - return s.String() -} - -// SetTargetGroupStickinessConfig sets the TargetGroupStickinessConfig field's value. -func (s *ForwardActionConfig) SetTargetGroupStickinessConfig(v *TargetGroupStickinessConfig) *ForwardActionConfig { - s.TargetGroupStickinessConfig = v - return s -} - -// SetTargetGroups sets the TargetGroups field's value. -func (s *ForwardActionConfig) SetTargetGroups(v []*TargetGroupTuple) *ForwardActionConfig { - s.TargetGroups = v - return s -} - -type GetResourcePolicyInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - // - // ResourceArn is a required field - ResourceArn *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 GetResourcePolicyInput) 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 GetResourcePolicyInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetResourcePolicyInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetResourcePolicyInput"} - if s.ResourceArn == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *GetResourcePolicyInput) SetResourceArn(v string) *GetResourcePolicyInput { - s.ResourceArn = &v - return s -} - -type GetResourcePolicyOutput struct { - _ struct{} `type:"structure"` - - // The content of the resource policy. - 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 GetResourcePolicyOutput) 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 GetResourcePolicyOutput) GoString() string { - return s.String() -} - -// SetPolicy sets the Policy field's value. -func (s *GetResourcePolicyOutput) SetPolicy(v string) *GetResourcePolicyOutput { - s.Policy = &v - return s -} - -type GetTrustStoreCaCertificatesBundleInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the trust store. - // - // TrustStoreArn is a required field - TrustStoreArn *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 GetTrustStoreCaCertificatesBundleInput) 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 GetTrustStoreCaCertificatesBundleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTrustStoreCaCertificatesBundleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTrustStoreCaCertificatesBundleInput"} - if s.TrustStoreArn == nil { - invalidParams.Add(request.NewErrParamRequired("TrustStoreArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *GetTrustStoreCaCertificatesBundleInput) SetTrustStoreArn(v string) *GetTrustStoreCaCertificatesBundleInput { - s.TrustStoreArn = &v - return s -} - -type GetTrustStoreCaCertificatesBundleOutput struct { - _ struct{} `type:"structure"` - - // The ca certificate bundles Amazon S3 URI. - Location *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 GetTrustStoreCaCertificatesBundleOutput) 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 GetTrustStoreCaCertificatesBundleOutput) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *GetTrustStoreCaCertificatesBundleOutput) SetLocation(v string) *GetTrustStoreCaCertificatesBundleOutput { - s.Location = &v - return s -} - -type GetTrustStoreRevocationContentInput struct { - _ struct{} `type:"structure"` - - // The revocation ID of the revocation file. - // - // RevocationId is a required field - RevocationId *int64 `type:"long" required:"true"` - - // The Amazon Resource Name (ARN) of the trust store. - // - // TrustStoreArn is a required field - TrustStoreArn *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 GetTrustStoreRevocationContentInput) 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 GetTrustStoreRevocationContentInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *GetTrustStoreRevocationContentInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "GetTrustStoreRevocationContentInput"} - if s.RevocationId == nil { - invalidParams.Add(request.NewErrParamRequired("RevocationId")) - } - if s.TrustStoreArn == nil { - invalidParams.Add(request.NewErrParamRequired("TrustStoreArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRevocationId sets the RevocationId field's value. -func (s *GetTrustStoreRevocationContentInput) SetRevocationId(v int64) *GetTrustStoreRevocationContentInput { - s.RevocationId = &v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *GetTrustStoreRevocationContentInput) SetTrustStoreArn(v string) *GetTrustStoreRevocationContentInput { - s.TrustStoreArn = &v - return s -} - -type GetTrustStoreRevocationContentOutput struct { - _ struct{} `type:"structure"` - - // The revocation files Amazon S3 URI. - Location *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 GetTrustStoreRevocationContentOutput) 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 GetTrustStoreRevocationContentOutput) GoString() string { - return s.String() -} - -// SetLocation sets the Location field's value. -func (s *GetTrustStoreRevocationContentOutput) SetLocation(v string) *GetTrustStoreRevocationContentOutput { - s.Location = &v - return s -} - -// Information about a host header condition. -type HostHeaderConditionConfig struct { - _ struct{} `type:"structure"` - - // The host names. The maximum size of each name is 128 characters. The comparison - // is case insensitive. The following wildcard characters are supported: * (matches - // 0 or more characters) and ? (matches exactly 1 character). - // - // If you specify multiple strings, the condition is satisfied if one of the - // strings matches the host name. - 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 HostHeaderConditionConfig) 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 HostHeaderConditionConfig) GoString() string { - return s.String() -} - -// SetValues sets the Values field's value. -func (s *HostHeaderConditionConfig) SetValues(v []*string) *HostHeaderConditionConfig { - s.Values = v - return s -} - -// Information about an HTTP header condition. -// -// There is a set of standard HTTP header fields. You can also define custom -// HTTP header fields. -type HttpHeaderConditionConfig struct { - _ struct{} `type:"structure"` - - // The name of the HTTP header field. The maximum size is 40 characters. The - // header name is case insensitive. The allowed characters are specified by - // RFC 7230. Wildcards are not supported. - // - // You can't use an HTTP header condition to specify the host header. Use HostHeaderConditionConfig - // to specify a host header condition. - HttpHeaderName *string `type:"string"` - - // The strings to compare against the value of the HTTP header. The maximum - // size of each string is 128 characters. The comparison strings are case insensitive. - // The following wildcard characters are supported: * (matches 0 or more characters) - // and ? (matches exactly 1 character). - // - // If the same header appears multiple times in the request, we search them - // in order until a match is found. - // - // If you specify multiple strings, the condition is satisfied if one of the - // strings matches the value of the HTTP header. To require that all of the - // strings are a match, create one condition per string. - 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 HttpHeaderConditionConfig) 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 HttpHeaderConditionConfig) GoString() string { - return s.String() -} - -// SetHttpHeaderName sets the HttpHeaderName field's value. -func (s *HttpHeaderConditionConfig) SetHttpHeaderName(v string) *HttpHeaderConditionConfig { - s.HttpHeaderName = &v - return s -} - -// SetValues sets the Values field's value. -func (s *HttpHeaderConditionConfig) SetValues(v []*string) *HttpHeaderConditionConfig { - s.Values = v - return s -} - -// Information about an HTTP method condition. -// -// HTTP defines a set of request methods, also referred to as HTTP verbs. For -// more information, see the HTTP Method Registry (https://www.iana.org/assignments/http-methods/http-methods.xhtml). -// You can also define custom HTTP methods. -type HttpRequestMethodConditionConfig struct { - _ struct{} `type:"structure"` - - // The name of the request method. The maximum size is 40 characters. The allowed - // characters are A-Z, hyphen (-), and underscore (_). The comparison is case - // sensitive. Wildcards are not supported; therefore, the method name must be - // an exact match. - // - // If you specify multiple strings, the condition is satisfied if one of the - // strings matches the HTTP request method. We recommend that you route GET - // and HEAD requests in the same way, because the response to a HEAD request - // may be cached. - 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 HttpRequestMethodConditionConfig) 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 HttpRequestMethodConditionConfig) GoString() string { - return s.String() -} - -// SetValues sets the Values field's value. -func (s *HttpRequestMethodConditionConfig) SetValues(v []*string) *HttpRequestMethodConditionConfig { - s.Values = v - return s -} - -// Information about an Elastic Load Balancing resource limit for your Amazon -// Web Services account. -// -// For more information, see the following: -// -// - Quotas for your Application Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html) -// -// - Quotas for your Network Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-limits.html) -// -// - Quotas for your Gateway Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/gateway/quotas-limits.html) -type Limit struct { - _ struct{} `type:"structure"` - - // The maximum value of the limit. - Max *string `type:"string"` - - // The name of the limit. The possible values are: - // - // * application-load-balancers - // - // * condition-values-per-alb-rule - // - // * condition-wildcards-per-alb-rule - // - // * gateway-load-balancers - // - // * gateway-load-balancers-per-vpc - // - // * geneve-target-groups - // - // * listeners-per-application-load-balancer - // - // * listeners-per-network-load-balancer - // - // * network-load-balancers - // - // * rules-per-application-load-balancer - // - // * target-groups - // - // * target-groups-per-action-on-application-load-balancer - // - // * target-groups-per-action-on-network-load-balancer - // - // * target-groups-per-application-load-balancer - // - // * targets-per-application-load-balancer - // - // * targets-per-availability-zone-per-gateway-load-balancer - // - // * targets-per-availability-zone-per-network-load-balancer - // - // * targets-per-network-load-balancer - Name *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 Limit) 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 Limit) GoString() string { - return s.String() -} - -// SetMax sets the Max field's value. -func (s *Limit) SetMax(v string) *Limit { - s.Max = &v - return s -} - -// SetName sets the Name field's value. -func (s *Limit) SetName(v string) *Limit { - s.Name = &v - return s -} - -// Information about a listener. -type Listener struct { - _ struct{} `type:"structure"` - - // [TLS listener] The name of the Application-Layer Protocol Negotiation (ALPN) - // policy. - AlpnPolicy []*string `type:"list"` - - // [HTTPS or TLS listener] The default certificate for the listener. - Certificates []*Certificate `type:"list"` - - // The default actions for the listener. - DefaultActions []*Action `type:"list"` - - // The Amazon Resource Name (ARN) of the listener. - ListenerArn *string `type:"string"` - - // The Amazon Resource Name (ARN) of the load balancer. - LoadBalancerArn *string `type:"string"` - - // The mutual authentication configuration information. - MutualAuthentication *MutualAuthenticationAttributes `type:"structure"` - - // The port on which the load balancer is listening. - Port *int64 `min:"1" type:"integer"` - - // The protocol for connections from clients to the load balancer. - Protocol *string `type:"string" enum:"ProtocolEnum"` - - // [HTTPS or TLS listener] The security policy that defines which protocols - // and ciphers are supported. - SslPolicy *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 Listener) 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 Listener) GoString() string { - return s.String() -} - -// SetAlpnPolicy sets the AlpnPolicy field's value. -func (s *Listener) SetAlpnPolicy(v []*string) *Listener { - s.AlpnPolicy = v - return s -} - -// SetCertificates sets the Certificates field's value. -func (s *Listener) SetCertificates(v []*Certificate) *Listener { - s.Certificates = v - return s -} - -// SetDefaultActions sets the DefaultActions field's value. -func (s *Listener) SetDefaultActions(v []*Action) *Listener { - s.DefaultActions = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *Listener) SetListenerArn(v string) *Listener { - s.ListenerArn = &v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *Listener) SetLoadBalancerArn(v string) *Listener { - s.LoadBalancerArn = &v - return s -} - -// SetMutualAuthentication sets the MutualAuthentication field's value. -func (s *Listener) SetMutualAuthentication(v *MutualAuthenticationAttributes) *Listener { - s.MutualAuthentication = v - return s -} - -// SetPort sets the Port field's value. -func (s *Listener) SetPort(v int64) *Listener { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *Listener) SetProtocol(v string) *Listener { - s.Protocol = &v - return s -} - -// SetSslPolicy sets the SslPolicy field's value. -func (s *Listener) SetSslPolicy(v string) *Listener { - s.SslPolicy = &v - return s -} - -// Information about a load balancer. -type LoadBalancer struct { - _ struct{} `type:"structure"` - - // The subnets for the load balancer. - AvailabilityZones []*AvailabilityZone `type:"list"` - - // The ID of the Amazon Route 53 hosted zone associated with the load balancer. - CanonicalHostedZoneId *string `type:"string"` - - // The date and time the load balancer was created. - CreatedTime *time.Time `type:"timestamp"` - - // [Application Load Balancers on Outposts] The ID of the customer-owned address - // pool. - CustomerOwnedIpv4Pool *string `type:"string"` - - // The public DNS name of the load balancer. - DNSName *string `type:"string"` - - // Indicates whether to evaluate inbound security group rules for traffic sent - // to a Network Load Balancer through Amazon Web Services PrivateLink. - EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic *string `type:"string"` - - // [Application Load Balancers] The type of IP addresses used for public or - // private connections by the subnets attached to your load balancer. The possible - // values are ipv4 (for only IPv4 addresses), dualstack (for IPv4 and IPv6 addresses), - // and dualstack-without-public-ipv4 (for IPv6 only public addresses, with private - // IPv4 and IPv6 addresses). - // - // [Network Load Balancers and Gateway Load Balancers] The type of IP addresses - // used for public or private connections by the subnets attached to your load - // balancer. The possible values are ipv4 (for only IPv4 addresses) and dualstack - // (for IPv4 and IPv6 addresses). - IpAddressType *string `type:"string" enum:"IpAddressType"` - - // The Amazon Resource Name (ARN) of the load balancer. - LoadBalancerArn *string `type:"string"` - - // The name of the load balancer. - LoadBalancerName *string `type:"string"` - - // The nodes of an Internet-facing load balancer have public IP addresses. The - // DNS name of an Internet-facing load balancer is publicly resolvable to the - // public IP addresses of the nodes. Therefore, Internet-facing load balancers - // can route requests from clients over the internet. - // - // The nodes of an internal load balancer have only private IP addresses. The - // DNS name of an internal load balancer is publicly resolvable to the private - // IP addresses of the nodes. Therefore, internal load balancers can route requests - // only from clients with access to the VPC for the load balancer. - Scheme *string `type:"string" enum:"LoadBalancerSchemeEnum"` - - // The IDs of the security groups for the load balancer. - SecurityGroups []*string `type:"list"` - - // The state of the load balancer. - State *LoadBalancerState `type:"structure"` - - // The type of load balancer. - Type *string `type:"string" enum:"LoadBalancerTypeEnum"` - - // The ID of the VPC for the load balancer. - 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 LoadBalancer) 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 LoadBalancer) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *LoadBalancer) SetAvailabilityZones(v []*AvailabilityZone) *LoadBalancer { - s.AvailabilityZones = v - return s -} - -// SetCanonicalHostedZoneId sets the CanonicalHostedZoneId field's value. -func (s *LoadBalancer) SetCanonicalHostedZoneId(v string) *LoadBalancer { - s.CanonicalHostedZoneId = &v - return s -} - -// SetCreatedTime sets the CreatedTime field's value. -func (s *LoadBalancer) SetCreatedTime(v time.Time) *LoadBalancer { - s.CreatedTime = &v - return s -} - -// SetCustomerOwnedIpv4Pool sets the CustomerOwnedIpv4Pool field's value. -func (s *LoadBalancer) SetCustomerOwnedIpv4Pool(v string) *LoadBalancer { - s.CustomerOwnedIpv4Pool = &v - return s -} - -// SetDNSName sets the DNSName field's value. -func (s *LoadBalancer) SetDNSName(v string) *LoadBalancer { - s.DNSName = &v - return s -} - -// SetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic sets the EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic field's value. -func (s *LoadBalancer) SetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(v string) *LoadBalancer { - s.EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic = &v - return s -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *LoadBalancer) SetIpAddressType(v string) *LoadBalancer { - s.IpAddressType = &v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *LoadBalancer) SetLoadBalancerArn(v string) *LoadBalancer { - s.LoadBalancerArn = &v - return s -} - -// SetLoadBalancerName sets the LoadBalancerName field's value. -func (s *LoadBalancer) SetLoadBalancerName(v string) *LoadBalancer { - s.LoadBalancerName = &v - return s -} - -// SetScheme sets the Scheme field's value. -func (s *LoadBalancer) SetScheme(v string) *LoadBalancer { - s.Scheme = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *LoadBalancer) SetSecurityGroups(v []*string) *LoadBalancer { - s.SecurityGroups = v - return s -} - -// SetState sets the State field's value. -func (s *LoadBalancer) SetState(v *LoadBalancerState) *LoadBalancer { - s.State = v - return s -} - -// SetType sets the Type field's value. -func (s *LoadBalancer) SetType(v string) *LoadBalancer { - s.Type = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *LoadBalancer) SetVpcId(v string) *LoadBalancer { - s.VpcId = &v - return s -} - -// Information about a static IP address for a load balancer. -type LoadBalancerAddress struct { - _ struct{} `type:"structure"` - - // [Network Load Balancers] The allocation ID of the Elastic IP address for - // an internal-facing load balancer. - AllocationId *string `type:"string"` - - // [Network Load Balancers] The IPv6 address. - IPv6Address *string `type:"string"` - - // The static IP address. - IpAddress *string `type:"string"` - - // [Network Load Balancers] The private IPv4 address for an internal load balancer. - PrivateIPv4Address *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 LoadBalancerAddress) 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 LoadBalancerAddress) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *LoadBalancerAddress) SetAllocationId(v string) *LoadBalancerAddress { - s.AllocationId = &v - return s -} - -// SetIPv6Address sets the IPv6Address field's value. -func (s *LoadBalancerAddress) SetIPv6Address(v string) *LoadBalancerAddress { - s.IPv6Address = &v - return s -} - -// SetIpAddress sets the IpAddress field's value. -func (s *LoadBalancerAddress) SetIpAddress(v string) *LoadBalancerAddress { - s.IpAddress = &v - return s -} - -// SetPrivateIPv4Address sets the PrivateIPv4Address field's value. -func (s *LoadBalancerAddress) SetPrivateIPv4Address(v string) *LoadBalancerAddress { - s.PrivateIPv4Address = &v - return s -} - -// Information about a load balancer attribute. -type LoadBalancerAttribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - // - // The following attributes are supported by all load balancers: - // - // * deletion_protection.enabled - Indicates whether deletion protection - // is enabled. The value is true or false. The default is false. - // - // * load_balancing.cross_zone.enabled - Indicates whether cross-zone load - // balancing is enabled. The possible values are true and false. The default - // for Network Load Balancers and Gateway Load Balancers is false. The default - // for Application Load Balancers is true, and cannot be changed. - // - // The following attributes are supported by both Application Load Balancers - // and Network Load Balancers: - // - // * access_logs.s3.enabled - Indicates whether access logs are enabled. - // The value is true or false. The default is false. - // - // * access_logs.s3.bucket - The name of the S3 bucket for the access logs. - // This attribute is required if access logs are enabled. The bucket must - // exist in the same region as the load balancer and have a bucket policy - // that grants Elastic Load Balancing permissions to write to the bucket. - // - // * access_logs.s3.prefix - The prefix for the location in the S3 bucket - // for the access logs. - // - // * ipv6.deny_all_igw_traffic - Blocks internet gateway (IGW) access to - // the load balancer. It is set to false for internet-facing load balancers - // and true for internal load balancers, preventing unintended access to - // your internal load balancer through an internet gateway. - // - // The following attributes are supported by only Application Load Balancers: - // - // * idle_timeout.timeout_seconds - The idle timeout value, in seconds. The - // valid range is 1-4000 seconds. The default is 60 seconds. - // - // * client_keep_alive.seconds - The client keep alive value, in seconds. - // The valid range is 60-604800 seconds. The default is 3600 seconds. - // - // * connection_logs.s3.enabled - Indicates whether connection logs are enabled. - // The value is true or false. The default is false. - // - // * connection_logs.s3.bucket - The name of the S3 bucket for the connection - // logs. This attribute is required if connection logs are enabled. The bucket - // must exist in the same region as the load balancer and have a bucket policy - // that grants Elastic Load Balancing permissions to write to the bucket. - // - // * connection_logs.s3.prefix - The prefix for the location in the S3 bucket - // for the connection logs. - // - // * routing.http.desync_mitigation_mode - Determines how the load balancer - // handles requests that might pose a security risk to your application. - // The possible values are monitor, defensive, and strictest. The default - // is defensive. - // - // * routing.http.drop_invalid_header_fields.enabled - Indicates whether - // HTTP headers with invalid header fields are removed by the load balancer - // (true) or routed to targets (false). The default is false. - // - // * routing.http.preserve_host_header.enabled - Indicates whether the Application - // Load Balancer should preserve the Host header in the HTTP request and - // send it to the target without any change. The possible values are true - // and false. The default is false. - // - // * routing.http.x_amzn_tls_version_and_cipher_suite.enabled - Indicates - // whether the two headers (x-amzn-tls-version and x-amzn-tls-cipher-suite), - // which contain information about the negotiated TLS version and cipher - // suite, are added to the client request before sending it to the target. - // The x-amzn-tls-version header has information about the TLS protocol version - // negotiated with the client, and the x-amzn-tls-cipher-suite header has - // information about the cipher suite negotiated with the client. Both headers - // are in OpenSSL format. The possible values for the attribute are true - // and false. The default is false. - // - // * routing.http.xff_client_port.enabled - Indicates whether the X-Forwarded-For - // header should preserve the source port that the client used to connect - // to the load balancer. The possible values are true and false. The default - // is false. - // - // * routing.http.xff_header_processing.mode - Enables you to modify, preserve, - // or remove the X-Forwarded-For header in the HTTP request before the Application - // Load Balancer sends the request to the target. The possible values are - // append, preserve, and remove. The default is append. If the value is append, - // the Application Load Balancer adds the client IP address (of the last - // hop) to the X-Forwarded-For header in the HTTP request before it sends - // it to targets. If the value is preserve the Application Load Balancer - // preserves the X-Forwarded-For header in the HTTP request, and sends it - // to targets without any change. If the value is remove, the Application - // Load Balancer removes the X-Forwarded-For header in the HTTP request before - // it sends it to targets. - // - // * routing.http2.enabled - Indicates whether HTTP/2 is enabled. The possible - // values are true and false. The default is true. Elastic Load Balancing - // requires that message header names contain only alphanumeric characters - // and hyphens. - // - // * waf.fail_open.enabled - Indicates whether to allow a WAF-enabled load - // balancer to route requests to targets if it is unable to forward the request - // to Amazon Web Services WAF. The possible values are true and false. The - // default is false. - // - // The following attributes are supported by only Network Load Balancers: - // - // * dns_record.client_routing_policy - Indicates how traffic is distributed - // among the load balancer Availability Zones. The possible values are availability_zone_affinity - // with 100 percent zonal affinity, partial_availability_zone_affinity with - // 85 percent zonal affinity, and any_availability_zone with 0 percent zonal - // affinity. - Key *string `type:"string"` - - // The value of the attribute. - Value *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 LoadBalancerAttribute) 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 LoadBalancerAttribute) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *LoadBalancerAttribute) SetKey(v string) *LoadBalancerAttribute { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *LoadBalancerAttribute) SetValue(v string) *LoadBalancerAttribute { - s.Value = &v - return s -} - -// Information about the state of the load balancer. -type LoadBalancerState struct { - _ struct{} `type:"structure"` - - // The state code. The initial state of the load balancer is provisioning. After - // the load balancer is fully set up and ready to route traffic, its state is - // active. If load balancer is routing traffic but does not have the resources - // it needs to scale, its state isactive_impaired. If the load balancer could - // not be set up, its state is failed. - Code *string `type:"string" enum:"LoadBalancerStateEnum"` - - // A description of the state. - Reason *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 LoadBalancerState) 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 LoadBalancerState) GoString() string { - return s.String() -} - -// SetCode sets the Code field's value. -func (s *LoadBalancerState) SetCode(v string) *LoadBalancerState { - s.Code = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *LoadBalancerState) SetReason(v string) *LoadBalancerState { - s.Reason = &v - return s -} - -// The codes to use when checking for a successful response from a target. If -// the protocol version is gRPC, these are gRPC codes. Otherwise, these are -// HTTP codes. -type Matcher struct { - _ struct{} `type:"structure"` - - // You can specify values between 0 and 99. You can specify multiple values - // (for example, "0,1") or a range of values (for example, "0-5"). The default - // value is 12. - GrpcCode *string `type:"string"` - - // For Application Load Balancers, you can specify values between 200 and 499, - // with the default value being 200. You can specify multiple values (for example, - // "200,202") or a range of values (for example, "200-299"). - // - // For Network Load Balancers, you can specify values between 200 and 599, with - // the default value being 200-399. You can specify multiple values (for example, - // "200,202") or a range of values (for example, "200-299"). - // - // For Gateway Load Balancers, this must be "200–399". - // - // Note that when using shorthand syntax, some values such as commas need to - // be escaped. - HttpCode *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 Matcher) 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 Matcher) GoString() string { - return s.String() -} - -// SetGrpcCode sets the GrpcCode field's value. -func (s *Matcher) SetGrpcCode(v string) *Matcher { - s.GrpcCode = &v - return s -} - -// SetHttpCode sets the HttpCode field's value. -func (s *Matcher) SetHttpCode(v string) *Matcher { - s.HttpCode = &v - return s -} - -type ModifyListenerInput struct { - _ struct{} `type:"structure"` - - // [TLS listeners] The name of the Application-Layer Protocol Negotiation (ALPN) - // policy. You can specify one policy name. The following are the possible values: - // - // * HTTP1Only - // - // * HTTP2Only - // - // * HTTP2Optional - // - // * HTTP2Preferred - // - // * None - // - // For more information, see ALPN policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#alpn-policies) - // in the Network Load Balancers Guide. - AlpnPolicy []*string `type:"list"` - - // [HTTPS and TLS listeners] The default certificate for the listener. You must - // provide exactly one certificate. Set CertificateArn to the certificate ARN - // but do not set IsDefault. - Certificates []*Certificate `type:"list"` - - // The actions for the default rule. - DefaultActions []*Action `type:"list"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *string `type:"string" required:"true"` - - // The mutual authentication configuration information. - MutualAuthentication *MutualAuthenticationAttributes `type:"structure"` - - // The port for connections from clients to the load balancer. You cannot specify - // a port for a Gateway Load Balancer. - Port *int64 `min:"1" type:"integer"` - - // The protocol for connections from clients to the load balancer. Application - // Load Balancers support the HTTP and HTTPS protocols. Network Load Balancers - // support the TCP, TLS, UDP, and TCP_UDP protocols. You can’t change the - // protocol to UDP or TCP_UDP if dual-stack mode is enabled. You cannot specify - // a protocol for a Gateway Load Balancer. - Protocol *string `type:"string" enum:"ProtocolEnum"` - - // [HTTPS and TLS listeners] The security policy that defines which protocols - // and ciphers are supported. - // - // For more information, see Security policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/create-https-listener.html#describe-ssl-policies) - // in the Application Load Balancers Guide or Security policies (https://docs.aws.amazon.com/elasticloadbalancing/latest/network/create-tls-listener.html#describe-ssl-policies) - // in the Network Load Balancers Guide. - SslPolicy *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 ModifyListenerInput) 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 ModifyListenerInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyListenerInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyListenerInput"} - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - if s.DefaultActions != nil { - for i, v := range s.DefaultActions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "DefaultActions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAlpnPolicy sets the AlpnPolicy field's value. -func (s *ModifyListenerInput) SetAlpnPolicy(v []*string) *ModifyListenerInput { - s.AlpnPolicy = v - return s -} - -// SetCertificates sets the Certificates field's value. -func (s *ModifyListenerInput) SetCertificates(v []*Certificate) *ModifyListenerInput { - s.Certificates = v - return s -} - -// SetDefaultActions sets the DefaultActions field's value. -func (s *ModifyListenerInput) SetDefaultActions(v []*Action) *ModifyListenerInput { - s.DefaultActions = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *ModifyListenerInput) SetListenerArn(v string) *ModifyListenerInput { - s.ListenerArn = &v - return s -} - -// SetMutualAuthentication sets the MutualAuthentication field's value. -func (s *ModifyListenerInput) SetMutualAuthentication(v *MutualAuthenticationAttributes) *ModifyListenerInput { - s.MutualAuthentication = v - return s -} - -// SetPort sets the Port field's value. -func (s *ModifyListenerInput) SetPort(v int64) *ModifyListenerInput { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *ModifyListenerInput) SetProtocol(v string) *ModifyListenerInput { - s.Protocol = &v - return s -} - -// SetSslPolicy sets the SslPolicy field's value. -func (s *ModifyListenerInput) SetSslPolicy(v string) *ModifyListenerInput { - s.SslPolicy = &v - return s -} - -type ModifyListenerOutput struct { - _ struct{} `type:"structure"` - - // Information about the modified listener. - Listeners []*Listener `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 ModifyListenerOutput) 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 ModifyListenerOutput) GoString() string { - return s.String() -} - -// SetListeners sets the Listeners field's value. -func (s *ModifyListenerOutput) SetListeners(v []*Listener) *ModifyListenerOutput { - s.Listeners = v - return s -} - -type ModifyLoadBalancerAttributesInput struct { - _ struct{} `type:"structure"` - - // The load balancer attributes. - // - // Attributes is a required field - Attributes []*LoadBalancerAttribute `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *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 ModifyLoadBalancerAttributesInput) 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 ModifyLoadBalancerAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyLoadBalancerAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyLoadBalancerAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *ModifyLoadBalancerAttributesInput) SetAttributes(v []*LoadBalancerAttribute) *ModifyLoadBalancerAttributesInput { - s.Attributes = v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *ModifyLoadBalancerAttributesInput) SetLoadBalancerArn(v string) *ModifyLoadBalancerAttributesInput { - s.LoadBalancerArn = &v - return s -} - -type ModifyLoadBalancerAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the load balancer attributes. - Attributes []*LoadBalancerAttribute `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 ModifyLoadBalancerAttributesOutput) 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 ModifyLoadBalancerAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *ModifyLoadBalancerAttributesOutput) SetAttributes(v []*LoadBalancerAttribute) *ModifyLoadBalancerAttributesOutput { - s.Attributes = v - return s -} - -type ModifyRuleInput struct { - _ struct{} `type:"structure"` - - // The actions. - Actions []*Action `type:"list"` - - // The conditions. - Conditions []*RuleCondition `type:"list"` - - // The Amazon Resource Name (ARN) of the rule. - // - // RuleArn is a required field - RuleArn *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 ModifyRuleInput) 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 ModifyRuleInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyRuleInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyRuleInput"} - if s.RuleArn == nil { - invalidParams.Add(request.NewErrParamRequired("RuleArn")) - } - if s.Actions != nil { - for i, v := range s.Actions { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Actions", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetActions sets the Actions field's value. -func (s *ModifyRuleInput) SetActions(v []*Action) *ModifyRuleInput { - s.Actions = v - return s -} - -// SetConditions sets the Conditions field's value. -func (s *ModifyRuleInput) SetConditions(v []*RuleCondition) *ModifyRuleInput { - s.Conditions = v - return s -} - -// SetRuleArn sets the RuleArn field's value. -func (s *ModifyRuleInput) SetRuleArn(v string) *ModifyRuleInput { - s.RuleArn = &v - return s -} - -type ModifyRuleOutput struct { - _ struct{} `type:"structure"` - - // Information about the modified rule. - Rules []*Rule `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 ModifyRuleOutput) 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 ModifyRuleOutput) GoString() string { - return s.String() -} - -// SetRules sets the Rules field's value. -func (s *ModifyRuleOutput) SetRules(v []*Rule) *ModifyRuleOutput { - s.Rules = v - return s -} - -type ModifyTargetGroupAttributesInput struct { - _ struct{} `type:"structure"` - - // The attributes. - // - // Attributes is a required field - Attributes []*TargetGroupAttribute `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *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 ModifyTargetGroupAttributesInput) 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 ModifyTargetGroupAttributesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyTargetGroupAttributesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyTargetGroupAttributesInput"} - if s.Attributes == nil { - invalidParams.Add(request.NewErrParamRequired("Attributes")) - } - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAttributes sets the Attributes field's value. -func (s *ModifyTargetGroupAttributesInput) SetAttributes(v []*TargetGroupAttribute) *ModifyTargetGroupAttributesInput { - s.Attributes = v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *ModifyTargetGroupAttributesInput) SetTargetGroupArn(v string) *ModifyTargetGroupAttributesInput { - s.TargetGroupArn = &v - return s -} - -type ModifyTargetGroupAttributesOutput struct { - _ struct{} `type:"structure"` - - // Information about the attributes. - Attributes []*TargetGroupAttribute `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 ModifyTargetGroupAttributesOutput) 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 ModifyTargetGroupAttributesOutput) GoString() string { - return s.String() -} - -// SetAttributes sets the Attributes field's value. -func (s *ModifyTargetGroupAttributesOutput) SetAttributes(v []*TargetGroupAttribute) *ModifyTargetGroupAttributesOutput { - s.Attributes = v - return s -} - -type ModifyTargetGroupInput struct { - _ struct{} `type:"structure"` - - // Indicates whether health checks are enabled. - HealthCheckEnabled *bool `type:"boolean"` - - // The approximate amount of time, in seconds, between health checks of an individual - // target. - HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` - - // [HTTP/HTTPS health checks] The destination for health checks on the targets. - // - // [HTTP1 or HTTP2 protocol version] The ping path. The default is /. - // - // [GRPC protocol version] The path of a custom health check method with the - // format /package.service/method. The default is /Amazon Web Services.ALB/healthcheck. - HealthCheckPath *string `min:"1" type:"string"` - - // The port the load balancer uses when performing health checks on targets. - HealthCheckPort *string `type:"string"` - - // The protocol the load balancer uses when performing health checks on targets. - // For Application Load Balancers, the default is HTTP. For Network Load Balancers - // and Gateway Load Balancers, the default is TCP. The TCP protocol is not supported - // for health checks if the protocol of the target group is HTTP or HTTPS. It - // is supported for health checks only if the protocol of the target group is - // TCP, TLS, UDP, or TCP_UDP. The GENEVE, TLS, UDP, and TCP_UDP protocols are - // not supported for health checks. - HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` - - // [HTTP/HTTPS health checks] The amount of time, in seconds, during which no - // response means a failed health check. - HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` - - // The number of consecutive health checks successes required before considering - // an unhealthy target healthy. - HealthyThresholdCount *int64 `min:"2" type:"integer"` - - // [HTTP/HTTPS health checks] The HTTP or gRPC codes to use when checking for - // a successful response from a target. For target groups with a protocol of - // TCP, TCP_UDP, UDP or TLS the range is 200-599. For target groups with a protocol - // of HTTP or HTTPS, the range is 200-499. For target groups with a protocol - // of GENEVE, the range is 200-399. - Matcher *Matcher `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` - - // The number of consecutive health check failures required before considering - // the target unhealthy. - UnhealthyThresholdCount *int64 `min:"2" 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 ModifyTargetGroupInput) 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 ModifyTargetGroupInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyTargetGroupInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyTargetGroupInput"} - if s.HealthCheckIntervalSeconds != nil && *s.HealthCheckIntervalSeconds < 5 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckIntervalSeconds", 5)) - } - if s.HealthCheckPath != nil && len(*s.HealthCheckPath) < 1 { - invalidParams.Add(request.NewErrParamMinLen("HealthCheckPath", 1)) - } - if s.HealthCheckTimeoutSeconds != nil && *s.HealthCheckTimeoutSeconds < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthCheckTimeoutSeconds", 2)) - } - if s.HealthyThresholdCount != nil && *s.HealthyThresholdCount < 2 { - invalidParams.Add(request.NewErrParamMinValue("HealthyThresholdCount", 2)) - } - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - if s.UnhealthyThresholdCount != nil && *s.UnhealthyThresholdCount < 2 { - invalidParams.Add(request.NewErrParamMinValue("UnhealthyThresholdCount", 2)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHealthCheckEnabled sets the HealthCheckEnabled field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckEnabled(v bool) *ModifyTargetGroupInput { - s.HealthCheckEnabled = &v - return s -} - -// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckIntervalSeconds(v int64) *ModifyTargetGroupInput { - s.HealthCheckIntervalSeconds = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckPath(v string) *ModifyTargetGroupInput { - s.HealthCheckPath = &v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckPort(v string) *ModifyTargetGroupInput { - s.HealthCheckPort = &v - return s -} - -// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckProtocol(v string) *ModifyTargetGroupInput { - s.HealthCheckProtocol = &v - return s -} - -// SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value. -func (s *ModifyTargetGroupInput) SetHealthCheckTimeoutSeconds(v int64) *ModifyTargetGroupInput { - s.HealthCheckTimeoutSeconds = &v - return s -} - -// SetHealthyThresholdCount sets the HealthyThresholdCount field's value. -func (s *ModifyTargetGroupInput) SetHealthyThresholdCount(v int64) *ModifyTargetGroupInput { - s.HealthyThresholdCount = &v - return s -} - -// SetMatcher sets the Matcher field's value. -func (s *ModifyTargetGroupInput) SetMatcher(v *Matcher) *ModifyTargetGroupInput { - s.Matcher = v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *ModifyTargetGroupInput) SetTargetGroupArn(v string) *ModifyTargetGroupInput { - s.TargetGroupArn = &v - return s -} - -// SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value. -func (s *ModifyTargetGroupInput) SetUnhealthyThresholdCount(v int64) *ModifyTargetGroupInput { - s.UnhealthyThresholdCount = &v - return s -} - -type ModifyTargetGroupOutput struct { - _ struct{} `type:"structure"` - - // Information about the modified target group. - TargetGroups []*TargetGroup `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 ModifyTargetGroupOutput) 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 ModifyTargetGroupOutput) GoString() string { - return s.String() -} - -// SetTargetGroups sets the TargetGroups field's value. -func (s *ModifyTargetGroupOutput) SetTargetGroups(v []*TargetGroup) *ModifyTargetGroupOutput { - s.TargetGroups = v - return s -} - -type ModifyTrustStoreInput struct { - _ struct{} `type:"structure"` - - // The Amazon S3 bucket for the ca certificates bundle. - // - // CaCertificatesBundleS3Bucket is a required field - CaCertificatesBundleS3Bucket *string `type:"string" required:"true"` - - // The Amazon S3 path for the ca certificates bundle. - // - // CaCertificatesBundleS3Key is a required field - CaCertificatesBundleS3Key *string `type:"string" required:"true"` - - // The Amazon S3 object version for the ca certificates bundle. If undefined - // the current version is used. - CaCertificatesBundleS3ObjectVersion *string `type:"string"` - - // The Amazon Resource Name (ARN) of the trust store. - // - // TrustStoreArn is a required field - TrustStoreArn *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 ModifyTrustStoreInput) 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 ModifyTrustStoreInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *ModifyTrustStoreInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "ModifyTrustStoreInput"} - if s.CaCertificatesBundleS3Bucket == nil { - invalidParams.Add(request.NewErrParamRequired("CaCertificatesBundleS3Bucket")) - } - if s.CaCertificatesBundleS3Key == nil { - invalidParams.Add(request.NewErrParamRequired("CaCertificatesBundleS3Key")) - } - if s.TrustStoreArn == nil { - invalidParams.Add(request.NewErrParamRequired("TrustStoreArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCaCertificatesBundleS3Bucket sets the CaCertificatesBundleS3Bucket field's value. -func (s *ModifyTrustStoreInput) SetCaCertificatesBundleS3Bucket(v string) *ModifyTrustStoreInput { - s.CaCertificatesBundleS3Bucket = &v - return s -} - -// SetCaCertificatesBundleS3Key sets the CaCertificatesBundleS3Key field's value. -func (s *ModifyTrustStoreInput) SetCaCertificatesBundleS3Key(v string) *ModifyTrustStoreInput { - s.CaCertificatesBundleS3Key = &v - return s -} - -// SetCaCertificatesBundleS3ObjectVersion sets the CaCertificatesBundleS3ObjectVersion field's value. -func (s *ModifyTrustStoreInput) SetCaCertificatesBundleS3ObjectVersion(v string) *ModifyTrustStoreInput { - s.CaCertificatesBundleS3ObjectVersion = &v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *ModifyTrustStoreInput) SetTrustStoreArn(v string) *ModifyTrustStoreInput { - s.TrustStoreArn = &v - return s -} - -type ModifyTrustStoreOutput struct { - _ struct{} `type:"structure"` - - // Information about the modified trust store. - TrustStores []*TrustStore `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 ModifyTrustStoreOutput) 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 ModifyTrustStoreOutput) GoString() string { - return s.String() -} - -// SetTrustStores sets the TrustStores field's value. -func (s *ModifyTrustStoreOutput) SetTrustStores(v []*TrustStore) *ModifyTrustStoreOutput { - s.TrustStores = v - return s -} - -// Information about the mutual authentication attributes of a listener. -type MutualAuthenticationAttributes struct { - _ struct{} `type:"structure"` - - // Indicates whether expired client certificates are ignored. - IgnoreClientCertificateExpiry *bool `type:"boolean"` - - // The client certificate handling method. Options are off, passthrough or verify. - // The default value is off. - Mode *string `type:"string"` - - // The Amazon Resource Name (ARN) of the trust store. - TrustStoreArn *string `type:"string"` - - // Indicates a shared trust stores association status. - TrustStoreAssociationStatus *string `type:"string" enum:"TrustStoreAssociationStatusEnum"` -} - -// 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 MutualAuthenticationAttributes) 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 MutualAuthenticationAttributes) GoString() string { - return s.String() -} - -// SetIgnoreClientCertificateExpiry sets the IgnoreClientCertificateExpiry field's value. -func (s *MutualAuthenticationAttributes) SetIgnoreClientCertificateExpiry(v bool) *MutualAuthenticationAttributes { - s.IgnoreClientCertificateExpiry = &v - return s -} - -// SetMode sets the Mode field's value. -func (s *MutualAuthenticationAttributes) SetMode(v string) *MutualAuthenticationAttributes { - s.Mode = &v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *MutualAuthenticationAttributes) SetTrustStoreArn(v string) *MutualAuthenticationAttributes { - s.TrustStoreArn = &v - return s -} - -// SetTrustStoreAssociationStatus sets the TrustStoreAssociationStatus field's value. -func (s *MutualAuthenticationAttributes) SetTrustStoreAssociationStatus(v string) *MutualAuthenticationAttributes { - s.TrustStoreAssociationStatus = &v - return s -} - -// Information about a path pattern condition. -type PathPatternConditionConfig struct { - _ struct{} `type:"structure"` - - // The path patterns to compare against the request URL. The maximum size of - // each string is 128 characters. The comparison is case sensitive. The following - // wildcard characters are supported: * (matches 0 or more characters) and ? - // (matches exactly 1 character). - // - // If you specify multiple strings, the condition is satisfied if one of them - // matches the request URL. The path pattern is compared only to the path of - // the URL, not to its query string. To compare against the query string, use - // QueryStringConditionConfig. - 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 PathPatternConditionConfig) 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 PathPatternConditionConfig) GoString() string { - return s.String() -} - -// SetValues sets the Values field's value. -func (s *PathPatternConditionConfig) SetValues(v []*string) *PathPatternConditionConfig { - s.Values = v - return s -} - -// Information about a query string condition. -// -// The query string component of a URI starts after the first '?' character -// and is terminated by either a '#' character or the end of the URI. A typical -// query string contains key/value pairs separated by '&' characters. The allowed -// characters are specified by RFC 3986. Any character can be percentage encoded. -type QueryStringConditionConfig struct { - _ struct{} `type:"structure"` - - // The key/value pairs or values to find in the query string. The maximum size - // of each string is 128 characters. The comparison is case insensitive. The - // following wildcard characters are supported: * (matches 0 or more characters) - // and ? (matches exactly 1 character). To search for a literal '*' or '?' character - // in a query string, you must escape these characters in Values using a '\' - // character. - // - // If you specify multiple key/value pairs or values, the condition is satisfied - // if one of them is found in the query string. - Values []*QueryStringKeyValuePair `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 QueryStringConditionConfig) 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 QueryStringConditionConfig) GoString() string { - return s.String() -} - -// SetValues sets the Values field's value. -func (s *QueryStringConditionConfig) SetValues(v []*QueryStringKeyValuePair) *QueryStringConditionConfig { - s.Values = v - return s -} - -// Information about a key/value pair. -type QueryStringKeyValuePair struct { - _ struct{} `type:"structure"` - - // The key. You can omit the key. - Key *string `type:"string"` - - // The value. - Value *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 QueryStringKeyValuePair) 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 QueryStringKeyValuePair) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *QueryStringKeyValuePair) SetKey(v string) *QueryStringKeyValuePair { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *QueryStringKeyValuePair) SetValue(v string) *QueryStringKeyValuePair { - s.Value = &v - return s -} - -// Information about a redirect action. -// -// A URI consists of the following components: protocol://hostname:port/path?query. -// You must modify at least one of the following components to avoid a redirect -// loop: protocol, hostname, port, or path. Any components that you do not modify -// retain their original values. -// -// You can reuse URI components using the following reserved keywords: -// -// - #{protocol} -// -// - #{host} -// -// - #{port} -// -// - #{path} (the leading "/" is removed) -// -// - #{query} -// -// For example, you can change the path to "/new/#{path}", the hostname to "example.#{host}", -// or the query to "#{query}&value=xyz". -type RedirectActionConfig struct { - _ struct{} `type:"structure"` - - // The hostname. This component is not percent-encoded. The hostname can contain - // #{host}. - Host *string `min:"1" type:"string"` - - // The absolute path, starting with the leading "/". This component is not percent-encoded. - // The path can contain #{host}, #{path}, and #{port}. - Path *string `min:"1" type:"string"` - - // The port. You can specify a value from 1 to 65535 or #{port}. - Port *string `type:"string"` - - // The protocol. You can specify HTTP, HTTPS, or #{protocol}. You can redirect - // HTTP to HTTP, HTTP to HTTPS, and HTTPS to HTTPS. You cannot redirect HTTPS - // to HTTP. - Protocol *string `type:"string"` - - // The query parameters, URL-encoded when necessary, but not percent-encoded. - // Do not include the leading "?", as it is automatically added. You can specify - // any of the reserved keywords. - Query *string `type:"string"` - - // The HTTP redirect code. The redirect is either permanent (HTTP 301) or temporary - // (HTTP 302). - // - // StatusCode is a required field - StatusCode *string `type:"string" required:"true" enum:"RedirectActionStatusCodeEnum"` -} - -// 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 RedirectActionConfig) 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 RedirectActionConfig) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RedirectActionConfig) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RedirectActionConfig"} - if s.Host != nil && len(*s.Host) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Host", 1)) - } - if s.Path != nil && len(*s.Path) < 1 { - invalidParams.Add(request.NewErrParamMinLen("Path", 1)) - } - if s.StatusCode == nil { - invalidParams.Add(request.NewErrParamRequired("StatusCode")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetHost sets the Host field's value. -func (s *RedirectActionConfig) SetHost(v string) *RedirectActionConfig { - s.Host = &v - return s -} - -// SetPath sets the Path field's value. -func (s *RedirectActionConfig) SetPath(v string) *RedirectActionConfig { - s.Path = &v - return s -} - -// SetPort sets the Port field's value. -func (s *RedirectActionConfig) SetPort(v string) *RedirectActionConfig { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *RedirectActionConfig) SetProtocol(v string) *RedirectActionConfig { - s.Protocol = &v - return s -} - -// SetQuery sets the Query field's value. -func (s *RedirectActionConfig) SetQuery(v string) *RedirectActionConfig { - s.Query = &v - return s -} - -// SetStatusCode sets the StatusCode field's value. -func (s *RedirectActionConfig) SetStatusCode(v string) *RedirectActionConfig { - s.StatusCode = &v - return s -} - -type RegisterTargetsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - // - // TargetGroupArn is a required field - TargetGroupArn *string `type:"string" required:"true"` - - // The targets. - // - // Targets is a required field - Targets []*TargetDescription `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 RegisterTargetsInput) 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 RegisterTargetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RegisterTargetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RegisterTargetsInput"} - if s.TargetGroupArn == nil { - invalidParams.Add(request.NewErrParamRequired("TargetGroupArn")) - } - if s.Targets == nil { - invalidParams.Add(request.NewErrParamRequired("Targets")) - } - if s.Targets != nil { - for i, v := range s.Targets { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Targets", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *RegisterTargetsInput) SetTargetGroupArn(v string) *RegisterTargetsInput { - s.TargetGroupArn = &v - return s -} - -// SetTargets sets the Targets field's value. -func (s *RegisterTargetsInput) SetTargets(v []*TargetDescription) *RegisterTargetsInput { - s.Targets = v - return s -} - -type RegisterTargetsOutput 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 RegisterTargetsOutput) 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 RegisterTargetsOutput) GoString() string { - return s.String() -} - -type RemoveListenerCertificatesInput struct { - _ struct{} `type:"structure"` - - // The certificate to remove. You can specify one certificate per call. Set - // CertificateArn to the certificate ARN but do not set IsDefault. - // - // Certificates is a required field - Certificates []*Certificate `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the listener. - // - // ListenerArn is a required field - ListenerArn *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 RemoveListenerCertificatesInput) 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 RemoveListenerCertificatesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveListenerCertificatesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveListenerCertificatesInput"} - if s.Certificates == nil { - invalidParams.Add(request.NewErrParamRequired("Certificates")) - } - if s.ListenerArn == nil { - invalidParams.Add(request.NewErrParamRequired("ListenerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetCertificates sets the Certificates field's value. -func (s *RemoveListenerCertificatesInput) SetCertificates(v []*Certificate) *RemoveListenerCertificatesInput { - s.Certificates = v - return s -} - -// SetListenerArn sets the ListenerArn field's value. -func (s *RemoveListenerCertificatesInput) SetListenerArn(v string) *RemoveListenerCertificatesInput { - s.ListenerArn = &v - return s -} - -type RemoveListenerCertificatesOutput 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 RemoveListenerCertificatesOutput) 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 RemoveListenerCertificatesOutput) GoString() string { - return s.String() -} - -type RemoveTagsInput struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - // - // ResourceArns is a required field - ResourceArns []*string `type:"list" required:"true"` - - // The tag keys for the tags to remove. - // - // TagKeys is a required field - TagKeys []*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 RemoveTagsInput) 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 RemoveTagsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTagsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTagsInput"} - if s.ResourceArns == nil { - invalidParams.Add(request.NewErrParamRequired("ResourceArns")) - } - if s.TagKeys == nil { - invalidParams.Add(request.NewErrParamRequired("TagKeys")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetResourceArns sets the ResourceArns field's value. -func (s *RemoveTagsInput) SetResourceArns(v []*string) *RemoveTagsInput { - s.ResourceArns = v - return s -} - -// SetTagKeys sets the TagKeys field's value. -func (s *RemoveTagsInput) SetTagKeys(v []*string) *RemoveTagsInput { - s.TagKeys = v - return s -} - -type RemoveTagsOutput 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 RemoveTagsOutput) 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 RemoveTagsOutput) GoString() string { - return s.String() -} - -type RemoveTrustStoreRevocationsInput struct { - _ struct{} `type:"structure"` - - // The revocation IDs of the revocation files you want to remove. - // - // RevocationIds is a required field - RevocationIds []*int64 `type:"list" required:"true"` - - // The Amazon Resource Name (ARN) of the trust store. - // - // TrustStoreArn is a required field - TrustStoreArn *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 RemoveTrustStoreRevocationsInput) 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 RemoveTrustStoreRevocationsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RemoveTrustStoreRevocationsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RemoveTrustStoreRevocationsInput"} - if s.RevocationIds == nil { - invalidParams.Add(request.NewErrParamRequired("RevocationIds")) - } - if s.TrustStoreArn == nil { - invalidParams.Add(request.NewErrParamRequired("TrustStoreArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRevocationIds sets the RevocationIds field's value. -func (s *RemoveTrustStoreRevocationsInput) SetRevocationIds(v []*int64) *RemoveTrustStoreRevocationsInput { - s.RevocationIds = v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *RemoveTrustStoreRevocationsInput) SetTrustStoreArn(v string) *RemoveTrustStoreRevocationsInput { - s.TrustStoreArn = &v - return s -} - -type RemoveTrustStoreRevocationsOutput 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 RemoveTrustStoreRevocationsOutput) 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 RemoveTrustStoreRevocationsOutput) GoString() string { - return s.String() -} - -// Information about a revocation file. -type RevocationContent struct { - _ struct{} `type:"structure"` - - // The type of revocation file. - RevocationType *string `type:"string" enum:"RevocationType"` - - // The Amazon S3 bucket for the revocation file. - S3Bucket *string `type:"string"` - - // The Amazon S3 path for the revocation file. - S3Key *string `type:"string"` - - // The Amazon S3 object version of the revocation file. - S3ObjectVersion *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 RevocationContent) 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 RevocationContent) GoString() string { - return s.String() -} - -// SetRevocationType sets the RevocationType field's value. -func (s *RevocationContent) SetRevocationType(v string) *RevocationContent { - s.RevocationType = &v - return s -} - -// SetS3Bucket sets the S3Bucket field's value. -func (s *RevocationContent) SetS3Bucket(v string) *RevocationContent { - s.S3Bucket = &v - return s -} - -// SetS3Key sets the S3Key field's value. -func (s *RevocationContent) SetS3Key(v string) *RevocationContent { - s.S3Key = &v - return s -} - -// SetS3ObjectVersion sets the S3ObjectVersion field's value. -func (s *RevocationContent) SetS3ObjectVersion(v string) *RevocationContent { - s.S3ObjectVersion = &v - return s -} - -// Information about a rule. -type Rule struct { - _ struct{} `type:"structure"` - - // The actions. Each rule must include exactly one of the following types of - // actions: forward, redirect, or fixed-response, and it must be the last action - // to be performed. - Actions []*Action `type:"list"` - - // The conditions. Each rule can include zero or one of the following conditions: - // http-request-method, host-header, path-pattern, and source-ip, and zero or - // more of the following conditions: http-header and query-string. - Conditions []*RuleCondition `type:"list"` - - // Indicates whether this is the default rule. - IsDefault *bool `type:"boolean"` - - // The priority. - Priority *string `type:"string"` - - // The Amazon Resource Name (ARN) of the rule. - RuleArn *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 Rule) 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 Rule) GoString() string { - return s.String() -} - -// SetActions sets the Actions field's value. -func (s *Rule) SetActions(v []*Action) *Rule { - s.Actions = v - return s -} - -// SetConditions sets the Conditions field's value. -func (s *Rule) SetConditions(v []*RuleCondition) *Rule { - s.Conditions = v - return s -} - -// SetIsDefault sets the IsDefault field's value. -func (s *Rule) SetIsDefault(v bool) *Rule { - s.IsDefault = &v - return s -} - -// SetPriority sets the Priority field's value. -func (s *Rule) SetPriority(v string) *Rule { - s.Priority = &v - return s -} - -// SetRuleArn sets the RuleArn field's value. -func (s *Rule) SetRuleArn(v string) *Rule { - s.RuleArn = &v - return s -} - -// Information about a condition for a rule. -// -// Each rule can optionally include up to one of each of the following conditions: -// http-request-method, host-header, path-pattern, and source-ip. Each rule -// can also optionally include one or more of each of the following conditions: -// http-header and query-string. Note that the value for a condition cannot -// be empty. -// -// For more information, see Quotas for your Application Load Balancers (https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-limits.html). -type RuleCondition struct { - _ struct{} `type:"structure"` - - // The field in the HTTP request. The following are the possible values: - // - // * http-header - // - // * http-request-method - // - // * host-header - // - // * path-pattern - // - // * query-string - // - // * source-ip - Field *string `type:"string"` - - // Information for a host header condition. Specify only when Field is host-header. - HostHeaderConfig *HostHeaderConditionConfig `type:"structure"` - - // Information for an HTTP header condition. Specify only when Field is http-header. - HttpHeaderConfig *HttpHeaderConditionConfig `type:"structure"` - - // Information for an HTTP method condition. Specify only when Field is http-request-method. - HttpRequestMethodConfig *HttpRequestMethodConditionConfig `type:"structure"` - - // Information for a path pattern condition. Specify only when Field is path-pattern. - PathPatternConfig *PathPatternConditionConfig `type:"structure"` - - // Information for a query string condition. Specify only when Field is query-string. - QueryStringConfig *QueryStringConditionConfig `type:"structure"` - - // Information for a source IP condition. Specify only when Field is source-ip. - SourceIpConfig *SourceIpConditionConfig `type:"structure"` - - // The condition value. Specify only when Field is host-header or path-pattern. - // Alternatively, to specify multiple host names or multiple path patterns, - // use HostHeaderConfig or PathPatternConfig. - // - // If Field is host-header and you are not using HostHeaderConfig, you can specify - // a single host name (for example, my.example.com) in Values. A host name is - // case insensitive, can be up to 128 characters in length, and can contain - // any of the following characters. - // - // * A-Z, a-z, 0-9 - // - // * - . - // - // * * (matches 0 or more characters) - // - // * ? (matches exactly 1 character) - // - // If Field is path-pattern and you are not using PathPatternConfig, you can - // specify a single path pattern (for example, /img/*) in Values. A path pattern - // is case-sensitive, can be up to 128 characters in length, and can contain - // any of the following characters. - // - // * A-Z, a-z, 0-9 - // - // * _ - . $ / ~ " ' @ : + - // - // * & (using &) - // - // * * (matches 0 or more characters) - // - // * ? (matches exactly 1 character) - 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 RuleCondition) 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 RuleCondition) GoString() string { - return s.String() -} - -// SetField sets the Field field's value. -func (s *RuleCondition) SetField(v string) *RuleCondition { - s.Field = &v - return s -} - -// SetHostHeaderConfig sets the HostHeaderConfig field's value. -func (s *RuleCondition) SetHostHeaderConfig(v *HostHeaderConditionConfig) *RuleCondition { - s.HostHeaderConfig = v - return s -} - -// SetHttpHeaderConfig sets the HttpHeaderConfig field's value. -func (s *RuleCondition) SetHttpHeaderConfig(v *HttpHeaderConditionConfig) *RuleCondition { - s.HttpHeaderConfig = v - return s -} - -// SetHttpRequestMethodConfig sets the HttpRequestMethodConfig field's value. -func (s *RuleCondition) SetHttpRequestMethodConfig(v *HttpRequestMethodConditionConfig) *RuleCondition { - s.HttpRequestMethodConfig = v - return s -} - -// SetPathPatternConfig sets the PathPatternConfig field's value. -func (s *RuleCondition) SetPathPatternConfig(v *PathPatternConditionConfig) *RuleCondition { - s.PathPatternConfig = v - return s -} - -// SetQueryStringConfig sets the QueryStringConfig field's value. -func (s *RuleCondition) SetQueryStringConfig(v *QueryStringConditionConfig) *RuleCondition { - s.QueryStringConfig = v - return s -} - -// SetSourceIpConfig sets the SourceIpConfig field's value. -func (s *RuleCondition) SetSourceIpConfig(v *SourceIpConditionConfig) *RuleCondition { - s.SourceIpConfig = v - return s -} - -// SetValues sets the Values field's value. -func (s *RuleCondition) SetValues(v []*string) *RuleCondition { - s.Values = v - return s -} - -// Information about the priorities for the rules for a listener. -type RulePriorityPair struct { - _ struct{} `type:"structure"` - - // The rule priority. - Priority *int64 `min:"1" type:"integer"` - - // The Amazon Resource Name (ARN) of the rule. - RuleArn *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 RulePriorityPair) 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 RulePriorityPair) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *RulePriorityPair) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "RulePriorityPair"} - if s.Priority != nil && *s.Priority < 1 { - invalidParams.Add(request.NewErrParamMinValue("Priority", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetPriority sets the Priority field's value. -func (s *RulePriorityPair) SetPriority(v int64) *RulePriorityPair { - s.Priority = &v - return s -} - -// SetRuleArn sets the RuleArn field's value. -func (s *RulePriorityPair) SetRuleArn(v string) *RulePriorityPair { - s.RuleArn = &v - return s -} - -type SetIpAddressTypeInput struct { - _ struct{} `type:"structure"` - - // Note: Internal load balancers must use the ipv4 IP address type. - // - // [Application Load Balancers] The IP address type. The possible values are - // ipv4 (for only IPv4 addresses), dualstack (for IPv4 and IPv6 addresses), - // and dualstack-without-public-ipv4 (for IPv6 only public addresses, with private - // IPv4 and IPv6 addresses). - // - // Note: Application Load Balancer authentication only supports IPv4 addresses - // when connecting to an Identity Provider (IdP) or Amazon Cognito endpoint. - // Without a public IPv4 address the load balancer cannot complete the authentication - // process, resulting in HTTP 500 errors. - // - // [Network Load Balancers] The IP address type. The possible values are ipv4 - // (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). You - // can’t specify dualstack for a load balancer with a UDP or TCP_UDP listener. - // - // [Gateway Load Balancers] The IP address type. The possible values are ipv4 - // (for only IPv4 addresses) and dualstack (for IPv4 and IPv6 addresses). - // - // IpAddressType is a required field - IpAddressType *string `type:"string" required:"true" enum:"IpAddressType"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *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 SetIpAddressTypeInput) 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 SetIpAddressTypeInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetIpAddressTypeInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetIpAddressTypeInput"} - if s.IpAddressType == nil { - invalidParams.Add(request.NewErrParamRequired("IpAddressType")) - } - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *SetIpAddressTypeInput) SetIpAddressType(v string) *SetIpAddressTypeInput { - s.IpAddressType = &v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *SetIpAddressTypeInput) SetLoadBalancerArn(v string) *SetIpAddressTypeInput { - s.LoadBalancerArn = &v - return s -} - -type SetIpAddressTypeOutput struct { - _ struct{} `type:"structure"` - - // The IP address type. - IpAddressType *string `type:"string" enum:"IpAddressType"` -} - -// 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 SetIpAddressTypeOutput) 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 SetIpAddressTypeOutput) GoString() string { - return s.String() -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *SetIpAddressTypeOutput) SetIpAddressType(v string) *SetIpAddressTypeOutput { - s.IpAddressType = &v - return s -} - -type SetRulePrioritiesInput struct { - _ struct{} `type:"structure"` - - // The rule priorities. - // - // RulePriorities is a required field - RulePriorities []*RulePriorityPair `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 SetRulePrioritiesInput) 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 SetRulePrioritiesInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetRulePrioritiesInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetRulePrioritiesInput"} - if s.RulePriorities == nil { - invalidParams.Add(request.NewErrParamRequired("RulePriorities")) - } - if s.RulePriorities != nil { - for i, v := range s.RulePriorities { - if v == nil { - continue - } - if err := v.Validate(); err != nil { - invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RulePriorities", i), err.(request.ErrInvalidParams)) - } - } - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetRulePriorities sets the RulePriorities field's value. -func (s *SetRulePrioritiesInput) SetRulePriorities(v []*RulePriorityPair) *SetRulePrioritiesInput { - s.RulePriorities = v - return s -} - -type SetRulePrioritiesOutput struct { - _ struct{} `type:"structure"` - - // Information about the rules. - Rules []*Rule `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 SetRulePrioritiesOutput) 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 SetRulePrioritiesOutput) GoString() string { - return s.String() -} - -// SetRules sets the Rules field's value. -func (s *SetRulePrioritiesOutput) SetRules(v []*Rule) *SetRulePrioritiesOutput { - s.Rules = v - return s -} - -type SetSecurityGroupsInput struct { - _ struct{} `type:"structure"` - - // Indicates whether to evaluate inbound security group rules for traffic sent - // to a Network Load Balancer through Amazon Web Services PrivateLink. The default - // is on. - EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic *string `type:"string" enum:"EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` - - // The IDs of the 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 SetSecurityGroupsInput) 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 SetSecurityGroupsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSecurityGroupsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSecurityGroupsInput"} - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - if s.SecurityGroups == nil { - invalidParams.Add(request.NewErrParamRequired("SecurityGroups")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic sets the EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic field's value. -func (s *SetSecurityGroupsInput) SetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(v string) *SetSecurityGroupsInput { - s.EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic = &v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *SetSecurityGroupsInput) SetLoadBalancerArn(v string) *SetSecurityGroupsInput { - s.LoadBalancerArn = &v - return s -} - -// SetSecurityGroups sets the SecurityGroups field's value. -func (s *SetSecurityGroupsInput) SetSecurityGroups(v []*string) *SetSecurityGroupsInput { - s.SecurityGroups = v - return s -} - -type SetSecurityGroupsOutput struct { - _ struct{} `type:"structure"` - - // Indicates whether to evaluate inbound security group rules for traffic sent - // to a Network Load Balancer through Amazon Web Services PrivateLink. - EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic *string `type:"string" enum:"EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum"` - - // The IDs of the security groups associated with the load balancer. - SecurityGroupIds []*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 SetSecurityGroupsOutput) 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 SetSecurityGroupsOutput) GoString() string { - return s.String() -} - -// SetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic sets the EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic field's value. -func (s *SetSecurityGroupsOutput) SetEnforceSecurityGroupInboundRulesOnPrivateLinkTraffic(v string) *SetSecurityGroupsOutput { - s.EnforceSecurityGroupInboundRulesOnPrivateLinkTraffic = &v - return s -} - -// SetSecurityGroupIds sets the SecurityGroupIds field's value. -func (s *SetSecurityGroupsOutput) SetSecurityGroupIds(v []*string) *SetSecurityGroupsOutput { - s.SecurityGroupIds = v - return s -} - -type SetSubnetsInput struct { - _ struct{} `type:"structure"` - - // [Application Load Balancers] The IP address type. The possible values are - // ipv4 (for only IPv4 addresses), dualstack (for IPv4 and IPv6 addresses), - // and dualstack-without-public-ipv4 (for IPv6 only public addresses, with private - // IPv4 and IPv6 addresses). - // - // [Network Load Balancers] The type of IP addresses used by the subnets for - // your load balancer. The possible values are ipv4 (for IPv4 addresses) and - // dualstack (for IPv4 and IPv6 addresses). You can’t specify dualstack for - // a load balancer with a UDP or TCP_UDP listener. - // - // [Gateway Load Balancers] The type of IP addresses used by the subnets for - // your load balancer. The possible values are ipv4 (for IPv4 addresses) and - // dualstack (for IPv4 and IPv6 addresses). - IpAddressType *string `type:"string" enum:"IpAddressType"` - - // The Amazon Resource Name (ARN) of the load balancer. - // - // LoadBalancerArn is a required field - LoadBalancerArn *string `type:"string" required:"true"` - - // The IDs of the public subnets. You can specify only one subnet per Availability - // Zone. You must specify either subnets or subnet mappings. - // - // [Application Load Balancers] You must specify subnets from at least two Availability - // Zones. You cannot specify Elastic IP addresses for your subnets. - // - // [Application Load Balancers on Outposts] You must specify one Outpost subnet. - // - // [Application Load Balancers on Local Zones] You can specify subnets from - // one or more Local Zones. - // - // [Network Load Balancers] You can specify subnets from one or more Availability - // Zones. You can specify one Elastic IP address per subnet if you need static - // IP addresses for your internet-facing load balancer. For internal load balancers, - // you can specify one private IP address per subnet from the IPv4 range of - // the subnet. For internet-facing load balancer, you can specify one IPv6 address - // per subnet. - // - // [Gateway Load Balancers] You can specify subnets from one or more Availability - // Zones. - SubnetMappings []*SubnetMapping `type:"list"` - - // The IDs of the public subnets. You can specify only one subnet per Availability - // Zone. You must specify either subnets or subnet mappings. - // - // [Application Load Balancers] You must specify subnets from at least two Availability - // Zones. - // - // [Application Load Balancers on Outposts] You must specify one Outpost subnet. - // - // [Application Load Balancers on Local Zones] You can specify subnets from - // one or more Local Zones. - // - // [Network Load Balancers] You can specify subnets from one or more Availability - // Zones. - // - // [Gateway Load Balancers] You can specify subnets from one or more Availability - // Zones. - Subnets []*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 SetSubnetsInput) 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 SetSubnetsInput) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *SetSubnetsInput) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "SetSubnetsInput"} - if s.LoadBalancerArn == nil { - invalidParams.Add(request.NewErrParamRequired("LoadBalancerArn")) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *SetSubnetsInput) SetIpAddressType(v string) *SetSubnetsInput { - s.IpAddressType = &v - return s -} - -// SetLoadBalancerArn sets the LoadBalancerArn field's value. -func (s *SetSubnetsInput) SetLoadBalancerArn(v string) *SetSubnetsInput { - s.LoadBalancerArn = &v - return s -} - -// SetSubnetMappings sets the SubnetMappings field's value. -func (s *SetSubnetsInput) SetSubnetMappings(v []*SubnetMapping) *SetSubnetsInput { - s.SubnetMappings = v - return s -} - -// SetSubnets sets the Subnets field's value. -func (s *SetSubnetsInput) SetSubnets(v []*string) *SetSubnetsInput { - s.Subnets = v - return s -} - -type SetSubnetsOutput struct { - _ struct{} `type:"structure"` - - // Information about the subnets. - AvailabilityZones []*AvailabilityZone `type:"list"` - - // [Application Load Balancers] The IP address type. - // - // [Network Load Balancers] The IP address type. - // - // [Gateway Load Balancers] The IP address type. - IpAddressType *string `type:"string" enum:"IpAddressType"` -} - -// 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 SetSubnetsOutput) 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 SetSubnetsOutput) GoString() string { - return s.String() -} - -// SetAvailabilityZones sets the AvailabilityZones field's value. -func (s *SetSubnetsOutput) SetAvailabilityZones(v []*AvailabilityZone) *SetSubnetsOutput { - s.AvailabilityZones = v - return s -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *SetSubnetsOutput) SetIpAddressType(v string) *SetSubnetsOutput { - s.IpAddressType = &v - return s -} - -// Information about a source IP condition. -// -// You can use this condition to route based on the IP address of the source -// that connects to the load balancer. If a client is behind a proxy, this is -// the IP address of the proxy not the IP address of the client. -type SourceIpConditionConfig struct { - _ struct{} `type:"structure"` - - // The source IP addresses, in CIDR format. You can use both IPv4 and IPv6 addresses. - // Wildcards are not supported. - // - // If you specify multiple addresses, the condition is satisfied if the source - // IP address of the request matches one of the CIDR blocks. This condition - // is not satisfied by the addresses in the X-Forwarded-For header. To search - // for addresses in the X-Forwarded-For header, use HttpHeaderConditionConfig. - // - // The total number of values must be less than, or equal to five. - 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 SourceIpConditionConfig) 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 SourceIpConditionConfig) GoString() string { - return s.String() -} - -// SetValues sets the Values field's value. -func (s *SourceIpConditionConfig) SetValues(v []*string) *SourceIpConditionConfig { - s.Values = v - return s -} - -// Information about a policy used for SSL negotiation. -type SslPolicy struct { - _ struct{} `type:"structure"` - - // The ciphers. - Ciphers []*Cipher `type:"list"` - - // The name of the policy. - Name *string `type:"string"` - - // The protocols. - SslProtocols []*string `type:"list"` - - // The supported load balancers. - SupportedLoadBalancerTypes []*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 SslPolicy) 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 SslPolicy) GoString() string { - return s.String() -} - -// SetCiphers sets the Ciphers field's value. -func (s *SslPolicy) SetCiphers(v []*Cipher) *SslPolicy { - s.Ciphers = v - return s -} - -// SetName sets the Name field's value. -func (s *SslPolicy) SetName(v string) *SslPolicy { - s.Name = &v - return s -} - -// SetSslProtocols sets the SslProtocols field's value. -func (s *SslPolicy) SetSslProtocols(v []*string) *SslPolicy { - s.SslProtocols = v - return s -} - -// SetSupportedLoadBalancerTypes sets the SupportedLoadBalancerTypes field's value. -func (s *SslPolicy) SetSupportedLoadBalancerTypes(v []*string) *SslPolicy { - s.SupportedLoadBalancerTypes = v - return s -} - -// Information about a subnet mapping. -type SubnetMapping struct { - _ struct{} `type:"structure"` - - // [Network Load Balancers] The allocation ID of the Elastic IP address for - // an internet-facing load balancer. - AllocationId *string `type:"string"` - - // [Network Load Balancers] The IPv6 address. - IPv6Address *string `type:"string"` - - // [Network Load Balancers] The private IPv4 address for an internal load balancer. - PrivateIPv4Address *string `type:"string"` - - // The ID of the subnet. - SubnetId *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 SubnetMapping) 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 SubnetMapping) GoString() string { - return s.String() -} - -// SetAllocationId sets the AllocationId field's value. -func (s *SubnetMapping) SetAllocationId(v string) *SubnetMapping { - s.AllocationId = &v - return s -} - -// SetIPv6Address sets the IPv6Address field's value. -func (s *SubnetMapping) SetIPv6Address(v string) *SubnetMapping { - s.IPv6Address = &v - return s -} - -// SetPrivateIPv4Address sets the PrivateIPv4Address field's value. -func (s *SubnetMapping) SetPrivateIPv4Address(v string) *SubnetMapping { - s.PrivateIPv4Address = &v - return s -} - -// SetSubnetId sets the SubnetId field's value. -func (s *SubnetMapping) SetSubnetId(v string) *SubnetMapping { - s.SubnetId = &v - return s -} - -// Information about a tag. -type Tag struct { - _ struct{} `type:"structure"` - - // The key of the tag. - // - // Key is a required field - Key *string `min:"1" type:"string" required:"true"` - - // The value of the tag. - Value *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 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 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 -} - -// The tags associated with a resource. -type TagDescription struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - ResourceArn *string `type:"string"` - - // Information about the tags. - Tags []*Tag `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 TagDescription) 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 TagDescription) GoString() string { - return s.String() -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TagDescription) SetResourceArn(v string) *TagDescription { - s.ResourceArn = &v - return s -} - -// SetTags sets the Tags field's value. -func (s *TagDescription) SetTags(v []*Tag) *TagDescription { - s.Tags = v - return s -} - -// Information about a target. -type TargetDescription struct { - _ struct{} `type:"structure"` - - // An Availability Zone or all. This determines whether the target receives - // traffic from the load balancer nodes in the specified Availability Zone or - // from all enabled Availability Zones for the load balancer. - // - // For Application Load Balancer target groups, the specified Availability Zone - // value is only applicable when cross-zone load balancing is off. Otherwise - // the parameter is ignored and treated as all. - // - // This parameter is not supported if the target type of the target group is - // instance or alb. - // - // If the target type is ip and the IP address is in a subnet of the VPC for - // the target group, the Availability Zone is automatically detected and this - // parameter is optional. If the IP address is outside the VPC, this parameter - // is required. - // - // For Application Load Balancer target groups with cross-zone load balancing - // off, if the target type is ip and the IP address is outside of the VPC for - // the target group, this should be an Availability Zone inside the VPC for - // the target group. - // - // If the target type is lambda, this parameter is optional and the only supported - // value is all. - AvailabilityZone *string `type:"string"` - - // The ID of the target. If the target type of the target group is instance, - // specify an instance ID. If the target type is ip, specify an IP address. - // If the target type is lambda, specify the ARN of the Lambda function. If - // the target type is alb, specify the ARN of the Application Load Balancer - // target. - // - // Id is a required field - Id *string `type:"string" required:"true"` - - // The port on which the target is listening. If the target group protocol is - // GENEVE, the supported port is 6081. If the target type is alb, the targeted - // Application Load Balancer must have at least one listener whose port matches - // the target group port. This parameter is not used if the target is a Lambda - // function. - Port *int64 `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 TargetDescription) 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 TargetDescription) GoString() string { - return s.String() -} - -// Validate inspects the fields of the type to determine if they are valid. -func (s *TargetDescription) Validate() error { - invalidParams := request.ErrInvalidParams{Context: "TargetDescription"} - if s.Id == nil { - invalidParams.Add(request.NewErrParamRequired("Id")) - } - if s.Port != nil && *s.Port < 1 { - invalidParams.Add(request.NewErrParamMinValue("Port", 1)) - } - - if invalidParams.Len() > 0 { - return invalidParams - } - return nil -} - -// SetAvailabilityZone sets the AvailabilityZone field's value. -func (s *TargetDescription) SetAvailabilityZone(v string) *TargetDescription { - s.AvailabilityZone = &v - return s -} - -// SetId sets the Id field's value. -func (s *TargetDescription) SetId(v string) *TargetDescription { - s.Id = &v - return s -} - -// SetPort sets the Port field's value. -func (s *TargetDescription) SetPort(v int64) *TargetDescription { - s.Port = &v - return s -} - -// Information about a target group. -type TargetGroup struct { - _ struct{} `type:"structure"` - - // Indicates whether health checks are enabled. - HealthCheckEnabled *bool `type:"boolean"` - - // The approximate amount of time, in seconds, between health checks of an individual - // target. - HealthCheckIntervalSeconds *int64 `min:"5" type:"integer"` - - // The destination for health checks on the targets. - HealthCheckPath *string `min:"1" type:"string"` - - // The port to use to connect with the target. - HealthCheckPort *string `type:"string"` - - // The protocol to use to connect with the target. The GENEVE, TLS, UDP, and - // TCP_UDP protocols are not supported for health checks. - HealthCheckProtocol *string `type:"string" enum:"ProtocolEnum"` - - // The amount of time, in seconds, during which no response means a failed health - // check. - HealthCheckTimeoutSeconds *int64 `min:"2" type:"integer"` - - // The number of consecutive health checks successes required before considering - // an unhealthy target healthy. - HealthyThresholdCount *int64 `min:"2" type:"integer"` - - // The type of IP address used for this target group. The possible values are - // ipv4 and ipv6. This is an optional parameter. If not specified, the IP address - // type defaults to ipv4. - IpAddressType *string `type:"string" enum:"TargetGroupIpAddressTypeEnum"` - - // The Amazon Resource Name (ARN) of the load balancer that routes traffic to - // this target group. You can use each target group with only one load balancer. - LoadBalancerArns []*string `type:"list"` - - // The HTTP or gRPC codes to use when checking for a successful response from - // a target. - Matcher *Matcher `type:"structure"` - - // The port on which the targets are listening. This parameter is not used if - // the target is a Lambda function. - Port *int64 `min:"1" type:"integer"` - - // The protocol to use for routing traffic to the targets. - Protocol *string `type:"string" enum:"ProtocolEnum"` - - // [HTTP/HTTPS protocol] The protocol version. The possible values are GRPC, - // HTTP1, and HTTP2. - ProtocolVersion *string `type:"string"` - - // The Amazon Resource Name (ARN) of the target group. - TargetGroupArn *string `type:"string"` - - // The name of the target group. - TargetGroupName *string `type:"string"` - - // The type of target that you must specify when registering targets with this - // target group. The possible values are instance (register targets by instance - // ID), ip (register targets by IP address), lambda (register a single Lambda - // function as a target), or alb (register a single Application Load Balancer - // as a target). - TargetType *string `type:"string" enum:"TargetTypeEnum"` - - // The number of consecutive health check failures required before considering - // the target unhealthy. - UnhealthyThresholdCount *int64 `min:"2" type:"integer"` - - // The ID of the VPC for the targets. - 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 TargetGroup) 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 TargetGroup) GoString() string { - return s.String() -} - -// SetHealthCheckEnabled sets the HealthCheckEnabled field's value. -func (s *TargetGroup) SetHealthCheckEnabled(v bool) *TargetGroup { - s.HealthCheckEnabled = &v - return s -} - -// SetHealthCheckIntervalSeconds sets the HealthCheckIntervalSeconds field's value. -func (s *TargetGroup) SetHealthCheckIntervalSeconds(v int64) *TargetGroup { - s.HealthCheckIntervalSeconds = &v - return s -} - -// SetHealthCheckPath sets the HealthCheckPath field's value. -func (s *TargetGroup) SetHealthCheckPath(v string) *TargetGroup { - s.HealthCheckPath = &v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *TargetGroup) SetHealthCheckPort(v string) *TargetGroup { - s.HealthCheckPort = &v - return s -} - -// SetHealthCheckProtocol sets the HealthCheckProtocol field's value. -func (s *TargetGroup) SetHealthCheckProtocol(v string) *TargetGroup { - s.HealthCheckProtocol = &v - return s -} - -// SetHealthCheckTimeoutSeconds sets the HealthCheckTimeoutSeconds field's value. -func (s *TargetGroup) SetHealthCheckTimeoutSeconds(v int64) *TargetGroup { - s.HealthCheckTimeoutSeconds = &v - return s -} - -// SetHealthyThresholdCount sets the HealthyThresholdCount field's value. -func (s *TargetGroup) SetHealthyThresholdCount(v int64) *TargetGroup { - s.HealthyThresholdCount = &v - return s -} - -// SetIpAddressType sets the IpAddressType field's value. -func (s *TargetGroup) SetIpAddressType(v string) *TargetGroup { - s.IpAddressType = &v - return s -} - -// SetLoadBalancerArns sets the LoadBalancerArns field's value. -func (s *TargetGroup) SetLoadBalancerArns(v []*string) *TargetGroup { - s.LoadBalancerArns = v - return s -} - -// SetMatcher sets the Matcher field's value. -func (s *TargetGroup) SetMatcher(v *Matcher) *TargetGroup { - s.Matcher = v - return s -} - -// SetPort sets the Port field's value. -func (s *TargetGroup) SetPort(v int64) *TargetGroup { - s.Port = &v - return s -} - -// SetProtocol sets the Protocol field's value. -func (s *TargetGroup) SetProtocol(v string) *TargetGroup { - s.Protocol = &v - return s -} - -// SetProtocolVersion sets the ProtocolVersion field's value. -func (s *TargetGroup) SetProtocolVersion(v string) *TargetGroup { - s.ProtocolVersion = &v - return s -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *TargetGroup) SetTargetGroupArn(v string) *TargetGroup { - s.TargetGroupArn = &v - return s -} - -// SetTargetGroupName sets the TargetGroupName field's value. -func (s *TargetGroup) SetTargetGroupName(v string) *TargetGroup { - s.TargetGroupName = &v - return s -} - -// SetTargetType sets the TargetType field's value. -func (s *TargetGroup) SetTargetType(v string) *TargetGroup { - s.TargetType = &v - return s -} - -// SetUnhealthyThresholdCount sets the UnhealthyThresholdCount field's value. -func (s *TargetGroup) SetUnhealthyThresholdCount(v int64) *TargetGroup { - s.UnhealthyThresholdCount = &v - return s -} - -// SetVpcId sets the VpcId field's value. -func (s *TargetGroup) SetVpcId(v string) *TargetGroup { - s.VpcId = &v - return s -} - -// Information about a target group attribute. -type TargetGroupAttribute struct { - _ struct{} `type:"structure"` - - // The name of the attribute. - // - // The following attributes are supported by all load balancers: - // - // * deregistration_delay.timeout_seconds - The amount of time, in seconds, - // for Elastic Load Balancing to wait before changing the state of a deregistering - // target from draining to unused. The range is 0-3600 seconds. The default - // value is 300 seconds. If the target is a Lambda function, this attribute - // is not supported. - // - // * stickiness.enabled - Indicates whether target stickiness is enabled. - // The value is true or false. The default is false. - // - // * stickiness.type - Indicates the type of stickiness. The possible values - // are: lb_cookie and app_cookie for Application Load Balancers. source_ip - // for Network Load Balancers. source_ip_dest_ip and source_ip_dest_ip_proto - // for Gateway Load Balancers. - // - // The following attributes are supported by Application Load Balancers and - // Network Load Balancers: - // - // * load_balancing.cross_zone.enabled - Indicates whether cross zone load - // balancing is enabled. The value is true, false or use_load_balancer_configuration. - // The default is use_load_balancer_configuration. - // - // * target_group_health.dns_failover.minimum_healthy_targets.count - The - // minimum number of targets that must be healthy. If the number of healthy - // targets is below this value, mark the zone as unhealthy in DNS, so that - // traffic is routed only to healthy zones. The possible values are off or - // an integer from 1 to the maximum number of targets. The default is off. - // - // * target_group_health.dns_failover.minimum_healthy_targets.percentage - // - The minimum percentage of targets that must be healthy. If the percentage - // of healthy targets is below this value, mark the zone as unhealthy in - // DNS, so that traffic is routed only to healthy zones. The possible values - // are off or an integer from 1 to 100. The default is off. - // - // * target_group_health.unhealthy_state_routing.minimum_healthy_targets.count - // - The minimum number of targets that must be healthy. If the number of - // healthy targets is below this value, send traffic to all targets, including - // unhealthy targets. The possible values are 1 to the maximum number of - // targets. The default is 1. - // - // * target_group_health.unhealthy_state_routing.minimum_healthy_targets.percentage - // - The minimum percentage of targets that must be healthy. If the percentage - // of healthy targets is below this value, send traffic to all targets, including - // unhealthy targets. The possible values are off or an integer from 1 to - // 100. The default is off. - // - // The following attributes are supported only if the load balancer is an Application - // Load Balancer and the target is an instance or an IP address: - // - // * load_balancing.algorithm.type - The load balancing algorithm determines - // how the load balancer selects targets when routing requests. The value - // is round_robin, least_outstanding_requests, or weighted_random. The default - // is round_robin. - // - // * load_balancing.algorithm.anomaly_mitigation - Only available when load_balancing.algorithm.type - // is weighted_random. Indicates whether anomaly mitigation is enabled. The - // value is on or off. The default is off. - // - // * slow_start.duration_seconds - The time period, in seconds, during which - // a newly registered target receives an increasing share of the traffic - // to the target group. After this time period ends, the target receives - // its full share of traffic. The range is 30-900 seconds (15 minutes). The - // default is 0 seconds (disabled). - // - // * stickiness.app_cookie.cookie_name - Indicates the name of the application-based - // cookie. Names that start with the following prefixes are not allowed: - // AWSALB, AWSALBAPP, and AWSALBTG; they're reserved for use by the load - // balancer. - // - // * stickiness.app_cookie.duration_seconds - The time period, in seconds, - // during which requests from a client should be routed to the same target. - // After this time period expires, the application-based cookie is considered - // stale. The range is 1 second to 1 week (604800 seconds). The default value - // is 1 day (86400 seconds). - // - // * stickiness.lb_cookie.duration_seconds - The time period, in seconds, - // during which requests from a client should be routed to the same target. - // After this time period expires, the load balancer-generated cookie is - // considered stale. The range is 1 second to 1 week (604800 seconds). The - // default value is 1 day (86400 seconds). - // - // The following attribute is supported only if the load balancer is an Application - // Load Balancer and the target is a Lambda function: - // - // * lambda.multi_value_headers.enabled - Indicates whether the request and - // response headers that are exchanged between the load balancer and the - // Lambda function include arrays of values or strings. The value is true - // or false. The default is false. If the value is false and the request - // contains a duplicate header field name or query parameter key, the load - // balancer uses the last value sent by the client. - // - // The following attributes are supported only by Network Load Balancers: - // - // * deregistration_delay.connection_termination.enabled - Indicates whether - // the load balancer terminates connections at the end of the deregistration - // timeout. The value is true or false. For new UDP/TCP_UDP target groups - // the default is true. Otherwise, the default is false. - // - // * preserve_client_ip.enabled - Indicates whether client IP preservation - // is enabled. The value is true or false. The default is disabled if the - // target group type is IP address and the target group protocol is TCP or - // TLS. Otherwise, the default is enabled. Client IP preservation cannot - // be disabled for UDP and TCP_UDP target groups. - // - // * proxy_protocol_v2.enabled - Indicates whether Proxy Protocol version - // 2 is enabled. The value is true or false. The default is false. - // - // * target_health_state.unhealthy.connection_termination.enabled - Indicates - // whether the load balancer terminates connections to unhealthy targets. - // The value is true or false. The default is true. - // - // * target_health_state.unhealthy.draining_interval_seconds - The amount - // of time for Elastic Load Balancing to wait before changing the state of - // an unhealthy target from unhealthy.draining to unhealthy. The range is - // 0-360000 seconds. The default value is 0 seconds. Note: This attribute - // can only be configured when target_health_state.unhealthy.connection_termination.enabled - // is false. - // - // The following attributes are supported only by Gateway Load Balancers: - // - // * target_failover.on_deregistration - Indicates how the Gateway Load Balancer - // handles existing flows when a target is deregistered. The possible values - // are rebalance and no_rebalance. The default is no_rebalance. The two attributes - // (target_failover.on_deregistration and target_failover.on_unhealthy) can't - // be set independently. The value you set for both attributes must be the - // same. - // - // * target_failover.on_unhealthy - Indicates how the Gateway Load Balancer - // handles existing flows when a target is unhealthy. The possible values - // are rebalance and no_rebalance. The default is no_rebalance. The two attributes - // (target_failover.on_deregistration and target_failover.on_unhealthy) cannot - // be set independently. The value you set for both attributes must be the - // same. - Key *string `type:"string"` - - // The value of the attribute. - Value *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 TargetGroupAttribute) 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 TargetGroupAttribute) GoString() string { - return s.String() -} - -// SetKey sets the Key field's value. -func (s *TargetGroupAttribute) SetKey(v string) *TargetGroupAttribute { - s.Key = &v - return s -} - -// SetValue sets the Value field's value. -func (s *TargetGroupAttribute) SetValue(v string) *TargetGroupAttribute { - s.Value = &v - return s -} - -// Information about the target group stickiness for a rule. -type TargetGroupStickinessConfig struct { - _ struct{} `type:"structure"` - - // The time period, in seconds, during which requests from a client should be - // routed to the same target group. The range is 1-604800 seconds (7 days). - DurationSeconds *int64 `type:"integer"` - - // Indicates whether target group stickiness is enabled. - Enabled *bool `type:"boolean"` -} - -// 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 TargetGroupStickinessConfig) 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 TargetGroupStickinessConfig) GoString() string { - return s.String() -} - -// SetDurationSeconds sets the DurationSeconds field's value. -func (s *TargetGroupStickinessConfig) SetDurationSeconds(v int64) *TargetGroupStickinessConfig { - s.DurationSeconds = &v - return s -} - -// SetEnabled sets the Enabled field's value. -func (s *TargetGroupStickinessConfig) SetEnabled(v bool) *TargetGroupStickinessConfig { - s.Enabled = &v - return s -} - -// Information about how traffic will be distributed between multiple target -// groups in a forward rule. -type TargetGroupTuple struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the target group. - TargetGroupArn *string `type:"string"` - - // The weight. The range is 0 to 999. - Weight *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 TargetGroupTuple) 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 TargetGroupTuple) GoString() string { - return s.String() -} - -// SetTargetGroupArn sets the TargetGroupArn field's value. -func (s *TargetGroupTuple) SetTargetGroupArn(v string) *TargetGroupTuple { - s.TargetGroupArn = &v - return s -} - -// SetWeight sets the Weight field's value. -func (s *TargetGroupTuple) SetWeight(v int64) *TargetGroupTuple { - s.Weight = &v - return s -} - -// Information about the current health of a target. -type TargetHealth struct { - _ struct{} `type:"structure"` - - // A description of the target health that provides additional details. If the - // state is healthy, a description is not provided. - Description *string `type:"string"` - - // The reason code. - // - // If the target state is healthy, a reason code is not provided. - // - // If the target state is initial, the reason code can be one of the following - // values: - // - // * Elb.RegistrationInProgress - The target is in the process of being registered - // with the load balancer. - // - // * Elb.InitialHealthChecking - The load balancer is still sending the target - // the minimum number of health checks required to determine its health status. - // - // If the target state is unhealthy, the reason code can be one of the following - // values: - // - // * Target.ResponseCodeMismatch - The health checks did not return an expected - // HTTP code. Applies only to Application Load Balancers and Gateway Load - // Balancers. - // - // * Target.Timeout - The health check requests timed out. Applies only to - // Application Load Balancers and Gateway Load Balancers. - // - // * Target.FailedHealthChecks - The load balancer received an error while - // establishing a connection to the target or the target response was malformed. - // - // * Elb.InternalError - The health checks failed due to an internal error. - // Applies only to Application Load Balancers. - // - // If the target state is unused, the reason code can be one of the following - // values: - // - // * Target.NotRegistered - The target is not registered with the target - // group. - // - // * Target.NotInUse - The target group is not used by any load balancer - // or the target is in an Availability Zone that is not enabled for its load - // balancer. - // - // * Target.InvalidState - The target is in the stopped or terminated state. - // - // * Target.IpUnusable - The target IP address is reserved for use by a load - // balancer. - // - // If the target state is draining, the reason code can be the following value: - // - // * Target.DeregistrationInProgress - The target is in the process of being - // deregistered and the deregistration delay period has not expired. - // - // If the target state is unavailable, the reason code can be the following - // value: - // - // * Target.HealthCheckDisabled - Health checks are disabled for the target - // group. Applies only to Application Load Balancers. - // - // * Elb.InternalError - Target health is unavailable due to an internal - // error. Applies only to Network Load Balancers. - Reason *string `type:"string" enum:"TargetHealthReasonEnum"` - - // The state of the target. - State *string `type:"string" enum:"TargetHealthStateEnum"` -} - -// 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 TargetHealth) 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 TargetHealth) GoString() string { - return s.String() -} - -// SetDescription sets the Description field's value. -func (s *TargetHealth) SetDescription(v string) *TargetHealth { - s.Description = &v - return s -} - -// SetReason sets the Reason field's value. -func (s *TargetHealth) SetReason(v string) *TargetHealth { - s.Reason = &v - return s -} - -// SetState sets the State field's value. -func (s *TargetHealth) SetState(v string) *TargetHealth { - s.State = &v - return s -} - -// Information about the health of a target. -type TargetHealthDescription struct { - _ struct{} `type:"structure"` - - // The anomaly detection result for the target. - // - // If no anomalies were detected, the result is normal. - // - // If anomalies were detected, the result is anomalous. - AnomalyDetection *AnomalyDetection `type:"structure"` - - // The port to use to connect with the target. - HealthCheckPort *string `type:"string"` - - // The description of the target. - Target *TargetDescription `type:"structure"` - - // The health information for the target. - TargetHealth *TargetHealth `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 TargetHealthDescription) 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 TargetHealthDescription) GoString() string { - return s.String() -} - -// SetAnomalyDetection sets the AnomalyDetection field's value. -func (s *TargetHealthDescription) SetAnomalyDetection(v *AnomalyDetection) *TargetHealthDescription { - s.AnomalyDetection = v - return s -} - -// SetHealthCheckPort sets the HealthCheckPort field's value. -func (s *TargetHealthDescription) SetHealthCheckPort(v string) *TargetHealthDescription { - s.HealthCheckPort = &v - return s -} - -// SetTarget sets the Target field's value. -func (s *TargetHealthDescription) SetTarget(v *TargetDescription) *TargetHealthDescription { - s.Target = v - return s -} - -// SetTargetHealth sets the TargetHealth field's value. -func (s *TargetHealthDescription) SetTargetHealth(v *TargetHealth) *TargetHealthDescription { - s.TargetHealth = v - return s -} - -// Information about a trust store. -type TrustStore struct { - _ struct{} `type:"structure"` - - // The name of the trust store. - Name *string `min:"1" type:"string"` - - // The number of ca certificates in the trust store. - NumberOfCaCertificates *int64 `type:"integer"` - - // The current status of the trust store. - Status *string `type:"string" enum:"TrustStoreStatus"` - - // The number of revoked certificates in the trust store. - TotalRevokedEntries *int64 `type:"long"` - - // The Amazon Resource Name (ARN) of the trust store. - TrustStoreArn *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 TrustStore) 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 TrustStore) GoString() string { - return s.String() -} - -// SetName sets the Name field's value. -func (s *TrustStore) SetName(v string) *TrustStore { - s.Name = &v - return s -} - -// SetNumberOfCaCertificates sets the NumberOfCaCertificates field's value. -func (s *TrustStore) SetNumberOfCaCertificates(v int64) *TrustStore { - s.NumberOfCaCertificates = &v - return s -} - -// SetStatus sets the Status field's value. -func (s *TrustStore) SetStatus(v string) *TrustStore { - s.Status = &v - return s -} - -// SetTotalRevokedEntries sets the TotalRevokedEntries field's value. -func (s *TrustStore) SetTotalRevokedEntries(v int64) *TrustStore { - s.TotalRevokedEntries = &v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *TrustStore) SetTrustStoreArn(v string) *TrustStore { - s.TrustStoreArn = &v - return s -} - -// Information about the resources a trust store is associated with. -type TrustStoreAssociation struct { - _ struct{} `type:"structure"` - - // The Amazon Resource Name (ARN) of the resource. - ResourceArn *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 TrustStoreAssociation) 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 TrustStoreAssociation) GoString() string { - return s.String() -} - -// SetResourceArn sets the ResourceArn field's value. -func (s *TrustStoreAssociation) SetResourceArn(v string) *TrustStoreAssociation { - s.ResourceArn = &v - return s -} - -// Information about a revocation file in use by a trust store. -type TrustStoreRevocation struct { - _ struct{} `type:"structure"` - - // The number of revoked certificates. - NumberOfRevokedEntries *int64 `type:"long"` - - // The revocation ID of the revocation file. - RevocationId *int64 `type:"long"` - - // The type of revocation file. - RevocationType *string `type:"string" enum:"RevocationType"` - - // The Amazon Resource Name (ARN) of the trust store. - TrustStoreArn *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 TrustStoreRevocation) 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 TrustStoreRevocation) GoString() string { - return s.String() -} - -// SetNumberOfRevokedEntries sets the NumberOfRevokedEntries field's value. -func (s *TrustStoreRevocation) SetNumberOfRevokedEntries(v int64) *TrustStoreRevocation { - s.NumberOfRevokedEntries = &v - return s -} - -// SetRevocationId sets the RevocationId field's value. -func (s *TrustStoreRevocation) SetRevocationId(v int64) *TrustStoreRevocation { - s.RevocationId = &v - return s -} - -// SetRevocationType sets the RevocationType field's value. -func (s *TrustStoreRevocation) SetRevocationType(v string) *TrustStoreRevocation { - s.RevocationType = &v - return s -} - -// SetTrustStoreArn sets the TrustStoreArn field's value. -func (s *TrustStoreRevocation) SetTrustStoreArn(v string) *TrustStoreRevocation { - s.TrustStoreArn = &v - return s -} - -const ( - // ActionTypeEnumForward is a ActionTypeEnum enum value - ActionTypeEnumForward = "forward" - - // ActionTypeEnumAuthenticateOidc is a ActionTypeEnum enum value - ActionTypeEnumAuthenticateOidc = "authenticate-oidc" - - // ActionTypeEnumAuthenticateCognito is a ActionTypeEnum enum value - ActionTypeEnumAuthenticateCognito = "authenticate-cognito" - - // ActionTypeEnumRedirect is a ActionTypeEnum enum value - ActionTypeEnumRedirect = "redirect" - - // ActionTypeEnumFixedResponse is a ActionTypeEnum enum value - ActionTypeEnumFixedResponse = "fixed-response" -) - -// ActionTypeEnum_Values returns all elements of the ActionTypeEnum enum -func ActionTypeEnum_Values() []string { - return []string{ - ActionTypeEnumForward, - ActionTypeEnumAuthenticateOidc, - ActionTypeEnumAuthenticateCognito, - ActionTypeEnumRedirect, - ActionTypeEnumFixedResponse, - } -} - -const ( - // AnomalyResultEnumAnomalous is a AnomalyResultEnum enum value - AnomalyResultEnumAnomalous = "anomalous" - - // AnomalyResultEnumNormal is a AnomalyResultEnum enum value - AnomalyResultEnumNormal = "normal" -) - -// AnomalyResultEnum_Values returns all elements of the AnomalyResultEnum enum -func AnomalyResultEnum_Values() []string { - return []string{ - AnomalyResultEnumAnomalous, - AnomalyResultEnumNormal, - } -} - -const ( - // AuthenticateCognitoActionConditionalBehaviorEnumDeny is a AuthenticateCognitoActionConditionalBehaviorEnum enum value - AuthenticateCognitoActionConditionalBehaviorEnumDeny = "deny" - - // AuthenticateCognitoActionConditionalBehaviorEnumAllow is a AuthenticateCognitoActionConditionalBehaviorEnum enum value - AuthenticateCognitoActionConditionalBehaviorEnumAllow = "allow" - - // AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate is a AuthenticateCognitoActionConditionalBehaviorEnum enum value - AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate = "authenticate" -) - -// AuthenticateCognitoActionConditionalBehaviorEnum_Values returns all elements of the AuthenticateCognitoActionConditionalBehaviorEnum enum -func AuthenticateCognitoActionConditionalBehaviorEnum_Values() []string { - return []string{ - AuthenticateCognitoActionConditionalBehaviorEnumDeny, - AuthenticateCognitoActionConditionalBehaviorEnumAllow, - AuthenticateCognitoActionConditionalBehaviorEnumAuthenticate, - } -} - -const ( - // AuthenticateOidcActionConditionalBehaviorEnumDeny is a AuthenticateOidcActionConditionalBehaviorEnum enum value - AuthenticateOidcActionConditionalBehaviorEnumDeny = "deny" - - // AuthenticateOidcActionConditionalBehaviorEnumAllow is a AuthenticateOidcActionConditionalBehaviorEnum enum value - AuthenticateOidcActionConditionalBehaviorEnumAllow = "allow" - - // AuthenticateOidcActionConditionalBehaviorEnumAuthenticate is a AuthenticateOidcActionConditionalBehaviorEnum enum value - AuthenticateOidcActionConditionalBehaviorEnumAuthenticate = "authenticate" -) - -// AuthenticateOidcActionConditionalBehaviorEnum_Values returns all elements of the AuthenticateOidcActionConditionalBehaviorEnum enum -func AuthenticateOidcActionConditionalBehaviorEnum_Values() []string { - return []string{ - AuthenticateOidcActionConditionalBehaviorEnumDeny, - AuthenticateOidcActionConditionalBehaviorEnumAllow, - AuthenticateOidcActionConditionalBehaviorEnumAuthenticate, - } -} - -const ( - // DescribeTargetHealthInputIncludeEnumAnomalyDetection is a DescribeTargetHealthInputIncludeEnum enum value - DescribeTargetHealthInputIncludeEnumAnomalyDetection = "AnomalyDetection" - - // DescribeTargetHealthInputIncludeEnumAll is a DescribeTargetHealthInputIncludeEnum enum value - DescribeTargetHealthInputIncludeEnumAll = "All" -) - -// DescribeTargetHealthInputIncludeEnum_Values returns all elements of the DescribeTargetHealthInputIncludeEnum enum -func DescribeTargetHealthInputIncludeEnum_Values() []string { - return []string{ - DescribeTargetHealthInputIncludeEnumAnomalyDetection, - DescribeTargetHealthInputIncludeEnumAll, - } -} - -const ( - // EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnumOn is a EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum enum value - EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnumOn = "on" - - // EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnumOff is a EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum enum value - EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnumOff = "off" -) - -// EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum_Values returns all elements of the EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum enum -func EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnum_Values() []string { - return []string{ - EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnumOn, - EnforceSecurityGroupInboundRulesOnPrivateLinkTrafficEnumOff, - } -} - -const ( - // IpAddressTypeIpv4 is a IpAddressType enum value - IpAddressTypeIpv4 = "ipv4" - - // IpAddressTypeDualstack is a IpAddressType enum value - IpAddressTypeDualstack = "dualstack" - - // IpAddressTypeDualstackWithoutPublicIpv4 is a IpAddressType enum value - IpAddressTypeDualstackWithoutPublicIpv4 = "dualstack-without-public-ipv4" -) - -// IpAddressType_Values returns all elements of the IpAddressType enum -func IpAddressType_Values() []string { - return []string{ - IpAddressTypeIpv4, - IpAddressTypeDualstack, - IpAddressTypeDualstackWithoutPublicIpv4, - } -} - -const ( - // LoadBalancerSchemeEnumInternetFacing is a LoadBalancerSchemeEnum enum value - LoadBalancerSchemeEnumInternetFacing = "internet-facing" - - // LoadBalancerSchemeEnumInternal is a LoadBalancerSchemeEnum enum value - LoadBalancerSchemeEnumInternal = "internal" -) - -// LoadBalancerSchemeEnum_Values returns all elements of the LoadBalancerSchemeEnum enum -func LoadBalancerSchemeEnum_Values() []string { - return []string{ - LoadBalancerSchemeEnumInternetFacing, - LoadBalancerSchemeEnumInternal, - } -} - -const ( - // LoadBalancerStateEnumActive is a LoadBalancerStateEnum enum value - LoadBalancerStateEnumActive = "active" - - // LoadBalancerStateEnumProvisioning is a LoadBalancerStateEnum enum value - LoadBalancerStateEnumProvisioning = "provisioning" - - // LoadBalancerStateEnumActiveImpaired is a LoadBalancerStateEnum enum value - LoadBalancerStateEnumActiveImpaired = "active_impaired" - - // LoadBalancerStateEnumFailed is a LoadBalancerStateEnum enum value - LoadBalancerStateEnumFailed = "failed" -) - -// LoadBalancerStateEnum_Values returns all elements of the LoadBalancerStateEnum enum -func LoadBalancerStateEnum_Values() []string { - return []string{ - LoadBalancerStateEnumActive, - LoadBalancerStateEnumProvisioning, - LoadBalancerStateEnumActiveImpaired, - LoadBalancerStateEnumFailed, - } -} - -const ( - // LoadBalancerTypeEnumApplication is a LoadBalancerTypeEnum enum value - LoadBalancerTypeEnumApplication = "application" - - // LoadBalancerTypeEnumNetwork is a LoadBalancerTypeEnum enum value - LoadBalancerTypeEnumNetwork = "network" - - // LoadBalancerTypeEnumGateway is a LoadBalancerTypeEnum enum value - LoadBalancerTypeEnumGateway = "gateway" -) - -// LoadBalancerTypeEnum_Values returns all elements of the LoadBalancerTypeEnum enum -func LoadBalancerTypeEnum_Values() []string { - return []string{ - LoadBalancerTypeEnumApplication, - LoadBalancerTypeEnumNetwork, - LoadBalancerTypeEnumGateway, - } -} - -const ( - // MitigationInEffectEnumYes is a MitigationInEffectEnum enum value - MitigationInEffectEnumYes = "yes" - - // MitigationInEffectEnumNo is a MitigationInEffectEnum enum value - MitigationInEffectEnumNo = "no" -) - -// MitigationInEffectEnum_Values returns all elements of the MitigationInEffectEnum enum -func MitigationInEffectEnum_Values() []string { - return []string{ - MitigationInEffectEnumYes, - MitigationInEffectEnumNo, - } -} - -const ( - // ProtocolEnumHttp is a ProtocolEnum enum value - ProtocolEnumHttp = "HTTP" - - // ProtocolEnumHttps is a ProtocolEnum enum value - ProtocolEnumHttps = "HTTPS" - - // ProtocolEnumTcp is a ProtocolEnum enum value - ProtocolEnumTcp = "TCP" - - // ProtocolEnumTls is a ProtocolEnum enum value - ProtocolEnumTls = "TLS" - - // ProtocolEnumUdp is a ProtocolEnum enum value - ProtocolEnumUdp = "UDP" - - // ProtocolEnumTcpUdp is a ProtocolEnum enum value - ProtocolEnumTcpUdp = "TCP_UDP" - - // ProtocolEnumGeneve is a ProtocolEnum enum value - ProtocolEnumGeneve = "GENEVE" -) - -// ProtocolEnum_Values returns all elements of the ProtocolEnum enum -func ProtocolEnum_Values() []string { - return []string{ - ProtocolEnumHttp, - ProtocolEnumHttps, - ProtocolEnumTcp, - ProtocolEnumTls, - ProtocolEnumUdp, - ProtocolEnumTcpUdp, - ProtocolEnumGeneve, - } -} - -const ( - // RedirectActionStatusCodeEnumHttp301 is a RedirectActionStatusCodeEnum enum value - RedirectActionStatusCodeEnumHttp301 = "HTTP_301" - - // RedirectActionStatusCodeEnumHttp302 is a RedirectActionStatusCodeEnum enum value - RedirectActionStatusCodeEnumHttp302 = "HTTP_302" -) - -// RedirectActionStatusCodeEnum_Values returns all elements of the RedirectActionStatusCodeEnum enum -func RedirectActionStatusCodeEnum_Values() []string { - return []string{ - RedirectActionStatusCodeEnumHttp301, - RedirectActionStatusCodeEnumHttp302, - } -} - -const ( - // RevocationTypeCrl is a RevocationType enum value - RevocationTypeCrl = "CRL" -) - -// RevocationType_Values returns all elements of the RevocationType enum -func RevocationType_Values() []string { - return []string{ - RevocationTypeCrl, - } -} - -const ( - // TargetGroupIpAddressTypeEnumIpv4 is a TargetGroupIpAddressTypeEnum enum value - TargetGroupIpAddressTypeEnumIpv4 = "ipv4" - - // TargetGroupIpAddressTypeEnumIpv6 is a TargetGroupIpAddressTypeEnum enum value - TargetGroupIpAddressTypeEnumIpv6 = "ipv6" -) - -// TargetGroupIpAddressTypeEnum_Values returns all elements of the TargetGroupIpAddressTypeEnum enum -func TargetGroupIpAddressTypeEnum_Values() []string { - return []string{ - TargetGroupIpAddressTypeEnumIpv4, - TargetGroupIpAddressTypeEnumIpv6, - } -} - -const ( - // TargetHealthReasonEnumElbRegistrationInProgress is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumElbRegistrationInProgress = "Elb.RegistrationInProgress" - - // TargetHealthReasonEnumElbInitialHealthChecking is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumElbInitialHealthChecking = "Elb.InitialHealthChecking" - - // TargetHealthReasonEnumTargetResponseCodeMismatch is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetResponseCodeMismatch = "Target.ResponseCodeMismatch" - - // TargetHealthReasonEnumTargetTimeout is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetTimeout = "Target.Timeout" - - // TargetHealthReasonEnumTargetFailedHealthChecks is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetFailedHealthChecks = "Target.FailedHealthChecks" - - // TargetHealthReasonEnumTargetNotRegistered is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetNotRegistered = "Target.NotRegistered" - - // TargetHealthReasonEnumTargetNotInUse is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetNotInUse = "Target.NotInUse" - - // TargetHealthReasonEnumTargetDeregistrationInProgress is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetDeregistrationInProgress = "Target.DeregistrationInProgress" - - // TargetHealthReasonEnumTargetInvalidState is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetInvalidState = "Target.InvalidState" - - // TargetHealthReasonEnumTargetIpUnusable is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetIpUnusable = "Target.IpUnusable" - - // TargetHealthReasonEnumTargetHealthCheckDisabled is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumTargetHealthCheckDisabled = "Target.HealthCheckDisabled" - - // TargetHealthReasonEnumElbInternalError is a TargetHealthReasonEnum enum value - TargetHealthReasonEnumElbInternalError = "Elb.InternalError" -) - -// TargetHealthReasonEnum_Values returns all elements of the TargetHealthReasonEnum enum -func TargetHealthReasonEnum_Values() []string { - return []string{ - TargetHealthReasonEnumElbRegistrationInProgress, - TargetHealthReasonEnumElbInitialHealthChecking, - TargetHealthReasonEnumTargetResponseCodeMismatch, - TargetHealthReasonEnumTargetTimeout, - TargetHealthReasonEnumTargetFailedHealthChecks, - TargetHealthReasonEnumTargetNotRegistered, - TargetHealthReasonEnumTargetNotInUse, - TargetHealthReasonEnumTargetDeregistrationInProgress, - TargetHealthReasonEnumTargetInvalidState, - TargetHealthReasonEnumTargetIpUnusable, - TargetHealthReasonEnumTargetHealthCheckDisabled, - TargetHealthReasonEnumElbInternalError, - } -} - -const ( - // TargetHealthStateEnumInitial is a TargetHealthStateEnum enum value - TargetHealthStateEnumInitial = "initial" - - // TargetHealthStateEnumHealthy is a TargetHealthStateEnum enum value - TargetHealthStateEnumHealthy = "healthy" - - // TargetHealthStateEnumUnhealthy is a TargetHealthStateEnum enum value - TargetHealthStateEnumUnhealthy = "unhealthy" - - // TargetHealthStateEnumUnhealthyDraining is a TargetHealthStateEnum enum value - TargetHealthStateEnumUnhealthyDraining = "unhealthy.draining" - - // TargetHealthStateEnumUnused is a TargetHealthStateEnum enum value - TargetHealthStateEnumUnused = "unused" - - // TargetHealthStateEnumDraining is a TargetHealthStateEnum enum value - TargetHealthStateEnumDraining = "draining" - - // TargetHealthStateEnumUnavailable is a TargetHealthStateEnum enum value - TargetHealthStateEnumUnavailable = "unavailable" -) - -// TargetHealthStateEnum_Values returns all elements of the TargetHealthStateEnum enum -func TargetHealthStateEnum_Values() []string { - return []string{ - TargetHealthStateEnumInitial, - TargetHealthStateEnumHealthy, - TargetHealthStateEnumUnhealthy, - TargetHealthStateEnumUnhealthyDraining, - TargetHealthStateEnumUnused, - TargetHealthStateEnumDraining, - TargetHealthStateEnumUnavailable, - } -} - -const ( - // TargetTypeEnumInstance is a TargetTypeEnum enum value - TargetTypeEnumInstance = "instance" - - // TargetTypeEnumIp is a TargetTypeEnum enum value - TargetTypeEnumIp = "ip" - - // TargetTypeEnumLambda is a TargetTypeEnum enum value - TargetTypeEnumLambda = "lambda" - - // TargetTypeEnumAlb is a TargetTypeEnum enum value - TargetTypeEnumAlb = "alb" -) - -// TargetTypeEnum_Values returns all elements of the TargetTypeEnum enum -func TargetTypeEnum_Values() []string { - return []string{ - TargetTypeEnumInstance, - TargetTypeEnumIp, - TargetTypeEnumLambda, - TargetTypeEnumAlb, - } -} - -const ( - // TrustStoreAssociationStatusEnumActive is a TrustStoreAssociationStatusEnum enum value - TrustStoreAssociationStatusEnumActive = "active" - - // TrustStoreAssociationStatusEnumRemoved is a TrustStoreAssociationStatusEnum enum value - TrustStoreAssociationStatusEnumRemoved = "removed" -) - -// TrustStoreAssociationStatusEnum_Values returns all elements of the TrustStoreAssociationStatusEnum enum -func TrustStoreAssociationStatusEnum_Values() []string { - return []string{ - TrustStoreAssociationStatusEnumActive, - TrustStoreAssociationStatusEnumRemoved, - } -} - -const ( - // TrustStoreStatusActive is a TrustStoreStatus enum value - TrustStoreStatusActive = "ACTIVE" - - // TrustStoreStatusCreating is a TrustStoreStatus enum value - TrustStoreStatusCreating = "CREATING" -) - -// TrustStoreStatus_Values returns all elements of the TrustStoreStatus enum -func TrustStoreStatus_Values() []string { - return []string{ - TrustStoreStatusActive, - TrustStoreStatusCreating, - } -} diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go deleted file mode 100644 index 486753a065..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/doc.go +++ /dev/null @@ -1,54 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -// Package elbv2 provides the client and types for making API -// requests to Elastic Load Balancing. -// -// A load balancer distributes incoming traffic across targets, such as your -// EC2 instances. This enables you to increase the availability of your application. -// The load balancer also monitors the health of its registered targets and -// ensures that it routes traffic only to healthy targets. You configure your -// load balancer to accept incoming traffic by specifying one or more listeners, -// which are configured with a protocol and port number for connections from -// clients to the load balancer. You configure a target group with a protocol -// and port number for connections from the load balancer to the targets, and -// with health check settings to be used when checking the health status of -// the targets. -// -// Elastic Load Balancing supports the following types of load balancers: Application -// Load Balancers, Network Load Balancers, Gateway Load Balancers, and Classic -// Load Balancers. This reference covers the following load balancer types: -// -// - Application Load Balancer - Operates at the application layer (layer -// 7) and supports HTTP and HTTPS. -// -// - Network Load Balancer - Operates at the transport layer (layer 4) and -// supports TCP, TLS, and UDP. -// -// - Gateway Load Balancer - Operates at the network layer (layer 3). -// -// For more information, see the Elastic Load Balancing User Guide (https://docs.aws.amazon.com/elasticloadbalancing/latest/userguide/). -// -// All Elastic Load Balancing operations are idempotent, which means that they -// complete at most one time. If you repeat an operation, it succeeds. -// -// See https://docs.aws.amazon.com/goto/WebAPI/elasticloadbalancingv2-2015-12-01 for more information on this service. -// -// See elbv2 package documentation for more information. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elbv2/ -// -// # Using the Client -// -// To contact Elastic Load Balancing 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 Elastic Load Balancing client ELBV2 for more -// information on creating client for this service. -// https://docs.aws.amazon.com/sdk-for-go/api/service/elbv2/#New -package elbv2 diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go deleted file mode 100644 index a26c435026..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/errors.go +++ /dev/null @@ -1,320 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elbv2 - -const ( - - // ErrCodeALPNPolicyNotSupportedException for service response error code - // "ALPNPolicyNotFound". - // - // The specified ALPN policy is not supported. - ErrCodeALPNPolicyNotSupportedException = "ALPNPolicyNotFound" - - // ErrCodeAllocationIdNotFoundException for service response error code - // "AllocationIdNotFound". - // - // The specified allocation ID does not exist. - ErrCodeAllocationIdNotFoundException = "AllocationIdNotFound" - - // ErrCodeAvailabilityZoneNotSupportedException for service response error code - // "AvailabilityZoneNotSupported". - // - // The specified Availability Zone is not supported. - ErrCodeAvailabilityZoneNotSupportedException = "AvailabilityZoneNotSupported" - - // ErrCodeCaCertificatesBundleNotFoundException for service response error code - // "CaCertificatesBundleNotFound". - // - // The specified ca certificate bundle does not exist. - ErrCodeCaCertificatesBundleNotFoundException = "CaCertificatesBundleNotFound" - - // ErrCodeCertificateNotFoundException for service response error code - // "CertificateNotFound". - // - // The specified certificate does not exist. - ErrCodeCertificateNotFoundException = "CertificateNotFound" - - // ErrCodeDeleteAssociationSameAccountException for service response error code - // "DeleteAssociationSameAccount". - // - // The specified association cannot be within the same account. - ErrCodeDeleteAssociationSameAccountException = "DeleteAssociationSameAccount" - - // ErrCodeDuplicateListenerException for service response error code - // "DuplicateListener". - // - // A listener with the specified port already exists. - ErrCodeDuplicateListenerException = "DuplicateListener" - - // ErrCodeDuplicateLoadBalancerNameException for service response error code - // "DuplicateLoadBalancerName". - // - // A load balancer with the specified name already exists. - ErrCodeDuplicateLoadBalancerNameException = "DuplicateLoadBalancerName" - - // ErrCodeDuplicateTagKeysException for service response error code - // "DuplicateTagKeys". - // - // A tag key was specified more than once. - ErrCodeDuplicateTagKeysException = "DuplicateTagKeys" - - // ErrCodeDuplicateTargetGroupNameException for service response error code - // "DuplicateTargetGroupName". - // - // A target group with the specified name already exists. - ErrCodeDuplicateTargetGroupNameException = "DuplicateTargetGroupName" - - // ErrCodeDuplicateTrustStoreNameException for service response error code - // "DuplicateTrustStoreName". - // - // A trust store with the specified name already exists. - ErrCodeDuplicateTrustStoreNameException = "DuplicateTrustStoreName" - - // ErrCodeHealthUnavailableException for service response error code - // "HealthUnavailable". - // - // The health of the specified targets could not be retrieved due to an internal - // error. - ErrCodeHealthUnavailableException = "HealthUnavailable" - - // ErrCodeIncompatibleProtocolsException for service response error code - // "IncompatibleProtocols". - // - // The specified configuration is not valid with this protocol. - ErrCodeIncompatibleProtocolsException = "IncompatibleProtocols" - - // ErrCodeInvalidCaCertificatesBundleException for service response error code - // "InvalidCaCertificatesBundle". - // - // The specified ca certificate bundle is in an invalid format, or corrupt. - ErrCodeInvalidCaCertificatesBundleException = "InvalidCaCertificatesBundle" - - // ErrCodeInvalidConfigurationRequestException for service response error code - // "InvalidConfigurationRequest". - // - // The requested configuration is not valid. - ErrCodeInvalidConfigurationRequestException = "InvalidConfigurationRequest" - - // ErrCodeInvalidLoadBalancerActionException for service response error code - // "InvalidLoadBalancerAction". - // - // The requested action is not valid. - ErrCodeInvalidLoadBalancerActionException = "InvalidLoadBalancerAction" - - // ErrCodeInvalidRevocationContentException for service response error code - // "InvalidRevocationContent". - // - // The provided revocation file is an invalid format, or uses an incorrect algorithm. - ErrCodeInvalidRevocationContentException = "InvalidRevocationContent" - - // ErrCodeInvalidSchemeException for service response error code - // "InvalidScheme". - // - // The requested scheme is not valid. - ErrCodeInvalidSchemeException = "InvalidScheme" - - // ErrCodeInvalidSecurityGroupException for service response error code - // "InvalidSecurityGroup". - // - // The specified security group does not exist. - ErrCodeInvalidSecurityGroupException = "InvalidSecurityGroup" - - // ErrCodeInvalidSubnetException for service response error code - // "InvalidSubnet". - // - // The specified subnet is out of available addresses. - ErrCodeInvalidSubnetException = "InvalidSubnet" - - // ErrCodeInvalidTargetException for service response error code - // "InvalidTarget". - // - // The specified target does not exist, is not in the same VPC as the target - // group, or has an unsupported instance type. - ErrCodeInvalidTargetException = "InvalidTarget" - - // ErrCodeListenerNotFoundException for service response error code - // "ListenerNotFound". - // - // The specified listener does not exist. - ErrCodeListenerNotFoundException = "ListenerNotFound" - - // ErrCodeLoadBalancerNotFoundException for service response error code - // "LoadBalancerNotFound". - // - // The specified load balancer does not exist. - ErrCodeLoadBalancerNotFoundException = "LoadBalancerNotFound" - - // ErrCodeOperationNotPermittedException for service response error code - // "OperationNotPermitted". - // - // This operation is not allowed. - ErrCodeOperationNotPermittedException = "OperationNotPermitted" - - // ErrCodePriorityInUseException for service response error code - // "PriorityInUse". - // - // The specified priority is in use. - ErrCodePriorityInUseException = "PriorityInUse" - - // ErrCodeResourceInUseException for service response error code - // "ResourceInUse". - // - // A specified resource is in use. - ErrCodeResourceInUseException = "ResourceInUse" - - // ErrCodeResourceNotFoundException for service response error code - // "ResourceNotFound". - // - // The specified resource does not exist. - ErrCodeResourceNotFoundException = "ResourceNotFound" - - // ErrCodeRevocationContentNotFoundException for service response error code - // "RevocationContentNotFound". - // - // The specified revocation file does not exist. - ErrCodeRevocationContentNotFoundException = "RevocationContentNotFound" - - // ErrCodeRevocationIdNotFoundException for service response error code - // "RevocationIdNotFound". - // - // The specified revocation ID does not exist. - ErrCodeRevocationIdNotFoundException = "RevocationIdNotFound" - - // ErrCodeRuleNotFoundException for service response error code - // "RuleNotFound". - // - // The specified rule does not exist. - ErrCodeRuleNotFoundException = "RuleNotFound" - - // ErrCodeSSLPolicyNotFoundException for service response error code - // "SSLPolicyNotFound". - // - // The specified SSL policy does not exist. - ErrCodeSSLPolicyNotFoundException = "SSLPolicyNotFound" - - // ErrCodeSubnetNotFoundException for service response error code - // "SubnetNotFound". - // - // The specified subnet does not exist. - ErrCodeSubnetNotFoundException = "SubnetNotFound" - - // ErrCodeTargetGroupAssociationLimitException for service response error code - // "TargetGroupAssociationLimit". - // - // You've reached the limit on the number of load balancers per target group. - ErrCodeTargetGroupAssociationLimitException = "TargetGroupAssociationLimit" - - // ErrCodeTargetGroupNotFoundException for service response error code - // "TargetGroupNotFound". - // - // The specified target group does not exist. - ErrCodeTargetGroupNotFoundException = "TargetGroupNotFound" - - // ErrCodeTooManyActionsException for service response error code - // "TooManyActions". - // - // You've reached the limit on the number of actions per rule. - ErrCodeTooManyActionsException = "TooManyActions" - - // ErrCodeTooManyCertificatesException for service response error code - // "TooManyCertificates". - // - // You've reached the limit on the number of certificates per load balancer. - ErrCodeTooManyCertificatesException = "TooManyCertificates" - - // ErrCodeTooManyListenersException for service response error code - // "TooManyListeners". - // - // You've reached the limit on the number of listeners per load balancer. - ErrCodeTooManyListenersException = "TooManyListeners" - - // ErrCodeTooManyLoadBalancersException for service response error code - // "TooManyLoadBalancers". - // - // You've reached the limit on the number of load balancers for your Amazon - // Web Services account. - ErrCodeTooManyLoadBalancersException = "TooManyLoadBalancers" - - // ErrCodeTooManyRegistrationsForTargetIdException for service response error code - // "TooManyRegistrationsForTargetId". - // - // You've reached the limit on the number of times a target can be registered - // with a load balancer. - ErrCodeTooManyRegistrationsForTargetIdException = "TooManyRegistrationsForTargetId" - - // ErrCodeTooManyRulesException for service response error code - // "TooManyRules". - // - // You've reached the limit on the number of rules per load balancer. - ErrCodeTooManyRulesException = "TooManyRules" - - // ErrCodeTooManyTagsException for service response error code - // "TooManyTags". - // - // You've reached the limit on the number of tags for this resource. - ErrCodeTooManyTagsException = "TooManyTags" - - // ErrCodeTooManyTargetGroupsException for service response error code - // "TooManyTargetGroups". - // - // You've reached the limit on the number of target groups for your Amazon Web - // Services account. - ErrCodeTooManyTargetGroupsException = "TooManyTargetGroups" - - // ErrCodeTooManyTargetsException for service response error code - // "TooManyTargets". - // - // You've reached the limit on the number of targets. - ErrCodeTooManyTargetsException = "TooManyTargets" - - // ErrCodeTooManyTrustStoreRevocationEntriesException for service response error code - // "TooManyTrustStoreRevocationEntries". - // - // The specified trust store has too many revocation entries. - ErrCodeTooManyTrustStoreRevocationEntriesException = "TooManyTrustStoreRevocationEntries" - - // ErrCodeTooManyTrustStoresException for service response error code - // "TooManyTrustStores". - // - // You've reached the limit on the number of trust stores for your Amazon Web - // Services account. - ErrCodeTooManyTrustStoresException = "TooManyTrustStores" - - // ErrCodeTooManyUniqueTargetGroupsPerLoadBalancerException for service response error code - // "TooManyUniqueTargetGroupsPerLoadBalancer". - // - // You've reached the limit on the number of unique target groups per load balancer - // across all listeners. If a target group is used by multiple actions for a - // load balancer, it is counted as only one use. - ErrCodeTooManyUniqueTargetGroupsPerLoadBalancerException = "TooManyUniqueTargetGroupsPerLoadBalancer" - - // ErrCodeTrustStoreAssociationNotFoundException for service response error code - // "AssociationNotFound". - // - // The specified association does not exist. - ErrCodeTrustStoreAssociationNotFoundException = "AssociationNotFound" - - // ErrCodeTrustStoreInUseException for service response error code - // "TrustStoreInUse". - // - // The specified trust store is currently in use. - ErrCodeTrustStoreInUseException = "TrustStoreInUse" - - // ErrCodeTrustStoreNotFoundException for service response error code - // "TrustStoreNotFound". - // - // The specified trust store does not exist. - ErrCodeTrustStoreNotFoundException = "TrustStoreNotFound" - - // ErrCodeTrustStoreNotReadyException for service response error code - // "TrustStoreNotReady". - // - // The specified trust store is not active. - ErrCodeTrustStoreNotReadyException = "TrustStoreNotReady" - - // ErrCodeUnsupportedProtocolException for service response error code - // "UnsupportedProtocol". - // - // The specified protocol is not supported. - ErrCodeUnsupportedProtocolException = "UnsupportedProtocol" -) diff --git a/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go deleted file mode 100644 index d99cf2ae63..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/service.go +++ /dev/null @@ -1,104 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elbv2 - -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/query" -) - -// ELBV2 provides the API operation methods for making requests to -// Elastic Load Balancing. See this package's package overview docs -// for details on the service. -// -// ELBV2 methods are safe to use concurrently. It is not safe to -// modify mutate any of the struct's properties though. -type ELBV2 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 = "elasticloadbalancing" // Name of service. - EndpointsID = ServiceName // ID to lookup a service endpoint with. - ServiceID = "Elastic Load Balancing v2" // ServiceID is a unique identifier of a specific service. -) - -// New creates a new instance of the ELBV2 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 ELBV2 client from just a session. -// svc := elbv2.New(mySession) -// -// // Create a ELBV2 client with additional configuration -// svc := elbv2.New(mySession, aws.NewConfig().WithRegion("us-west-2")) -func New(p client.ConfigProvider, cfgs ...*aws.Config) *ELBV2 { - 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) *ELBV2 { - svc := &ELBV2{ - Client: client.New( - cfg, - metadata.ClientInfo{ - ServiceName: ServiceName, - ServiceID: ServiceID, - SigningName: signingName, - SigningRegion: signingRegion, - PartitionID: partitionID, - Endpoint: endpoint, - APIVersion: "2015-12-01", - ResolvedRegion: resolvedRegion, - }, - handlers, - ), - } - - // Handlers - svc.Handlers.Sign.PushBackNamed(v4.SignRequestHandler) - svc.Handlers.Build.PushBackNamed(query.BuildHandler) - svc.Handlers.Unmarshal.PushBackNamed(query.UnmarshalHandler) - svc.Handlers.UnmarshalMeta.PushBackNamed(query.UnmarshalMetaHandler) - svc.Handlers.UnmarshalError.PushBackNamed(query.UnmarshalErrorHandler) - - // Run custom client initialization if present - if initClient != nil { - initClient(svc.Client) - } - - return svc -} - -// newRequest creates a new request for a ELBV2 operation and runs any -// custom request initialization. -func (c *ELBV2) 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/elbv2/waiters.go b/vendor/github.com/aws/aws-sdk-go/service/elbv2/waiters.go deleted file mode 100644 index f08f1aaf20..0000000000 --- a/vendor/github.com/aws/aws-sdk-go/service/elbv2/waiters.go +++ /dev/null @@ -1,270 +0,0 @@ -// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. - -package elbv2 - -import ( - "time" - - "github.com/aws/aws-sdk-go/aws" - "github.com/aws/aws-sdk-go/aws/request" -) - -// WaitUntilLoadBalancerAvailable uses the Elastic Load Balancing v2 API operation -// DescribeLoadBalancers to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilLoadBalancerAvailable(input *DescribeLoadBalancersInput) error { - return c.WaitUntilLoadBalancerAvailableWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilLoadBalancerAvailableWithContext is an extended version of WaitUntilLoadBalancerAvailable. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// 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 *ELBV2) WaitUntilLoadBalancerAvailableWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilLoadBalancerAvailable", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "LoadBalancers[].State.Code", - Expected: "active", - }, - { - State: request.RetryWaiterState, - Matcher: request.PathAnyWaiterMatch, Argument: "LoadBalancers[].State.Code", - Expected: "provisioning", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "LoadBalancerNotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilLoadBalancerExists uses the Elastic Load Balancing v2 API operation -// DescribeLoadBalancers to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilLoadBalancerExists(input *DescribeLoadBalancersInput) error { - return c.WaitUntilLoadBalancerExistsWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilLoadBalancerExistsWithContext is an extended version of WaitUntilLoadBalancerExists. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// 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 *ELBV2) WaitUntilLoadBalancerExistsWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilLoadBalancerExists", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.StatusWaiterMatch, - Expected: 200, - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "LoadBalancerNotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilLoadBalancersDeleted uses the Elastic Load Balancing v2 API operation -// DescribeLoadBalancers to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilLoadBalancersDeleted(input *DescribeLoadBalancersInput) error { - return c.WaitUntilLoadBalancersDeletedWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilLoadBalancersDeletedWithContext is an extended version of WaitUntilLoadBalancersDeleted. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// 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 *ELBV2) WaitUntilLoadBalancersDeletedWithContext(ctx aws.Context, input *DescribeLoadBalancersInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilLoadBalancersDeleted", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.RetryWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "LoadBalancers[].State.Code", - Expected: "active", - }, - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "LoadBalancerNotFound", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeLoadBalancersInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeLoadBalancersRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilTargetDeregistered uses the Elastic Load Balancing v2 API operation -// DescribeTargetHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilTargetDeregistered(input *DescribeTargetHealthInput) error { - return c.WaitUntilTargetDeregisteredWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilTargetDeregisteredWithContext is an extended version of WaitUntilTargetDeregistered. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// 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 *ELBV2) WaitUntilTargetDeregisteredWithContext(ctx aws.Context, input *DescribeTargetHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilTargetDeregistered", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidTarget", - }, - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "TargetHealthDescriptions[].TargetHealth.State", - Expected: "unused", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeTargetHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTargetHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} - -// WaitUntilTargetInService uses the Elastic Load Balancing v2 API operation -// DescribeTargetHealth to wait for a condition to be met before returning. -// If the condition is not met within the max attempt window, an error will -// be returned. -func (c *ELBV2) WaitUntilTargetInService(input *DescribeTargetHealthInput) error { - return c.WaitUntilTargetInServiceWithContext(aws.BackgroundContext(), input) -} - -// WaitUntilTargetInServiceWithContext is an extended version of WaitUntilTargetInService. -// With the support for passing in a context and options to configure the -// Waiter and the underlying request options. -// -// 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 *ELBV2) WaitUntilTargetInServiceWithContext(ctx aws.Context, input *DescribeTargetHealthInput, opts ...request.WaiterOption) error { - w := request.Waiter{ - Name: "WaitUntilTargetInService", - MaxAttempts: 40, - Delay: request.ConstantWaiterDelay(15 * time.Second), - Acceptors: []request.WaiterAcceptor{ - { - State: request.SuccessWaiterState, - Matcher: request.PathAllWaiterMatch, Argument: "TargetHealthDescriptions[].TargetHealth.State", - Expected: "healthy", - }, - { - State: request.RetryWaiterState, - Matcher: request.ErrorWaiterMatch, - Expected: "InvalidInstance", - }, - }, - Logger: c.Config.Logger, - NewRequest: func(opts []request.Option) (*request.Request, error) { - var inCpy *DescribeTargetHealthInput - if input != nil { - tmp := *input - inCpy = &tmp - } - req, _ := c.DescribeTargetHealthRequest(inCpy) - req.SetContext(ctx) - req.ApplyOptions(opts...) - return req, nil - }, - } - w.ApplyOptions(opts...) - - return w.WaitWithContext(ctx) -} diff --git a/vendor/github.com/aws/smithy-go/CHANGELOG.md b/vendor/github.com/aws/smithy-go/CHANGELOG.md index 1d60def6d1..8b6ab29500 100644 --- a/vendor/github.com/aws/smithy-go/CHANGELOG.md +++ b/vendor/github.com/aws/smithy-go/CHANGELOG.md @@ -1,3 +1,12 @@ +# Release (2025-08-27) + +## General Highlights +* **Dependency Update**: Updated to the latest SDK module versions + +## Module Highlights +* `github.com/aws/smithy-go`: v1.23.0 + * **Feature**: Sort map keys in JSON Document types. + # Release (2025-07-24) ## General Highlights @@ -5,8 +14,7 @@ ## Module Highlights * `github.com/aws/smithy-go`: v1.22.5 - * **Bug Fix**: Fix HTTP metrics data race. - * **Bug Fix**: Replace usages of deprecated ioutil package. + * **Feature**: Add HTTP interceptors. # Release (2025-06-16) diff --git a/vendor/github.com/aws/smithy-go/README.md b/vendor/github.com/aws/smithy-go/README.md index c9ba5ea5e4..77a74ae0c2 100644 --- a/vendor/github.com/aws/smithy-go/README.md +++ b/vendor/github.com/aws/smithy-go/README.md @@ -8,15 +8,17 @@ The smithy-go runtime requires a minimum version of Go 1.22. **WARNING: All interfaces are subject to change.** -## Can I use the code generators? +## :no_entry_sign: DO NOT use the code generators in this repository + +**The code generators in this repository do not generate working clients at +this time.** In order to generate a usable smithy client you must provide a [protocol definition](https://github.com/aws/smithy-go/blob/main/codegen/smithy-go-codegen/src/main/java/software/amazon/smithy/go/codegen/integration/ProtocolGenerator.java), such as [AWS restJson1](https://smithy.io/2.0/aws/protocols/aws-restjson1-protocol.html), in order to generate transport mechanisms and serialization/deserialization code ("serde") accordingly. -The code generator does not currently support any protocols out of the box other than the new `smithy.protocols#rpcv2Cbor`, -therefore the useability of this project on its own is currently limited. +The code generator does not currently support any protocols out of the box. Support for all [AWS protocols](https://smithy.io/2.0/aws/protocols/index.html) exists in [aws-sdk-go-v2](https://github.com/aws/aws-sdk-go-v2). We are tracking the movement of those out of the SDK into smithy-go in @@ -31,6 +33,7 @@ This repository implements the following Smithy build plugins: |----|------------|-------------| | `go-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go client code generation for Smithy models. | | `go-server-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go server code generation for Smithy models. | +| `go-shape-codegen` | `software.amazon.smithy.go:smithy-go-codegen` | Implements Go shape code generation (types only) for Smithy models. | **NOTE: Build plugins are not currently published to mavenCentral. You must publish to mavenLocal to make the build plugins visible to the Smithy CLI. The artifact version is currently fixed at 0.1.0.** @@ -87,6 +90,10 @@ example created from `smithy init`: This plugin is a work-in-progress and is currently undocumented. +## `go-shape-codegen` + +This plugin is a work-in-progress and is currently undocumented. + ## License This project is licensed under the Apache-2.0 License. diff --git a/vendor/github.com/aws/smithy-go/go_module_metadata.go b/vendor/github.com/aws/smithy-go/go_module_metadata.go index cbbaabee9e..945db0af30 100644 --- a/vendor/github.com/aws/smithy-go/go_module_metadata.go +++ b/vendor/github.com/aws/smithy-go/go_module_metadata.go @@ -3,4 +3,4 @@ package smithy // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.22.5" +const goModuleVersion = "1.23.0" diff --git a/vendor/modules.txt b/vendor/modules.txt index 86fad1ac1b..a019729578 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -444,9 +444,6 @@ 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/elb -github.com/aws/aws-sdk-go/service/elbv2 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 @@ -459,7 +456,7 @@ github.com/aws/aws-sdk-go/service/sso/ssoiface github.com/aws/aws-sdk-go/service/ssooidc github.com/aws/aws-sdk-go/service/sts github.com/aws/aws-sdk-go/service/sts/stsiface -# github.com/aws/aws-sdk-go-v2 v1.38.0 +# github.com/aws/aws-sdk-go-v2 v1.39.0 ## explicit; go 1.22 github.com/aws/aws-sdk-go-v2/aws github.com/aws/aws-sdk-go-v2/aws/arn @@ -507,10 +504,10 @@ github.com/aws/aws-sdk-go-v2/credentials/stscreds ## explicit; go 1.22 github.com/aws/aws-sdk-go-v2/feature/ec2/imds github.com/aws/aws-sdk-go-v2/feature/ec2/imds/internal/config -# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.3 +# github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.7 ## explicit; go 1.22 github.com/aws/aws-sdk-go-v2/internal/configsources -# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.3 +# github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.7 ## explicit; go 1.22 github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 # github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 @@ -526,6 +523,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.40.5 +## 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.32.0 ## explicit; go 1.22 github.com/aws/aws-sdk-go-v2/service/elasticloadbalancing @@ -593,7 +595,7 @@ github.com/aws/aws-sdk-go-v2/service/ssooidc/types github.com/aws/aws-sdk-go-v2/service/sts github.com/aws/aws-sdk-go-v2/service/sts/internal/endpoints github.com/aws/aws-sdk-go-v2/service/sts/types -# github.com/aws/smithy-go v1.22.5 +# github.com/aws/smithy-go v1.23.0 ## explicit; go 1.22 github.com/aws/smithy-go github.com/aws/smithy-go/auth